DataObjects/Projects.php
authorChris <chris@roojs.com>
Tue, 12 Jun 2012 07:44:59 +0000 (15:44 +0800)
committerChris <chris@roojs.com>
Tue, 12 Jun 2012 07:44:59 +0000 (15:44 +0800)
DataObjects/Projects.php

index d5c9e20..869cfc9 100644 (file)
@@ -182,6 +182,8 @@ class Pman_Core_DataObjects_Projects extends DB_DataObject
         $oo = clone($this);
         if (empty($this->code)) {
             $this->code = 'C' + $this->client_id + '-P' + $this->id;
+            $dt = new DateTime();
+            $this->updated_dt = $dt->format('Y-m-d H:i:s');
             $this->update($oo);
         }
     }
@@ -191,6 +193,8 @@ class Pman_Core_DataObjects_Projects extends DB_DataObject
         $oo = clone($this);
         if (empty($this->code)) {
             $this->code = 'C' + $this->client_id + '-P' + $this->id;
+            $dt = new DateTime();
+            $this->updated_dt = $dt->format('Y-m-d H:i:s');
             $this->update($oo);
         }