From 81d1dfc006ae224c8fbd227fefe28d33ef9b7068 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Thu, 20 Aug 2015 15:01:15 +0200 Subject: [PATCH] add 'reload active plugins' button in admin/plugins --- mod/admin.php | 15 +++++++++++---- view/templates/admin_plugins.tpl | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mod/admin.php b/mod/admin.php index ff8cedc0c..2493973df 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -557,8 +557,8 @@ function admin_page_site_post(&$a){ set_config('system','only_tag_search', $only_tag_search); set_config('system','rino_encrypt', $rino); - - + + info( t('Site settings updated.') . EOL); goaway($a->get_baseurl(true) . '/admin/site' ); return; // NOTREACHED @@ -761,9 +761,9 @@ function admin_page_site(&$a) { '$only_tag_search' => array('only_tag_search', t("Only search in tags"), get_config('system','only_tag_search'), t("On large systems the text search can slow down the system extremely.")), '$relocate_url' => array('relocate_url', t("New base url"), $a->get_baseurl(), "Change base url for this server. Sends relocate message to all DFRN contacts of all users."), - + '$rino' => array('rino', t("RINO Encryption"), intval(get_config('system','rino_encrypt')), t("Encryption layer between nodes."), array("Disabled", "RINO1 (deprecated)", "RINO2")), - + '$form_security_token' => get_form_security_token("admin_site") )); @@ -1196,6 +1196,13 @@ function admin_page_plugins(&$a){ * List plugins */ + if (x($_GET,"a") && $_GET['a']=="r"){ + check_form_security_token_redirectOnErr($a->get_baseurl().'/admin/plugins', 'admin_themes', 't'); + reload_plugins(); + info("Plugins reloaded"); + goaway($a->get_baseurl().'/admin/plugins'); + } + $plugins = array(); $files = glob("addon/*/"); /* */ if($files) { diff --git a/view/templates/admin_plugins.tpl b/view/templates/admin_plugins.tpl index c194c46cc..6577ab8eb 100644 --- a/view/templates/admin_plugins.tpl +++ b/view/templates/admin_plugins.tpl @@ -1,7 +1,7 @@

{{$title}} - {{$page}}

- + {{"Reload active plugins"|t}}