mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-05-07 22:05:05 +02:00
feature 2200 added: clean alias for plugin administration pages
git-svn-id: http://piwigo.org/svn/trunk@9357 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -78,6 +78,18 @@ if (mt_rand(0,9)==0)
|
||||
// | variables init |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
// ?page=plugin-community-pendings is an clean alias of
|
||||
// ?page=plugin§ion=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'))
|
||||
|
||||
Reference in New Issue
Block a user