Plugin manager: system plugins now sorted to last
authorDan
Thu, 26 Feb 2009 01:27:23 -0500
changeset 844 7549f2880c32
parent 843 4415e50e4e84
child 845 a4460ba8ada2
Plugin manager: system plugins now sorted to last
plugins/admin/PluginManager.php
--- a/plugins/admin/PluginManager.php	Thu Feb 26 01:07:32 2009 -0500
+++ b/plugins/admin/PluginManager.php	Thu Feb 26 01:27:23 2009 -0500
@@ -330,6 +330,27 @@
     return true;
   }
   
+  // Sort so that system plugins come last
+  ksort($plugin_list);
+  $plugin_list_sorted = array();
+  foreach ( $plugin_list as $filename => $data )
+  {
+    if ( !$data['system plugin'] )
+    {
+      $plugin_list_sorted[$filename] = $data;
+    }
+  }
+  ksort($plugin_list_sorted);
+  foreach ( $plugin_list as $filename => $data )
+  {
+    if ( $data['system plugin'] )
+    {
+      $plugin_list_sorted[$filename] = $data;
+    }
+  }
+  
+  $plugin_list =& $plugin_list_sorted;
+  
   //
   // Not a JSON request, output normal HTML interface
   //