aboutsummaryrefslogtreecommitdiffstats
path: root/admin.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-02-23 09:24:43 +0000
committerplegall <plg@piwigo.org>2011-02-23 09:24:43 +0000
commite28cbddada5a2568e1f5e2a011d3c3bc660b2d48 (patch)
treef036e237cac2eb81fa9721994849792cc376d8ad /admin.php
parent45c4b7681f25c2aa167544fc8d0c5c62e1507c97 (diff)
feature 2200 added: clean alias for plugin administration pages
git-svn-id: http://piwigo.org/svn/trunk@9357 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/admin.php b/admin.php
index 8e55b885f..1f0aa0da5 100644
--- a/admin.php
+++ b/admin.php
@@ -78,6 +78,18 @@ if (mt_rand(0,9)==0)
// | variables init |
// +-----------------------------------------------------------------------+
+// ?page=plugin-community-pendings is an clean alias of
+// ?page=plugin&section=community/admin.php&tab=pendings
+if (preg_match('/^plugin-([^-]*)(?:-(.*))?$/', $_GET['page'], $matches))
+{
+ $_GET['page'] = 'plugin';
+ $_GET['section'] = $matches[1].'/admin.php';
+ if (isset($matches[2]))
+ {
+ $_GET['tab'] = $matches[2];
+ }
+}
+
if (isset($_GET['page'])
and preg_match('/^[a-z_]*$/', $_GET['page'])
and is_file(PHPWG_ROOT_PATH.'admin/'.$_GET['page'].'.php'))