vtiger Forum Index vtiger
The Honest Open Source CRM
 

Fix for Notes formatting problem
Click here to go to the original topic

 
       vtiger Forum Index -> Code Contributions - 5.0.2
Previous topic :: Next topic  
Author Message
Kiddo



Joined: 27 Jul 2006
Posts: 22
Location: Sydney

Posted: Sun Sep 03, 2006 1:15 pm    Post subject: Fix for Notes formatting problem  

The problem is that Notes are displayed with extra newlines (actually embedded "<br />"s). (It took me many hours to find the guilty code! :cry:)

Here is the fix:

Near line 132 of include/utils/DetailViewUtils.php:

Remove:
Code:
   elseif($uitype == 19)
   {
        $col_fields[$fieldname]= make_clickable(nl2br($col_fields[$fieldname]));

Alternative 1: Substitute:
Code:
   elseif($uitype == 19) // Notes:
   {

In my opinion, the above is the preferred fix until a better version of make_clickable() is written. make_clickable() attempts to take text like "www.test.com" and turn it into a clickable link. However, in my test on a Note full of URLs, it does this in an inconsistent fashion; some got converted, some didn't.

If you think that inconsistent link creation is better than none then the following is the corrected code:
Alternative 2: Substitute:
Code:
   elseif($uitype == 19) // Notes:
   {
      $col_fields[$fieldname]= make_clickable($col_fields[$fieldname]);

regards,
Neil
Back to top  
philip



Joined: 25 Aug 2004
Posts: 297

Posted: Tue Sep 05, 2006 10:17 am    Post subject: Re: Fix for Notes formatting problem  

Hi,

Thanks for pointing this out, this has been fixed in our latest build and will be available in next release. Kindly refer our svn repository in vtiger.fosslabs.com for more details.

Philip
Back to top  
 
       vtiger Forum Index -> Code Contributions - 5.0.2
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group