mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Applying patches from 'wals' to fix uses where incorrect parameters were being passed into methods, and making methods match their documentation blocks. Fixes #668
This commit is contained in:
parent
ec10a01504
commit
96d0119abc
2 changed files with 4 additions and 4 deletions
|
@ -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
|
* @return string Singular model key
|
||||||
* @access protected
|
* @access protected
|
||||||
*/
|
*/
|
||||||
function _modelKey($name) {
|
function _modelKey($name) {
|
||||||
return Inflector::underscore(Inflector::singularize($name)) . '_id';
|
return Inflector::underscore($name) . '_id';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -287,7 +287,7 @@ class ControllerTask extends BakeTask {
|
||||||
$controllerPath = $this->_controllerPath($controllerName);
|
$controllerPath = $this->_controllerPath($controllerName);
|
||||||
$pluralName = $this->_pluralName($currentModelName);
|
$pluralName = $this->_pluralName($currentModelName);
|
||||||
$singularName = Inflector::variable($currentModelName);
|
$singularName = Inflector::variable($currentModelName);
|
||||||
$singularHumanName = $this->_singularHumanName($currentModelName);
|
$singularHumanName = $this->_singularHumanName($controllerName);
|
||||||
$pluralHumanName = $this->_pluralName($controllerName);
|
$pluralHumanName = $this->_pluralName($controllerName);
|
||||||
|
|
||||||
$this->Template->set(compact('admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName',
|
$this->Template->set(compact('admin', 'controllerPath', 'pluralName', 'singularName', 'singularHumanName',
|
||||||
|
|
Loading…
Add table
Reference in a new issue