From cd5aee1bfad681fb0517449ab45873daf25e39de Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 16 May 2010 23:50:17 -0400 Subject: [PATCH] Applying patch from 'franiglesias'. Fixes issues where str_replace would greedily replace too many occurences of 'libs/'. Fixes #724 --- cake/console/libs/tasks/template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/console/libs/tasks/template.php b/cake/console/libs/tasks/template.php index 5f3f3a5fb..f4338234c 100644 --- a/cake/console/libs/tasks/template.php +++ b/cake/console/libs/tasks/template.php @@ -54,7 +54,7 @@ class TemplateTask extends Shell { function _findThemes() { $paths = App::path('shells'); $core = array_pop($paths); - $core = str_replace('libs' . DS, '', $core); + $core = preg_replace('#libs' . DS . '$#', '', $core); $paths[] = $core; $Folder =& new Folder($core . 'templates' . DS . 'default'); $contents = $Folder->read();