feature:2260

Keep only two states for plugins (active and inactive)

git-svn-id: http://piwigo.org/svn/trunk@10293 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
patdenice
2011-04-11 10:30:56 +00:00
parent 7282a52838
commit b5592c8228
3 changed files with 22 additions and 37 deletions
+2 -7
View File
@@ -97,16 +97,12 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
}
else
{
$tpl_plugin['STATE'] = 'uninstalled';
$tpl_plugin['STATE'] = 'inactive';
}
if (isset($fs_plugin['extension']) and in_array($fs_plugin['extension'], $_SESSION['merged_extensions']))
{
switch($tpl_plugin['STATE'])
{
case 'active': $plugins->perform_action('deactivate', $plugin_id);
case 'inactive': $plugins->perform_action('uninstall', $plugin_id);
}
$plugins->perform_action('uninstall', $plugin_id);
$tpl_plugin['STATE'] = 'merged';
$tpl_plugin['DESC'] = l10n('THIS PLUGIN IS NOW PART OF PIWIGO CORE! DELETE IT NOW.');
$merged_plugins = true;
@@ -117,7 +113,6 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
$template->append('plugin_states', 'active');
$template->append('plugin_states', 'inactive');
$template->append('plugin_states', 'uninstalled');
if ($merged_plugins)
{