Applying patch from 'slywalker'. Updating datetime generation in baked files.

Fixed #6505

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8229 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
mark_story 2009-07-14 02:30:51 +00:00
parent 44fa8d5fd0
commit f712d84d33
4 changed files with 5 additions and 5 deletions

View file

@ -199,7 +199,7 @@ class SchemaShell extends Shell {
} }
} }
$db =& ConnectionManager::getDataSource($this->Schema->connection); $db =& ConnectionManager::getDataSource($this->Schema->connection);
$contents = "#". $Schema->name ." sql generated on: " . date('Y-m-d H:m:s') . " : ". time()."\n\n"; $contents = "#". $Schema->name ." sql generated on: " . date('Y-m-d H:i:s') . " : ". time()."\n\n";
$contents .= $db->dropSchema($Schema) . "\n\n". $db->createSchema($Schema); $contents .= $db->dropSchema($Schema) . "\n\n". $db->createSchema($Schema);
if ($write) { if ($write) {
if (strpos($write, '.sql') === false) { if (strpos($write, '.sql') === false) {

View file

@ -484,7 +484,7 @@ class ControllerTask extends Shell {
$this->out("\nBaking unit test for $className..."); $this->out("\nBaking unit test for $className...");
$header = '$Id'; $header = '$Id';
$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $className ."Controller Test cases generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>"; $content = "<?php \n/* SVN FILE: $header$ */\n/* ". $className ."Controller Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
return $this->createFile($path . $filename, $content); return $this->createFile($path . $filename, $content);
} }
/** /**

View file

@ -733,7 +733,7 @@ class ModelTask extends Shell {
$this->out("\nBaking unit test for $className..."); $this->out("\nBaking unit test for $className...");
$header = '$Id'; $header = '$Id';
$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $className ." Test cases generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>"; $content = "<?php \n/* SVN FILE: $header$ */\n/* ". $className ." Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
return $this->createFile($path . $filename, $content); return $this->createFile($path . $filename, $content);
} }
return false; return false;
@ -927,7 +927,7 @@ class ModelTask extends Shell {
} }
$filename = Inflector::underscore($model).'_fixture.php'; $filename = Inflector::underscore($model).'_fixture.php';
$header = '$Id'; $header = '$Id';
$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $model ." Fixture generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>"; $content = "<?php \n/* SVN FILE: $header$ */\n/* ". $model ." Fixture generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
$this->out("\nBaking test fixture for $model..."); $this->out("\nBaking test fixture for $model...");
if ($this->createFile($path . $filename, $content)) { if ($this->createFile($path . $filename, $content)) {
return str_replace("\t\t", "\t\t\t", $records); return str_replace("\t\t", "\t\t\t", $records);

View file

@ -181,7 +181,7 @@ class TestTask extends Shell {
} }
$header = '$Id'; $header = '$Id';
$content = "<?php \n/* SVN FILE: $header$ */\n/* ". $name ." Test cases generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n{$out}?>"; $content = "<?php \n/* SVN FILE: $header$ */\n/* ". $name ." Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
return $this->createFile($this->filePath . Inflector::underscore($name) . '.test.php', $content); return $this->createFile($this->filePath . Inflector::underscore($name) . '.test.php', $content);
} }
/** /**