diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-12-14 00:58:57 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-12-14 00:58:57 +0000 |
commit | f7960e7e72ca913e1e67844dec6ff0d40de46d1b (patch) | |
tree | 678ca1a56753234b43b6ba65eb0b61fb7535787f /admin/plugin.php | |
parent | 51e56e9c1f4952a7d8cb7533b62c2829c15df01e (diff) |
- plugins admin menu appear now in the admin page menubar
- plugins are loaded immediately after loading the config (allow
them to hack more of pwg like user init, template init etc...)
- trigger event format_exif_data (for picture display only)
git-svn-id: http://piwigo.org/svn/trunk@1655 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/plugin.php | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/admin/plugin.php b/admin/plugin.php index e3d5e4e4e..c880cdca7 100644 --- a/admin/plugin.php +++ b/admin/plugin.php @@ -31,40 +31,25 @@ if( !defined("PHPWG_ROOT_PATH") ) } include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); -include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php'); check_status(ACCESS_ADMINISTRATOR); $template->set_filenames(array('plugin' => 'admin/plugin.tpl')); -trigger_action('plugin_admin_menu'); - - if ( isset($page['plugin_admin_menu']) ) { - $template->assign_block_vars('plugin_menu.menu_item', - array( - 'NAME' => l10n('Plugins'), - 'URL' => PHPWG_ROOT_PATH.'admin.php?page=plugins' - ) - ); - - $plug_base_url = PHPWG_ROOT_PATH.'admin.php?page=plugin&section='; foreach ($page['plugin_admin_menu'] as $menu) { if (isset($_GET['section']) and $menu['uid']==$_GET['section']) { $found_menu=$menu; + break; } - $template->assign_block_vars('plugin_menu.menu_item', - array( - 'NAME' => $menu['title'], - 'URL' => $plug_base_url.$menu['uid'] - ) - ); } } + if ( isset($found_menu) ) { + $template->assign_var('PLUGIN_TITLE', $found_menu['title'] ); call_user_func( $found_menu['function'], PHPWG_ROOT_PATH.'admin.php?page=plugin&section='.$found_menu['uid'] ); |