diff options
author | diosmosis <benaka.moorthi@gmail.com> | 2013-02-21 03:23:10 +0400 |
---|---|---|
committer | diosmosis <benaka.moorthi@gmail.com> | 2013-02-21 03:23:10 +0400 |
commit | f1f29bce4942e0429a98e7dcec6e86dd89853f5c (patch) | |
tree | 13e7b1d8d7b7369944a8861868a53e752e4eca84 /core/Menu | |
parent | adb9e2e7f271d8f803e92e3ff68e318a2fbea37f (diff) |
Refs #1845, added new admin page where users can create their own custom JavaScript tracking code snippets and image tracking link HTML.
Notes:
* Rewrote Site selector widget JS so multiple site selectors could be used on the same page.
* Added method to ajaxHelper JS class that eases use of bulk request API.
* Allowed section toggler JS in misc.js to be used w/ input elements as well as links.
* Fixed bug in menu ordering code where accessing _hasSubMenu results in uasort behaving incorrectly when menu is already sorted.
Diffstat (limited to 'core/Menu')
-rw-r--r-- | core/Menu/Abstract.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/Menu/Abstract.php b/core/Menu/Abstract.php index 981f6bd0f2..3a0b49c62b 100644 --- a/core/Menu/Abstract.php +++ b/core/Menu/Abstract.php @@ -19,6 +19,7 @@ abstract class Piwik_Menu_Abstract protected $menuEntries = array(); protected $edits = array(); protected $renames = array(); + protected $orderingApplied = false; /* * Can't enforce static function in 5.2. @@ -198,10 +199,12 @@ abstract class Piwik_Menu_Abstract */ private function applyOrdering() { - if(empty($this->menu)) + if (empty($this->menu) + || $this->orderingApplied) { return; } + uasort($this->menu, array($this, 'menuCompare')); foreach ($this->menu as $key => &$element) { @@ -214,6 +217,8 @@ abstract class Piwik_Menu_Abstract uasort($element, array($this, 'menuCompare')); } } + + $this->orderingApplied = true; } /** |