diff options
author | rvelices <rv-github@modusoptimus.com> | 2006-11-01 05:54:35 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2006-11-01 05:54:35 +0000 |
commit | bce8b9f680af4eb5481441e52e1d82b11da722be (patch) | |
tree | 45b30f55abb3257bbc3a8592f8ab872468e41636 /admin/include | |
parent | 525c9bc40ab6a99c44292388ce4385574057da86 (diff) |
plugins last modifications + events are triggered now from picture.php
git-svn-id: http://piwigo.org/svn/trunk@1590 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_plugins.inc.php | 26 |
1 files changed, 22 insertions, 4 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, |