Permalink
Browse files

Ensure updated-timestamp is correct

  • Loading branch information...
NateFerrero committed Apr 4, 2012
1 parent 523e31a commit 100a2397a8dfb68698bd638f96787f910acaa850
Showing with 8 additions and 0 deletions.
  1. +8 −0 library/model.php
View
@@ -390,6 +390,14 @@ public function save($data = false) {
if($this->_data['id'] === 0)
throw new Exception("Model insert failed on `$this->_table`: ");
}
+
+ /**
+ * Modify the updated timestamp from mysql
+ * @author Nate Ferrero
+ */
+ $row = $this->_connection->select_by_id($this->_table, $this->id)->row();
+ if(isset($row['updated_timestamp']))
+ $this->updated_timestamp = $row['updated_timestamp'];
/**
* Let everything know afterward

0 comments on commit 100a239

Please sign in to comment.