mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-11 01:33:51 -04:00
Change the API for getting to the original state of an ORM.
Old API: $obj->original("field_name")
New API: $obj->original()->field_name
This allows us to revert the varous xxx_updated events back to passing
an original ORM as well as the the updated one. This makes for a
cleaner event API.
Old API: comment_updated($comment) { $comment->original("field_name") }
Old API: comment_updated($old, $new) { $old->field_name }
This commit is contained in:
@@ -68,7 +68,7 @@ class User_Model extends ORM {
|
||||
if (isset($created)) {
|
||||
module::event("user_created", $this);
|
||||
} else {
|
||||
module::event("user_updated", $this);
|
||||
module::event("user_updated", $this->original(), $this);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user