diff options
author | Friendika <info@friendika.com> | 2011-06-19 15:56:07 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-06-19 15:56:07 -0700 |
commit | 76ddbff0b5184c85be1e7ad2ffe6fb918ed65b65 (patch) | |
tree | 0e6d0aa962935aa4f522d9ac2eae2519ca7573ef /mod | |
parent | d8e2dc23b9a62a2c5ab21eb13ab78340031ca051 (diff) | |
parent | 7c28e5893228320a2180a58aa68d913744d17e05 (diff) | |
download | volse-hubzilla-76ddbff0b5184c85be1e7ad2ffe6fb918ed65b65.tar.gz volse-hubzilla-76ddbff0b5184c85be1e7ad2ffe6fb918ed65b65.tar.bz2 volse-hubzilla-76ddbff0b5184c85be1e7ad2ffe6fb918ed65b65.zip |
Merge branch 'pull'
Diffstat (limited to 'mod')
-rw-r--r-- | mod/admin.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mod/admin.php b/mod/admin.php index 1ae0490e8..df5b6600a 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -29,8 +29,9 @@ function admin_post(&$a){ if ($a->argc > 2 && is_file("addon/".$a->argv[2]."/".$a->argv[2].".php")){ @include_once("addon/".$a->argv[2]."/".$a->argv[2].".php"); - if(function_exists('plugin_admin_post')) { - plugin_admin_post($a); + if(function_exists($a->argv[2].'_plugin_admin_post')) { + $func = $a->argv[2].'_plugin_admin_post'; + $func($a); } } goaway($a->get_baseurl() . '/admin/plugins/' . $a->argv[2] ); @@ -65,10 +66,10 @@ function admin_content(&$a) { /* get plugins admin page */ - $r = q("SELECT * FROM `hook` WHERE `hook`='plugin_admin'"); + $r = q("SELECT * FROM `addon` WHERE `plugin_admin`=1"); $aside['plugins_admin']=Array(); foreach ($r as $h){ - $plugin = explode("/",$h['file']); $plugin = $plugin[1]; + $plugin =$h['name']; $aside['plugins_admin'][] = Array($a->get_baseurl()."/admin/plugins/".$plugin, $plugin, "plugin"); // temp plugins with admin $a->plugins_admin[] = $plugin; @@ -526,7 +527,9 @@ function admin_page_plugins(&$a){ $admin_form=""; if (in_array($plugin, $a->plugins_admin)){ - call_hooks('plugin_admin', $admin_form); + @require_once("addon/$plugin/$plugin.php"); + $func = $plugin.'_plugin_admin'; + $func($a, $admin_form); } $t = get_markup_template("admin_plugins_details.tpl"); |