mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
44fa8d5fd0
commit
f712d84d33
4 changed files with 5 additions and 5 deletions
|
@ -199,7 +199,7 @@ class SchemaShell extends Shell {
|
|||
}
|
||||
}
|
||||
$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);
|
||||
if ($write) {
|
||||
if (strpos($write, '.sql') === false) {
|
||||
|
|
|
@ -484,7 +484,7 @@ class ControllerTask extends Shell {
|
|||
$this->out("\nBaking unit test for $className...");
|
||||
|
||||
$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);
|
||||
}
|
||||
/**
|
||||
|
|
|
@ -733,7 +733,7 @@ class ModelTask extends Shell {
|
|||
$this->out("\nBaking unit test for $className...");
|
||||
|
||||
$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 false;
|
||||
|
@ -927,7 +927,7 @@ class ModelTask extends Shell {
|
|||
}
|
||||
$filename = Inflector::underscore($model).'_fixture.php';
|
||||
$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...");
|
||||
if ($this->createFile($path . $filename, $content)) {
|
||||
return str_replace("\t\t", "\t\t\t", $records);
|
||||
|
|
|
@ -181,7 +181,7 @@ class TestTask extends Shell {
|
|||
}
|
||||
|
||||
$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);
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue