Skip to content

Commit

Permalink
Removing timestamp lines from generated files
Browse files Browse the repository at this point in the history
This causes unnecessary diff chunks, and we should depend more on
the SCM instead of these values.
  • Loading branch information
rchavik committed Nov 25, 2011
1 parent 7e790aa commit fa80be5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/Cake/Console/Command/SchemaShell.php
Expand Up @@ -218,8 +218,7 @@ public function dump() {
}
}
$db = ConnectionManager::getDataSource($this->Schema->connection);
$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 = "\n\n" . $db->dropSchema($Schema) . "\n\n". $db->createSchema($Schema);

if ($write) {
if (strpos($write, '.sql') === false) {
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Console/Templates/default/classes/fixture.ctp
Expand Up @@ -20,8 +20,6 @@
*/
?>
<?php echo '<?php' . "\n"; ?>
/* <?php echo $model; ?> Fixture generated on: <?php echo date('Y-m-d H:i:s') . " : ". time(); ?> */

/**
* <?php echo $model; ?>Fixture
*
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Console/Templates/default/classes/test.ctp
Expand Up @@ -18,7 +18,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
echo "<?php\n";
echo "/* ". $className ." Test cases generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n";
?>
App::uses('<?php echo $fullClassName; ?>', '<?php echo $realType; ?>');

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/CakeSchema.php
Expand Up @@ -379,7 +379,7 @@ public function write($object, $options = array()) {
$out .= "}\n";

$file = new SplFileObject($path . DS . $file, 'w+');
$content = "<?php \n/* {$name} schema generated on: " . date('Y-m-d H:i:s') . " : ". time() . "*/\n{$out}?>";
$content = "<?php\n{$out}";
if ($file->fwrite($content)) {
return $content;
}
Expand Down

0 comments on commit fa80be5

Please sign in to comment.