From d8718a6d73cb203f3875f31dc38c2978e0484834 Mon Sep 17 00:00:00 2001 From: patdenice Date: Wed, 25 May 2011 10:54:59 +0000 Subject: 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 --- admin/plugins_installed.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'admin/plugins_installed.php') 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'; -- cgit v1.2.3