diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-01-27 22:34:11 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-27 22:34:11 -0800 |
commit | 4b32a71afc7650fe7bdd02ba384c8914f60538f3 (patch) | |
tree | 66fea701b9324c1de79c31c548b643f331566223 /modules/gallery/models | |
parent | cfbbf9ef606094868ccbd25ccf65e1a6f610528b (diff) |
Convert back to using ORM::factory(..., $id) instead of calling where().
Diffstat (limited to 'modules/gallery/models')
-rw-r--r-- | modules/gallery/models/item.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 9706d61f..ae1b6608 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -423,7 +423,7 @@ class Item_Model extends ORM_MPTT { // If any significant fields have changed, load up a copy of the original item and // keep it around. - $original = ORM::factory("item")->where("id", "=", $this->id)->find(); + $original = ORM::factory("item", $this->id); if (array_intersect($this->changed, array("parent_id", "name", "slug"))) { $original->_build_relative_caches(); $this->relative_path_cache = null; @@ -787,7 +787,7 @@ class Item_Model extends ORM_MPTT { if ($this->is_movie() || $this->is_photo()) { if ($this->loaded()) { // Existing items can't change their extension - $original = ORM::factory("item")->where("id", "=", $this->id)->find(); + $original = ORM::factory("item", $this->id); $new_ext = pathinfo($this->name, PATHINFO_EXTENSION); $old_ext = pathinfo($original->name, PATHINFO_EXTENSION); if (strcasecmp($new_ext, $old_ext)) { |