mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fixing plugin prefix handling when using plugin task to bake plugin controllers. Plugin Models are correctly found, allowing bake to work.
Fixes #5069 git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8199 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
1ea5f94c29
commit
a2a7727c00
1 changed files with 5 additions and 2 deletions
|
@ -243,8 +243,11 @@ class ControllerTask extends Shell {
|
|||
* @access private
|
||||
*/
|
||||
function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
|
||||
$currentModelName = $this->_modelName($controllerName);
|
||||
if (!App::import('Model', $currentModelName)) {
|
||||
$currentModelName = $modelImport = $this->_modelName($controllerName);
|
||||
if ($this->plugin) {
|
||||
$modelImport = $this->plugin . '.' . $modelImport;
|
||||
}
|
||||
if (!App::import('Model', $modelImport)) {
|
||||
$this->err(__('You must have a model for this class to build scaffold methods. Please try again.', true));
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue