summaryrefslogtreecommitdiff
path: root/modules/server_add
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-07-11 09:09:52 -0700
committerTim Almdal <tnalmdal@shaw.ca>2010-07-11 09:09:52 -0700
commit329abfe539371b65c95e3334e436f997ec92879f (patch)
tree0a3ee6e19be8563af6b6b6d87db795a0e6f463e2 /modules/server_add
parent213807a8073138a98b8daf9fe265e981454aaa50 (diff)
parent0389dceb475597ecdedf519d27d6d7bb36aa6276 (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/server_add')
-rw-r--r--modules/server_add/controllers/server_add.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/server_add/controllers/server_add.php b/modules/server_add/controllers/server_add.php
index d6c2459d..e91d9dd9 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;
}
}
@@ -93,7 +93,7 @@ class Server_Add_Controller extends Admin_Controller {
print json_encode(
array("result" => "started",
- "status" => $task->status,
+ "status" => (string)$task->status,
"url" => url::site("server_add/run/$task->id?csrf=" . access::csrf_token())));
}
@@ -112,7 +112,7 @@ class Server_Add_Controller extends Admin_Controller {
// Prevent the JavaScript code from breaking by forcing a period as
// decimal separator for all locales with sprintf("%F", $value).
print json_encode(array("done" => (bool)$task->done,
- "status" => $task->status,
+ "status" => (string)$task->status,
"percent_complete" => sprintf("%F", $task->percent_complete)));
}
@@ -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;