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/server_add/controllers/server_add.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/server_add') diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php index 715274ab..0a691c8a 100644 --- a/modules/server_add/controllers/server_add.php +++ b/modules/server_add/controllers/server_add.php @@ -55,7 +55,7 @@ class Server_Add_Controller extends Admin_Controller { } if (!is_dir($file)) { $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); - if (!in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4"))) { + if (!in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4", "m4v"))) { continue; } } @@ -162,7 +162,7 @@ class Server_Add_Controller extends Admin_Controller { $queue[] = array($child, $entry_id); } else { $ext = strtolower(pathinfo($child, PATHINFO_EXTENSION)); - if (in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4")) && + if (in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4", "m4v")) && filesize($child) > 0) { $child_entry = ORM::factory("server_add_file"); $child_entry->task_id = $task->id; @@ -249,7 +249,7 @@ class Server_Add_Controller extends Admin_Controller { $photo->owner_id = $owner_id; $photo->save(); $entry->item_id = $photo->id; - } else if (in_array($extension, array("flv", "mp4"))) { + } else if (in_array($extension, array("flv", "mp4", "m4v"))) { $movie = ORM::factory("item"); $movie->type = "movie"; $movie->parent_id = $parent->id; -- cgit v1.2.3