Merge pull request #1836 from fabrixxm/feature-reload-plugins

add 'reload active plugins' button in admin/plugins
This commit is contained in:
Tobias Diekershoff 2015-08-20 19:48:16 +02:00
commit 501a676180
2 changed files with 12 additions and 5 deletions

View file

@ -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) {

View file

@ -1,7 +1,7 @@
<div id='adminpage'>
<h1>{{$title}} - {{$page}}</h1>
<a class="btn" href="{{$baseurl}}/admin/{{$function}}?a=r&amp;t={{$form_security_token}}">{{"Reload active plugins"|t}}</a>
<ul id='pluginslist'>
{{foreach $plugins as $p}}
<li class='plugin {{$p.1}}'>