summaryrefslogtreecommitdiff
path: root/modules/gallery/models
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2010-08-02 05:45:48 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2010-08-02 05:45:48 +0300
commit0a128bab0a788288c5291491a68bd1c9ab432825 (patch)
tree29e9887258865343dc1a6e6322a3933cf6527c61 /modules/gallery/models
parent8e1ae7549362688dd38e053dd736ddc5fc6a4982 (diff)
parent9369fd55a36183b7dc1e4b42af46a8f649a66578 (diff)
Merge remote branch 'gallery3/master'
Diffstat (limited to 'modules/gallery/models')
-rw-r--r--modules/gallery/models/item.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php
index 4d05e4da..c00b7972 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";
}
}
@@ -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