From 80d4df3a4a6fefcf69de5245934b4b0bfc0f8e20 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 6 Feb 2009 03:47:36 +0000 Subject: Convert all item->type == "album" to item->is_album() Convert all item->type == "photo" to item->is_photo() --- core/models/item.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'core/models/item.php') 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; } -- cgit v1.2.3