Skip to content

Commit

Permalink
Removing some code duplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 11, 2010
1 parent 22fbc24 commit 052c817
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cake/libs/view/view.php
Expand Up @@ -667,12 +667,9 @@ public function __get($name) {
* @return void
*/
public function loadHelpers() {
foreach ($this->helpers as $i => $helper) {
$options = array();
if (!is_int($i)) {
list($options, $helper) = array($helper, $i);
}
$this->Helpers->load($helper, $options, true);
$helpers = HelperCollection::normalizeObjectArray($this->helpers);
foreach ($helpers as $name => $properties) {
$this->Helpers->load($properties['class'], $properties['settings'], true);
}
}

Expand Down

0 comments on commit 052c817

Please sign in to comment.