User tests: Successful: Unsuccessful:
This PR, to remove duplicate queries from db, it saves into variables the result of the db queries of the two methods moved, only running the db query if needed.
Also moves some multilanguage methods from com_languages helper MultilangstatusHelper
to JLanguage Multilang helper JLanguageMultilang
.
This adds a little performance benefit. Around 2ms to 3ms of total page generation time (in a PHP 5.6 installation).
ms
taken to do all database queries.Since this PR adds and deprecates some class methods, please say if anything else is needed to do.
Suggestions, code reviews and improvements are welcome.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
sorry @infograf768 code was a problem, i willl fix it soon
i think it's solved now, the bug was is line 47 andrepereiradasilva@167035f#diff-5ca4c28b8e63fb73e99b5128c808630fR47 (the variable name was wrong)
I have tested this item successfully on b9d67c2
Wow! This works real good here. Thanks for this PR.
I have tested this item successfully on b9d67c2
No problems here!
Thanks
I have tested this item successfully on b9d67c2
Status | Pending | ⇒ | Ready to Commit |
RTC then!
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-21 23:39:34 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
I get some Notices and Warning when the item has no associations yet.
( ! ) Notice: Undefined index: com_content|#__content|com_content.item|213|id|alias|catid in /ROOT/libraries/cms/language/associations.php on line 121
or
( ! ) Notice: Undefined index: com_menus|#__menu|com_menus.item|631|id|| in ROOT/libraries/cms/language/associations.php on line 121
with for example
( ! ) Warning: Invalid argument supplied for foreach() in ROOT/trunkgitnew/administrator/components/com_menus/helpers/menus.php on line 321
I can get rid of the Warning for example in the menus helper by checking if we do have associations:
But I still have the Notice.
I could get rid of it by adding a conditional, but not sure it is the best way.