From 1707c92aa1c530e8750bf6325c012444cebc780e Mon Sep 17 00:00:00 2001 From: mark_story Date: Tue, 14 Sep 2010 23:15:10 -0400 Subject: [PATCH] Removing duplicated code. --- cake/libs/controller/controller.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 0b2e55c35..a9b11759d 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -497,10 +497,7 @@ class Controller extends Object { $this->loadModel($this->modelClass, $id); } elseif ($this->uses) { $uses = is_array($this->uses) ? $this->uses : array($this->uses); - $modelClassName = $uses[0]; - if (strpos($uses[0], '.') !== false) { - list($plugin, $modelClassName) = explode('.', $uses[0]); - } + list($plugin, $modelClassName) = pluginSplit($uses[0]); $this->modelClass = $modelClassName; foreach ($uses as $modelClass) { $this->loadModel($modelClass);