From 99e6072fd396310816b055d04fd08321ee4f7e45 Mon Sep 17 00:00:00 2001 From: "Gordon Pettey (petteyg)" Date: Fri, 18 Nov 2011 05:00:45 +0000 Subject: [PATCH] Make App::path('Console') overwrite App::core('Console') for themes --- lib/Cake/Console/Command/Task/TemplateTask.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Console/Command/Task/TemplateTask.php b/lib/Cake/Console/Command/Task/TemplateTask.php index ee517cc9d..602f8a617 100644 --- a/lib/Cake/Console/Command/Task/TemplateTask.php +++ b/lib/Cake/Console/Command/Task/TemplateTask.php @@ -57,7 +57,7 @@ class TemplateTask extends Shell { * @return array Array of bake themes that are installed. */ protected function _findThemes() { - $paths = App::path('Console'); + $paths = array(); $core = current(App::core('Console')); $separator = DS === '/' ? '/' : '\\\\'; $core = preg_replace('#shells' . $separator . '$#', '', $core); @@ -68,10 +68,12 @@ class TemplateTask extends Shell { $themeFolders = $contents[0]; $plugins = App::objects('plugin'); + $paths[] = $core; foreach ($plugins as $plugin) { $paths[] = $this->_pluginPath($plugin) . 'Console' . DS; } - $paths[] = $core; + + $paths = array_merge($paths, App::path('Console')); // TEMPORARY TODO remove when all paths are DS terminated foreach ($paths as $i => $path) {