Author:   Lars Michelsen <[email protected]>
Date:     Fri Sep  9 08:40:13 2011 +0200
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Fri Sep  9 08:40:13 2011 +0200

Sorting maps in multisite snapin by aliases

---

 ChangeLog                                      |    1 +
 share/server/core/classes/CoreModMultisite.php |    8 +++++++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 163b9f3..eb3fbf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@ Frontend
   * Also disabling the object left click actions in unlocked mode
   * Icon/Gadget/Shape/Textbox dragging is done by dragging the real icons
   again, like it was in WUI before. The drag controls for these objects has 
been removed.
+  * Sorting maps in multisite snapin by aliases
   * Bugfix: Fixed several umlauts in edit mode warning messages
   * Bugfix: Fixed 100% sidebar height
   * Bugfix: Fixed initial positioning of relative positioned gadgets
diff --git a/share/server/core/classes/CoreModMultisite.php 
b/share/server/core/classes/CoreModMultisite.php
index 987ca91..6dc5414 100644
--- a/share/server/core/classes/CoreModMultisite.php
+++ b/share/server/core/classes/CoreModMultisite.php
@@ -144,7 +144,13 @@ class CoreModMultisite extends CoreModule {
             $aMaps[] = $aObj[0]->getObjectInformation();
         }
 
+        usort($aMaps, Array('CoreModMultisite', 'cmpAlias'));
         return $aMaps;
     }
+
+    // Sort array of map arrays by alias
+    static function cmpAlias($a, $b) {
+        return strnatcmp($a['alias'], $b['alias']);
+    }
 }
-?>
\ No newline at end of file
+?>


------------------------------------------------------------------------------
Why Cloud-Based Security and Archiving Make Sense
Osterman Research conducted this study that outlines how and why cloud
computing security and archiving is rapidly being adopted across the IT 
space for its ease of implementation, lower cost, and increased 
reliability. Learn more. http://www.accelacomm.com/jaw/sfnl/114/51425301/
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to