summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/simple_uploader.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gallery/controllers/simple_uploader.php')
-rw-r--r--modules/gallery/controllers/simple_uploader.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/gallery/controllers/simple_uploader.php b/modules/gallery/controllers/simple_uploader.php
index c7e5031b..8ac1fc8b 100644
--- a/modules/gallery/controllers/simple_uploader.php
+++ b/modules/gallery/controllers/simple_uploader.php
@@ -65,12 +65,16 @@ class Simple_Uploader_Controller extends Controller {
if (array_key_exists("extension", $path_info) &&
in_array(strtolower($path_info["extension"]), array("flv", "mp4"))) {
$item->type = "movie";
- $item->save();
+ } else {
+ $item->type = "photo";
+ }
+
+ item::save_with_retries($item);
+
+ if ($item->type == "movie") {
log::success("content", t("Added a movie"),
html::anchor("movies/$item->id", t("view movie")));
} else {
- $item->type = "photo";
- $item->save();
log::success("content", t("Added a photo"),
html::anchor("photos/$item->id", t("view photo")));
}