aboutsummaryrefslogtreecommitdiffstats
path: root/mod/admin.php
diff options
context:
space:
mode:
authorfabrixxm <fabrix.xm@gmail.com>2011-06-19 15:43:10 +0200
committerfabrixxm <fabrix.xm@gmail.com>2011-06-19 15:43:10 +0200
commit001982cac0c343f6405fa4191292e3f8efbd4df3 (patch)
tree5a8ca8b637ad654cae2d9b930e6730ef4ee3ff6f /mod/admin.php
parentb650183cd4b82325dcaf74a42386882ef1802750 (diff)
downloadvolse-hubzilla-001982cac0c343f6405fa4191292e3f8efbd4df3.tar.gz
volse-hubzilla-001982cac0c343f6405fa4191292e3f8efbd4df3.tar.bz2
volse-hubzilla-001982cac0c343f6405fa4191292e3f8efbd4df3.zip
Change logic in admin.php to load plugin settings form. Add statusnet settings form.
Diffstat (limited to 'mod/admin.php')
-rw-r--r--mod/admin.php13
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");