aboutsummaryrefslogtreecommitdiffstats
path: root/admin/plugins_installed.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2011-05-25 10:54:59 +0000
committerpatdenice <patdenice@piwigo.org>2011-05-25 10:54:59 +0000
commitd8718a6d73cb203f3875f31dc38c2978e0484834 (patch)
tree08881e707cbb2730ac2daa38a5e1a429b67c10f3 /admin/plugins_installed.php
parentd9fbe9bbe9a7686fd85e0ad6e3a21bdf07b87c5c (diff)
merge r11043 from branch 2.2 to trunk
feature:2250 Add obsolete_extensions.list file in install directory. Incompatible plugins is checked through ajax. git-svn-id: http://piwigo.org/svn/trunk@11047 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/plugins_installed.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/admin/plugins_installed.php b/admin/plugins_installed.php
index 4cefe45e4..26ba295e2 100644
--- a/admin/plugins_installed.php
+++ b/admin/plugins_installed.php
@@ -64,13 +64,26 @@ if (isset($_GET['action']) and isset($_GET['plugin']))
}
}
+//--------------------------------------------------------Incompatible Plugins
+if (isset($_GET['incompatible_plugins']))
+{
+ $incompatible_plugins = array();
+ foreach ($plugins->get_incompatible_plugins() as $plugin => $version)
+ {
+ if ($plugin == '~~expire~~') continue;
+ array_push($incompatible_plugins, $plugin);
+
+ }
+ echo json_encode($incompatible_plugins);
+ exit;
+}
+
// +-----------------------------------------------------------------------+
// | start template output |
// +-----------------------------------------------------------------------+
$plugins->sort_fs_plugins('name');
-$plugins->get_merged_extensions();
-$plugins->get_incompatible_plugins();
+$merged_extensions = $plugins->get_merged_extensions();
$merged_plugins = false;
$tpl_plugins = array();
@@ -80,7 +93,7 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
and $fs_plugin['version'] != $_SESSION['incompatible_plugins'][$plugin_id])
{
// Incompatible plugins must be reinitilized
- $plugins->get_incompatible_plugins(true);
+ unset($_SESSION['incompatible_plugins']);
}
$tpl_plugin = array(
@@ -92,7 +105,6 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
'AUTHOR' => $fs_plugin['author'],
'AUTHOR_URL' => @$fs_plugin['author uri'],
'U_ACTION' => sprintf($action_url, $plugin_id),
- 'INCOMPATIBLE' => isset($_SESSION['incompatible_plugins'][$plugin_id]),
);
if (isset($plugins->db_plugins_by_id[$plugin_id]))
@@ -104,7 +116,7 @@ foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
$tpl_plugin['STATE'] = 'inactive';
}
- if (isset($fs_plugin['extension']) and in_array($fs_plugin['extension'], $_SESSION['merged_extensions']))
+ if (isset($fs_plugin['extension']) and isset($merged_extensions[$fs_plugin['extension']]))
{
$plugins->perform_action('uninstall', $plugin_id);
$tpl_plugin['STATE'] = 'merged';