convert wall_upload to use the photo api

This commit is contained in:
friendica
2013-02-05 16:54:09 -08:00
parent 05ba851d52
commit f3eb2eb9e7
4 changed files with 41 additions and 138 deletions

View File

@@ -1,6 +1,7 @@
<?php
require_once('include/permissions.php');
require_once('include/items.php');
function photo_upload($channel, $observer, $args) {
@@ -184,7 +185,7 @@ function photo_upload($channel, $observer, $args) {
// Create item container
$item_flags = ITEM_WALL|ITEM_ORIGIN|ITEM_THREAD_TOP;
$item_restrict = (($visibility) ? ITEM_HIDDEN : ITEM_VISIBLE);
$item_restrict = (($visible) ? ITEM_VISIBLE : ITEM_HIDDEN);
$title = '';
$uri = item_message_id();
@@ -217,6 +218,7 @@ function photo_upload($channel, $observer, $args) {
proc_run('php', "include/notifier.php", 'wall-new', $item_id);
$ret['success'] = true;
$ret['body'] = $arr['body'];
$ret['photoitem_id'] = $item_id;
call_hooks('photo_post_end',$ret);