Skip to content

Commit

Permalink
Fixed replace flag, replacing values have numbers on it.
Browse files Browse the repository at this point in the history
  • Loading branch information
renan committed Nov 5, 2012
1 parent abc94ca commit 1df42f8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/Cake/Console/Command/Task/ProjectTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1df42f8

Please sign in to comment.