From 84ce0cdefda162917c7b01722a7259ac52c4e30d Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 27 May 2009 19:59:54 -0700 Subject: Normalize root update time in the installer Rebuild install.sql --- modules/gallery/controllers/scaffold.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/gallery/controllers') diff --git a/modules/gallery/controllers/scaffold.php b/modules/gallery/controllers/scaffold.php index 5b8f9aa9..95a213f9 100644 --- a/modules/gallery/controllers/scaffold.php +++ b/modules/gallery/controllers/scaffold.php @@ -350,7 +350,9 @@ class Scaffold_Controller extends Template_Controller { // Post-process the sql file $buf = ""; - $root_timestamp = ORM::factory("item", 1)->created; + $root = ORM::factory("item", 1); + $root_created_timestamp = $root->created; + $root_updated_timestamp = $root->updated; foreach (file($sql_file) as $line) { // Prefix tables $line = preg_replace( @@ -358,7 +360,8 @@ class Scaffold_Controller extends Template_Controller { $line); // Normalize dates - $line = preg_replace("/,$root_timestamp,/", ",UNIX_TIMESTAMP(),", $line); + $line = preg_replace("/,$root_created_timestamp,/", ",UNIX_TIMESTAMP(),", $line); + $line = preg_replace("/,$root_updated_timestamp,/", ",UNIX_TIMESTAMP(),", $line); $buf .= $line; } $fd = fopen($sql_file, "wb"); -- cgit v1.2.3