From 0fa29b2fd0501a2fde5e086be5da22fe1f47f040 Mon Sep 17 00:00:00 2001 From: Sem Date: Sat, 28 Jul 2012 21:12:24 +0200 Subject: Removed flash uploader. --- actions/photos/image/ajax_upload.php | 57 --------------------- actions/photos/image/ajax_upload_complete.php | 74 --------------------------- 2 files changed, 131 deletions(-) delete mode 100644 actions/photos/image/ajax_upload.php delete mode 100644 actions/photos/image/ajax_upload_complete.php (limited to 'actions/photos') diff --git a/actions/photos/image/ajax_upload.php b/actions/photos/image/ajax_upload.php deleted file mode 100644 index 312bc598c..000000000 --- a/actions/photos/image/ajax_upload.php +++ /dev/null @@ -1,57 +0,0 @@ -container_guid = $album->getGUID(); -$image->setMimeType($mime); -$image->access_id = $album->access_id; -$image->batch = $batch; - -try { - $image->save($file); - $album->prependImageList(array($image->guid)); - - if (elgg_get_plugin_setting('img_river_view', 'tidypics') === "all") { - add_to_river('river/object/image/create', 'create', $image->getOwnerGUID(), $image->getGUID()); - } - - echo elgg_echo('success'); -} catch (Exception $e) { - // remove the bits that were saved - $image->delete(); - echo $e->getMessage(); -} - -exit; \ No newline at end of file diff --git a/actions/photos/image/ajax_upload_complete.php b/actions/photos/image/ajax_upload_complete.php deleted file mode 100644 index 358a4fc6f..000000000 --- a/actions/photos/image/ajax_upload_complete.php +++ /dev/null @@ -1,74 +0,0 @@ - 'object', - 'subtype' => 'image', - 'metadata_names' => 'batch', - 'metadata_values' => $batch, - 'limit' => 0 -); - -$images = elgg_get_entities_from_metadata($params); -if ($images) { - // Create a new batch object to contain these photos - $batch = new ElggObject(); - $batch->subtype = "tidypics_batch"; - $batch->access_id = ACCESS_PUBLIC; - $batch->container_guid = $album->guid; - - if ($batch->save()) { - foreach ($images as $image) { - add_entity_relationship($image->guid, "belongs_to_batch", $batch->getGUID()); - } - } -} else { - // @todo some sort of message to edit them manually. - exit; -} - -// "added images to album" river -if ($img_river_view == "batch" && $album->new_album == false) { - add_to_river('river/object/tidypics_batch/create', 'create', $batch->getOwnerGUID(), $batch->getGUID()); -} - -// "created album" river -if ($album->new_album) { - $album->new_album = false; - $album->first_upload = true; - - add_to_river('river/object/album/create', 'create', $album->getOwnerGUID(), $album->getGUID()); - - // "created album" notifications - // we throw the notification manually here so users are not told about the new album until - // there are at least a few photos in it - if ($album->shouldNotify()) { - object_notifications('create', 'object', $album); - $album->last_notified = time(); - } -} else { - // "added image to album" notifications - if ($album->first_upload) { - $album->first_upload = false; - } - - if ($album->shouldNotify()) { - object_notifications('create', 'object', $album); - $album->last_notified = time(); - } -} - -echo json_encode(array('batch_guid' => $batch->getGUID())); -exit; \ No newline at end of file -- cgit v1.2.3