From fa80be50ebb271a6e61522115b8fa5a20cde025d Mon Sep 17 00:00:00 2001 From: Rachman Chavik Date: Fri, 25 Nov 2011 08:45:33 +0700 Subject: [PATCH] Removing timestamp lines from generated files This causes unnecessary diff chunks, and we should depend more on the SCM instead of these values. --- lib/Cake/Console/Command/SchemaShell.php | 3 +-- lib/Cake/Console/Templates/default/classes/fixture.ctp | 2 -- lib/Cake/Console/Templates/default/classes/test.ctp | 1 - lib/Cake/Model/CakeSchema.php | 2 +- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 8318892e5..e53708952 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -218,8 +218,7 @@ class SchemaShell extends Shell { } } $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) { diff --git a/lib/Cake/Console/Templates/default/classes/fixture.ctp b/lib/Cake/Console/Templates/default/classes/fixture.ctp index 64f1d1a36..edb322662 100644 --- a/lib/Cake/Console/Templates/default/classes/fixture.ctp +++ b/lib/Cake/Console/Templates/default/classes/fixture.ctp @@ -20,8 +20,6 @@ */ ?> -/* Fixture generated on: */ - /** * Fixture * diff --git a/lib/Cake/Console/Templates/default/classes/test.ctp b/lib/Cake/Console/Templates/default/classes/test.ctp index 4677ab649..7434963d1 100644 --- a/lib/Cake/Console/Templates/default/classes/test.ctp +++ b/lib/Cake/Console/Templates/default/classes/test.ctp @@ -18,7 +18,6 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ echo " App::uses('', ''); diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 00c6941f0..5637d2dbb 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -379,7 +379,7 @@ class CakeSchema extends Object { $out .= "}\n"; $file = new SplFileObject($path . DS . $file, 'w+'); - $content = ""; + $content = "fwrite($content)) { return $content; }