Skip to content
Permalink
Browse files

Fixed replace flag, replacing values have numbers on it.

  • Loading branch information...
renan committed Nov 5, 2012
1 parent abc94ca commit 1df42f82f1cadba36952c9f4a1021bb6b178fa6d
Showing with 3 additions and 7 deletions.
  1. +3 −7 lib/Cake/Console/Command/Task/ProjectTask.php
@@ -260,7 +260,7 @@ public function securitySalt($path) {
$newSalt = Security::generateAuthKey();
$contents = preg_replace(
"/^(\s+'salt'\s+\=\>\s+')([^']+)(',)/m",
'\\1' . $newSalt . '\\3',
'${1}' . $newSalt . '\\3',
$contents,
-1,
$count
@@ -283,7 +283,7 @@ public function securityCipherSeed($path) {
$newCipher = substr(bin2hex(Security::generateAuthKey()), 0, 30);
$contents = preg_replace(
"/^(\s+'cipherSeed'\s+\=\>\s+')([^']+)(',)/m",
'\\1' . $newCipher . '\\3',
'${1}' . $newCipher . '\\3',
$contents,
-1,
$count
@@ -320,11 +320,7 @@ public function cachePrefix($dir) {
*/
public function corePath($path, $hardCode = true) {
if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) {
$filename = $path . 'webroot/index.php';
if (!$this->_replaceCorePath($filename, $hardCode)) {
return false;
}
$filename = $path . 'webroot/test.php';
$filename = $path . 'Config/paths.php';
if (!$this->_replaceCorePath($filename, $hardCode)) {
return false;
}

0 comments on commit 1df42f8

Please sign in to comment.
You can’t perform that action at this time.