From dc85d21f0531400a53426035a466f21b7cab0eb1 Mon Sep 17 00:00:00 2001 From: Heath Nail Date: Tue, 17 May 2011 14:34:10 -0400 Subject: [PATCH] Dots appear in the text searched for, added to search pattern. The define statement in skel/webroot/index.php contains dots. Added \. to the search pattern so that bake will update the core path in webroot/index.php --- lib/Cake/Console/Command/Task/ProjectTask.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index bfa87f167..b949ccd8a 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -282,7 +282,7 @@ class ProjectTask extends Shell { if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) { $File = new File($path . 'webroot' . DS . 'index.php'); $contents = $File->read(); - if (preg_match('/([\s]*define\(\'CAKE_CORE_INCLUDE_PATH\',[\s\'A-z0-9]*\);)/', $contents, $match)) { + if (preg_match('/([\s]*define\(\'CAKE_CORE_INCLUDE_PATH\',[\s\'A-z0-9\.]*\);)/', $contents, $match)) { $root = strpos(CAKE_CORE_INCLUDE_PATH, '/') === 0 ? " DS . '" : "'"; $result = str_replace($match[0], "\n\t\tdefine('CAKE_CORE_INCLUDE_PATH', " . $root . str_replace(DS, "' . DS . '", trim(CAKE_CORE_INCLUDE_PATH, DS)) . "');", $contents); if (!$File->write($result)) {