From 39962eaddc17f27eb1baa694ac588138439621d4 Mon Sep 17 00:00:00 2001 From: Romain LE DISEZ Date: Sun, 4 Jul 2010 21:53:57 +0200 Subject: Accept extension .m4v as video/mp4 --- modules/gallery/models/item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gallery/models') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 4d05e4da..eb200fa5 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -364,7 +364,7 @@ class Item_Model extends ORM_MPTT { $this->name .= "." . $pi["extension"]; } - $this->mime_type = strtolower($pi["extension"]) == "mp4" ? "video/mp4" : "video/x-flv"; + $this->mime_type = in_array(strtolower($pi["extension"]), array("mp4", "m4v")) ? "video/mp4" : "video/x-flv"; } } -- cgit v1.2.3 From 3f48f17e541cb69fdfd1ce0043121969cb98b28b Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 29 Jul 2010 19:41:03 -0700 Subject: We don't care about the name and slug for the root album so don't bother enforcing them. --- modules/gallery/models/item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/gallery/models') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index eb200fa5..c00b7972 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -760,9 +760,9 @@ class Item_Model extends ORM_MPTT { // Conditional rules if ($this->id == 1) { - // Root album can't have a name or slug so replace the rules - $this->rules["name"] = array("rules" => array("length[0]")); - $this->rules["slug"] = array("rules" => array("length[0]")); + // We don't care about the name and slug for the root album. + $this->rules["name"] = array(); + $this->rules["slug"] = array(); } // Movies and photos must have data files -- cgit v1.2.3