Don't show stackable-error on plugin upgrade (#45)
This commit is contained in:
@ -344,6 +344,8 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
|||||||
|
|
||||||
// we now have to check that the plugin is not already installed, or stackable, to prevent invalid double instances
|
// we now have to check that the plugin is not already installed, or stackable, to prevent invalid double instances
|
||||||
$new_plugin = true;
|
$new_plugin = true;
|
||||||
|
if ($fetchplugin_data['install']) {
|
||||||
|
// spartacus will set this to false on upgrade, and we want to check this only on install
|
||||||
foreach (serendipity_plugin_api::get_installed_plugins() as $pluginName) {
|
foreach (serendipity_plugin_api::get_installed_plugins() as $pluginName) {
|
||||||
if ($serendipity['GET']['install_plugin'] === $pluginName) {
|
if ($serendipity['GET']['install_plugin'] === $pluginName) {
|
||||||
$existingPlugin =& serendipity_plugin_api::load_plugin($serendipity['GET']['install_plugin']);
|
$existingPlugin =& serendipity_plugin_api::load_plugin($serendipity['GET']['install_plugin']);
|
||||||
@ -357,6 +359,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$data['new_plugin_failed'] = ! $new_plugin;
|
$data['new_plugin_failed'] = ! $new_plugin;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user