aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/include/functions_plugins.inc.php26
-rw-r--r--admin/plugin.php2
-rw-r--r--admin/plugins.php2
3 files changed, 24 insertions, 6 deletions
diff --git a/admin/include/functions_plugins.inc.php b/admin/include/functions_plugins.inc.php
index d938f7b23..652aa7e19 100644
--- a/admin/include/functions_plugins.inc.php
+++ b/admin/include/functions_plugins.inc.php
@@ -38,11 +38,11 @@ function get_fs_plugins()
$path = PHPWG_PLUGINS_PATH.$file;
if (is_dir($path) and !is_link($path)
and preg_match('/^[a-zA-Z0-9-_]+$/', $file )
- and file_exists($path.'/index.php')
+ and file_exists($path.'/main.inc.php')
)
{
$plugin = array('name'=>'?', 'version'=>'0', 'uri'=>'', 'description'=>'');
- $plg_data = implode( '', file($path.'/index.php') );
+ $plg_data = implode( '', file($path.'/main.inc.php') );
if ( preg_match("|Plugin Name: (.*)|i", $plg_data, $val) )
{
@@ -72,8 +72,26 @@ function get_fs_plugins()
function add_plugin_admin_menu($title, $func)
{
global $page;
-
- $uid = md5( var_export($func, true) );
+ if ( is_array( $func) )
+ {
+ $s = '';
+ foreach( $func as $e)
+ {
+ if (is_object($e))
+ {
+ $s.=get_class($e)."\n";
+ }
+ else
+ {
+ $s.=$e;
+ }
+ }
+ $uid = md5( $s );
+ }
+ else
+ {
+ $uid = md5( $func );
+ }
$page['plugin_admin_menu'][] =
array(
'title' => $title,
diff --git a/admin/plugin.php b/admin/plugin.php
index 08afccc61..e3d5e4e4e 100644
--- a/admin/plugin.php
+++ b/admin/plugin.php
@@ -36,7 +36,7 @@ check_status(ACCESS_ADMINISTRATOR);
$template->set_filenames(array('plugin' => 'admin/plugin.tpl'));
-trigger_event('plugin_admin_menu');
+trigger_action('plugin_admin_menu');
if ( isset($page['plugin_admin_menu']) )
diff --git a/admin/plugins.php b/admin/plugins.php
index 27bc5600d..6b5bf4505 100644
--- a/admin/plugins.php
+++ b/admin/plugins.php
@@ -162,7 +162,7 @@ foreach ($db_plugins as $db_plugin)
$template->set_filenames(array('plugins' => 'admin/plugins.tpl'));
-trigger_event('plugin_admin_menu');
+trigger_action('plugin_admin_menu');
$template->assign_block_vars('plugin_menu.menu_item',
array(