From 96d0119abcb1b2f893d865c34f4811168b1e1606 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Mon, 10 May 2010 23:58:22 -0400 Subject: [PATCH] Applying patches from 'wals' to fix uses where incorrect parameters were being passed into methods, and making methods match their documentation blocks. Fixes #668 --- cake/console/libs/shell.php | 6 +++--- cake/console/libs/tasks/controller.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index b736a64d7..65333f01d 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -570,14 +570,14 @@ class Shell extends Object { } /** - * Creates the proper singular model key for associations + * Creates the proper underscored model key for associations * - * @param string $name Controller class name + * @param string $name Model class name * @return string Singular model key * @access protected */ function _modelKey($name) { - return Inflector::underscore(Inflector::singularize($name)) . '_id'; + return Inflector::underscore($name) . '_id'; } /** diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index 62bcb7660..36fd91600 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -287,7 +287,7 @@ class ControllerTask extends BakeTask { $controllerPath = $this->_controllerPath($controllerName); $pluralName = $this->_pluralName($currentModelName); $singularName = Inflector::variable($currentModelName); - $singularHumanName = $this->_singularHumanName($currentModelName); + $singularHumanName = $this->_singularHumanName($controllerName); $pluralHumanName = $this->_pluralName($controllerName); $this->Template->set(compact('admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName',