Changeset 438768
- Timestamp:
- 09/15/2011 09:28:43 PM (15 years ago)
- Location:
- wp-mvc
- Files:
-
- 2 edited
-
tags/1.1.1/core/models/mvc_model.php (modified) (1 diff)
-
trunk/core/models/mvc_model.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-mvc/tags/1.1.1/core/models/mvc_model.php
r390534 r438768 67 67 } 68 68 $model_data = $data[$this->name]; 69 if (method_exists($this, 'before_save')) { 70 if (!$this->before_save($model_data)) { 71 return false; 72 } 73 } 69 74 $id = $this->insert($model_data); 70 75 $this->update_associations($id, $model_data); 76 if (method_exists($this, 'after_save')) { 77 $object = $this->find_by_id($id); 78 $this->after_save($object); 79 } 71 80 return $id; 72 81 } -
wp-mvc/trunk/core/models/mvc_model.php
r390534 r438768 67 67 } 68 68 $model_data = $data[$this->name]; 69 if (method_exists($this, 'before_save')) { 70 if (!$this->before_save($model_data)) { 71 return false; 72 } 73 } 69 74 $id = $this->insert($model_data); 70 75 $this->update_associations($id, $model_data); 76 if (method_exists($this, 'after_save')) { 77 $object = $this->find_by_id($id); 78 $this->after_save($object); 79 } 71 80 return $id; 72 81 }
Note: See TracChangeset
for help on using the changeset viewer.