diff options
author | diosmosis <benakamoorthi@fastmail.fm> | 2014-09-04 14:30:51 +0400 |
---|---|---|
committer | diosmosis <benakamoorthi@fastmail.fm> | 2014-09-04 14:33:05 +0400 |
commit | a7fa0a129150b076d93b359f20fee3fb2d7d86d0 (patch) | |
tree | c37920f9c93747e56dfe12d0747f2943eb4b8651 /plugins/CorePluginsAdmin | |
parent | 204278509b24be69ccc87c4a62bbc39a75afd2ab (diff) |
Refs #6092, last related commit probably won't fix the issue, this should do it.
Diffstat (limited to 'plugins/CorePluginsAdmin')
-rw-r--r-- | plugins/CorePluginsAdmin/Marketplace.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/CorePluginsAdmin/Marketplace.php b/plugins/CorePluginsAdmin/Marketplace.php index b9238fd158..3b876131cf 100644 --- a/plugins/CorePluginsAdmin/Marketplace.php +++ b/plugins/CorePluginsAdmin/Marketplace.php @@ -110,18 +110,15 @@ class Marketplace try { $pluginsHavingUpdate = $this->client->getInfoOfPluginsHavingUpdate($loadedPlugins, $themesOnly); - } catch (\Exception $e) { $pluginsHavingUpdate = array(); } foreach ($pluginsHavingUpdate as &$updatePlugin) { foreach ($loadedPlugins as $loadedPlugin) { - if (!empty($updatePlugin['name']) && $loadedPlugin->getPluginName() == $updatePlugin['name'] ) { - $updatePlugin['currentVersion'] = $loadedPlugin->getVersion(); $updatePlugin['isActivated'] = $pluginManager->isPluginActivated($updatePlugin['name']); $updatePlugin = $this->addMissingRequirements($updatePlugin); @@ -130,6 +127,15 @@ class Marketplace } } + // remove plugins that have updates but for some reason are not loaded + foreach ($pluginsHavingUpdate as $key => $updatePlugin) { + if (empty($updatePlugin['currentVersion']) + || empty($updatePlugin['isActivated']) + ) { + unset($pluginsHavingUpdate[$key]); + } + } + return $pluginsHavingUpdate; } |