diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-06 03:47:36 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-02-06 03:47:36 +0000 |
commit | 80d4df3a4a6fefcf69de5245934b4b0bfc0f8e20 (patch) | |
tree | 7035bf37330fabce2996f6a867c77ea00295b216 /core/models | |
parent | 196ef392ab1dc32154ec8dbe49340d4aefb0d082 (diff) |
Convert all item->type == "album" to item->is_album()
Convert all item->type == "photo" to item->is_photo()
Diffstat (limited to 'core/models')
-rw-r--r-- | core/models/item.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/models/item.php b/core/models/item.php index f78d50b3..e29f3245 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -173,7 +173,7 @@ class Item_Model extends ORM_MPTT { */ public function thumb_path() { return VARPATH . "thumbs/" . $this->relative_path() . - ($this->type == "album" ? "/.album.jpg" : ""); + ($this->is_album() ? "/.album.jpg" : ""); } /** @@ -184,7 +184,7 @@ class Item_Model extends ORM_MPTT { return ($full_uri ? url::abs_file("var/thumbs/" . $this->relative_path()) : url::file("var/thumbs/" . $this->relative_path())) . - ($this->type == "album" ? "/.album.jpg" : ""); + ($this->is_album() ? "/.album.jpg" : ""); } /** @@ -193,7 +193,7 @@ class Item_Model extends ORM_MPTT { */ public function resize_path() { return VARPATH . "resizes/" . $this->relative_path() . - ($this->type == "album" ? "/.album.jpg" : ""); + ($this->is_album() ? "/.album.jpg" : ""); } /** @@ -204,7 +204,7 @@ class Item_Model extends ORM_MPTT { return ($full_uri ? url::abs_file("var/resizes/" . $this->relative_path()) : url::file("var/resizes/" . $this->relative_path())) . - ($this->type == "album" ? "/.album.jpg" : ""); + ($this->is_album() ? "/.album.jpg" : ""); } /** @@ -259,7 +259,7 @@ class Item_Model extends ORM_MPTT { * @return Item_Model or null if there's no cover */ public function album_cover() { - if ($this->type != "album") { + if (!$this->is_album()) { return null; } |