aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2011-02-23 09:35:32 +0000
committerplegall <plg@piwigo.org>2011-02-23 09:35:32 +0000
commitf409eb1c5d749c16622c31eb29f656f840ef9e16 (patch)
treee63d0177fa553c8b03e8716af6346e18d2889f27 /plugins
parent31fab45f93d516ae4e160db637405dc20d278f23 (diff)
feature 2200: LocalFilesEditor plugin now uses the new cleaner URL alias for administration pages
git-svn-id: http://piwigo.org/svn/trunk@9359 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--plugins/LocalFilesEditor/admin.php16
-rw-r--r--plugins/LocalFilesEditor/main.inc.php11
2 files changed, 16 insertions, 11 deletions
diff --git a/plugins/LocalFilesEditor/admin.php b/plugins/LocalFilesEditor/admin.php
index fc4341354..8295e19a8 100644
--- a/plugins/LocalFilesEditor/admin.php
+++ b/plugins/LocalFilesEditor/admin.php
@@ -25,7 +25,7 @@ if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
include_once(LOCALEDIT_PATH.'functions.inc.php');
load_language('plugin.lang', LOCALEDIT_PATH);
-$my_base_url = get_admin_plugin_menu_link(__FILE__);
+$my_base_url = get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__));
// +-----------------------------------------------------------------------+
// | Tabssheet
@@ -38,19 +38,19 @@ else
$tabsheet = new tabsheet();
$tabsheet->add('localconf',
l10n('locfiledit_onglet_localconf'),
- $my_base_url.'&amp;tab=localconf');
+ $my_base_url.'-localconf');
$tabsheet->add('css',
l10n('locfiledit_onglet_css'),
- $my_base_url.'&amp;tab=css');
+ $my_base_url.'-css');
$tabsheet->add('tpl',
l10n('locfiledit_onglet_tpl'),
- $my_base_url.'&amp;tab=tpl');
+ $my_base_url.'-tpl');
$tabsheet->add('lang',
l10n('locfiledit_onglet_lang'),
- $my_base_url.'&amp;tab=lang');
+ $my_base_url.'-lang');
$tabsheet->add('plug',
l10n('locfiledit_onglet_plug'),
- $my_base_url.'&amp;tab=plug');
+ $my_base_url.'-plug');
$tabsheet->select($page['tab']);
$tabsheet->assign();
@@ -235,7 +235,7 @@ switch ($page['tab'])
$template->assign('css_lang_tpl', array(
'OPTIONS' => $options,
'SELECTED' => $selected,
- 'NEW_FILE_URL' => $my_base_url.'&amp;tab=tpl&amp;newfile',
+ 'NEW_FILE_URL' => $my_base_url.'-tpl&amp;newfile',
'NEW_FILE_CLASS' => empty($edited_file) ? '' : 'top_right'));
$editarea_options['syntax'] = 'html';
@@ -365,7 +365,7 @@ if (!empty($edited_file))
}
$template->assign(array(
- 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin&amp;section=LocalFilesEditor%2Fadmin.php&amp;tab=' . $page['tab'],
+ 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=plugin-LocalFilesEditor-'.$page['tab'],
'LOCALEDIT_PATH' => LOCALEDIT_PATH,
'LOAD_EDITAREA' => isset($conf['LocalFilesEditor']) ? $conf['LocalFilesEditor'] : 'off',
'EDITAREA_OPTIONS' => $editarea_options));
diff --git a/plugins/LocalFilesEditor/main.inc.php b/plugins/LocalFilesEditor/main.inc.php
index b66a1c49d..c46099721 100644
--- a/plugins/LocalFilesEditor/main.inc.php
+++ b/plugins/LocalFilesEditor/main.inc.php
@@ -35,9 +35,14 @@ define('LOCALEDIT_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'
function localfiles_admin_menu($menu)
{
- array_push($menu, array(
- 'NAME' => 'LocalFiles Editor',
- 'URL' => get_admin_plugin_menu_link(LOCALEDIT_PATH . 'admin.php')));
+ array_push(
+ $menu,
+ array(
+ 'NAME' => 'LocalFiles Editor',
+ 'URL' => get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))
+ )
+ );
+
return $menu;
}