From 52169a419772ed11ed982b0649bb65307ac38cc4 Mon Sep 17 00:00:00 2001 From: jwage Date: Wed, 23 Jan 2008 08:22:42 +0000 Subject: [PATCH] fixes #648 --- lib/Doctrine/Template/Listener/Timestampable.php | 2 +- lib/Doctrine/Template/Timestampable.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/Template/Listener/Timestampable.php b/lib/Doctrine/Template/Listener/Timestampable.php index 3756e98d7..00a08ad15 100644 --- a/lib/Doctrine/Template/Listener/Timestampable.php +++ b/lib/Doctrine/Template/Listener/Timestampable.php @@ -63,7 +63,7 @@ class Doctrine_Template_Listener_Timestampable extends Doctrine_Record_Listener $event->getInvoker()->$createdName = $this->getTimestamp('created'); } - if( ! $this->_options['updated']['disabled']) { + if( ! $this->_options['updated']['disabled'] && $this->_options['updated']['onInsert']) { $updatedName = $this->_options['updated']['name']; $event->getInvoker()->$updatedName = $this->getTimestamp('updated'); } diff --git a/lib/Doctrine/Template/Timestampable.php b/lib/Doctrine/Template/Timestampable.php index 5718cbb20..4220b9185 100644 --- a/lib/Doctrine/Template/Timestampable.php +++ b/lib/Doctrine/Template/Timestampable.php @@ -50,6 +50,7 @@ class Doctrine_Template_Timestampable extends Doctrine_Template 'format' => 'Y-m-d H:i:s', 'disabled' => false, 'expression' => false, + 'onInsert' => true, 'options' => array())); /**