diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggPluginPackage.php | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engine/classes/ElggPluginPackage.php b/engine/classes/ElggPluginPackage.php index bad99362f..9aa4af8bf 100644 --- a/engine/classes/ElggPluginPackage.php +++ b/engine/classes/ElggPluginPackage.php @@ -455,8 +455,8 @@ class ElggPluginPackage { */ private function checkDepPriority(array $dep, array $plugins, $inverse = false) { // grab the ElggPlugin using this package. - $this_plugin = elgg_get_plugin_from_id($this->getID()); - $this_priority = $this_plugin->getPriority(); + $plugin_package = elgg_get_plugin_from_id($this->getID()); + $plugin_priority = $plugin_package->getPriority(); foreach ($plugins as $test_plugin) { if ($test_plugin->getID() == $dep['plugin']) { @@ -466,8 +466,7 @@ class ElggPluginPackage { // If this isn't a plugin or there are no active plugins, // we can't satisfy this dep. - // Assume everything is ok. See #2946. - if (!$this->plugin || !$plugins) { + if (!$plugin_package || !$plugins) { return array( 'status' => true, 'value' => 'uninstalled' @@ -478,11 +477,11 @@ class ElggPluginPackage { switch ($dep['priority']) { case 'before': - $status = $this_priority < $test_plugin_priority; + $status = $plugin_priority < $test_plugin_priority; break; case 'after': - $status = $this_priority > $test_plugin_priority; + $status = $plugin_priority > $test_plugin_priority; break; default; @@ -490,7 +489,7 @@ class ElggPluginPackage { } // get the current value - if ($this_priority < $test_plugin_priority) { + if ($plugin_priority < $test_plugin_priority) { $value = 'before'; } else { $value = 'after'; |