aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-10-19 02:04:24 +0000
committerrvelices <rv-github@modusoptimus.com>2007-10-19 02:04:24 +0000
commit034e914870716f27a150884f8583a98468d890f6 (patch)
treed962f7335f56bacabc78d2c6af58d80fae66bb50
parenta2e3963cb078890737a5d83ccda3e6ecc8b1d85e (diff)
feature 765: Sort alphabetically the admin plugin menus and plugin list
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2143 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin.php13
-rw-r--r--admin/plugins.php1
2 files changed, 10 insertions, 4 deletions
diff --git a/admin.php b/admin.php
index 004bac218..493ddb8a8 100644
--- a/admin.php
+++ b/admin.php
@@ -116,15 +116,20 @@ if ($conf['ws_access_control']) // Do we need to display ws_checker
}
// required before plugin page inclusion
-$plugin_menu_links = array(
+$plugin_menu_links = trigger_event('get_admin_plugin_menu_links', array() );
+
+function UC_name_compare($a, $b)
+{
+ return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
+}
+usort($plugin_menu_links, 'UC_name_compare');
+
+array_unshift($plugin_menu_links,
array(
'NAME' => l10n('admin'),
'URL' => $link_start.'plugins'
)
);
-$plugin_menu_links = trigger_event('get_admin_plugin_menu_links',
- $plugin_menu_links );
-
include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php');
diff --git a/admin/plugins.php b/admin/plugins.php
index f68b98839..6c88a3b68 100644
--- a/admin/plugins.php
+++ b/admin/plugins.php
@@ -164,6 +164,7 @@ DELETE FROM '.PLUGINS_TABLE.' WHERE id="'.$plugin_id.'"';
// | start template output |
// +-----------------------------------------------------------------------+
$fs_plugins = get_fs_plugins();
+uasort($fs_plugins, 'name_compare');
$db_plugins = get_db_plugins();
$db_plugins_by_id=array();
foreach ($db_plugins as $db_plugin)