From effb4d9de0dff2f68e65e9fabe4c9d4e18b68fe6 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 4 Jun 2011 09:34:59 +0000 Subject: 'Deactivate all' link now visible if all plugins are active git-svn-id: http://piwigo.org/svn/trunk@11227 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/plugins_installed.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'admin/plugins_installed.php') diff --git a/admin/plugins_installed.php b/admin/plugins_installed.php index a16dbaaef..758c1b11d 100644 --- a/admin/plugins_installed.php +++ b/admin/plugins_installed.php @@ -86,6 +86,7 @@ $plugins->sort_fs_plugins('name'); $merged_extensions = $plugins->get_merged_extensions(); $merged_plugins = false; $tpl_plugins = array(); +$active_plugins = 0; foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) { @@ -123,6 +124,11 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin) $tpl_plugin['DESC'] = l10n('THIS PLUGIN IS NOW PART OF PIWIGO CORE! DELETE IT NOW.'); $merged_plugins = true; } + + if ($tpl_plugin['STATE'] == 'active') + { + $active_plugins++; + } array_push($tpl_plugins, $tpl_plugin); } @@ -173,6 +179,7 @@ usort($tpl_plugins, 'cmp'); $template->assign(array( 'plugin_display' => $plugin_display, 'plugins' => $tpl_plugins, + 'active_plugins' => $active_plugins, 'PWG_TOKEN' => $pwg_token, )); -- cgit v1.2.3