Skip to content

Commit

Permalink
Use more readable variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
ravage84 committed Apr 3, 2017
1 parent 6cdb2d2 commit 9be647c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Cake/Core/CakePlugin.php
Expand Up @@ -124,6 +124,7 @@ public static function load($plugin, $config = array()) {

/**
* Will load all the plugins located in the configured plugins folders
*
* If passed an options array, it will be used as a common default for all plugins to be loaded
* It is possible to set specific defaults for each plugins in the options array. Examples:
*
Expand Down Expand Up @@ -155,12 +156,12 @@ public static function load($plugin, $config = array()) {
*/
public static function loadAll($options = array()) {
$plugins = App::objects('plugins');
foreach ($plugins as $p) {
$opts = isset($options[$p]) ? (array)$options[$p] : array();
foreach ($plugins as $plugin) {
$pluginOptions = isset($options[$plugin]) ? (array)$options[$plugin] : array();
if (isset($options[0])) {
$opts += $options[0];
$pluginOptions += $options[0];
}
static::load($p, $opts);
static::load($plugin, $pluginOptions);
}
}

Expand Down

0 comments on commit 9be647c

Please sign in to comment.