Simplifying code

This commit is contained in:
Jose Lorenzo Rodriguez 2011-04-27 00:15:42 -04:30
parent 84538ac10a
commit 228230e67b

View file

@ -521,8 +521,8 @@ class Controller extends Object {
$this->__mergeVars(); $this->__mergeVars();
$this->Components->init($this); $this->Components->init($this);
if ($this->uses) { if ($this->uses) {
$this->uses = $uses = is_array($this->uses) ? $this->uses : array($this->uses); $this->uses = (array) $this->uses;
list(, $this->modelClass) = pluginSplit($uses[0]); list(, $this->modelClass) = pluginSplit(current($this->uses));
} }
return true; return true;
} }