Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Rearranged the if statement
Browse files Browse the repository at this point in the history
It will be quicker to check for null everytime than the $plugin variable
  • Loading branch information
rcorral committed Jun 24, 2011
1 parent 92c9560 commit cab6df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/joomla/plugin/helper.php
Expand Up @@ -99,7 +99,7 @@ public static function importPlugin($type, $plugin = null, $autocreate = true, $

// Get the specified plugin(s).
for ($i = 0, $t = count($plugins); $i < $t; $i++) {
if ($plugins[$i]->type == $type && ($plugins[$i]->name == $plugin || $plugin === null)) {
if ($plugins[$i]->type == $type && ($plugin === null || $plugins[$i]->name == $plugin)) {
self::_import($plugins[$i], $autocreate, $dispatcher);
$results = true;
}
Expand Down

0 comments on commit cab6df8

Please sign in to comment.