diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-06 21:36:32 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2010-08-06 21:36:32 +0000 |
| commit | 691ce806dc9aefac596a692ff2ba927a81a65440 (patch) | |
| tree | 410f64288ef1d8bbc8455509af74d0e7582dc48e /modules/gallery/models | |
| parent | c83650d83ad8b1f4bda30cac2ae8efa6e1c97287 (diff) | |
| parent | 8559cdb5b6bfa87864941f726521660023779fa7 (diff) | |
Merge branch 'master' of git://github.com/gallery/gallery3
Diffstat (limited to 'modules/gallery/models')
| -rw-r--r-- | modules/gallery/models/item.php | 8 |
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 |
