aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-09 00:51:17 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-05-09 00:51:17 +0000
commitf1de8bebee841749c342df0a34591a84d8d5d4e3 (patch)
tree3b0ae0d94872b5d1565475ecb385169b48faf078 /engine/classes
parentdb3176d97ac0d9cb725c2c42e08f1b0399047be9 (diff)
downloadelgg-f1de8bebee841749c342df0a34591a84d8d5d4e3.tar.gz
elgg-f1de8bebee841749c342df0a34591a84d8d5d4e3.tar.bz2
Fixes 3426. Not using a horrible variable name and fixing the bug created by it.
git-svn-id: http://code.elgg.org/elgg/trunk@9057 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggPluginPackage.php13
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';