From a4960360669daa0a0c842427185ce1ada3b4ab97 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 28 Jan 2015 20:56:04 -0800 Subject: local_user => local_channel --- mod/sharedwithme.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mod/sharedwithme.php') diff --git a/mod/sharedwithme.php b/mod/sharedwithme.php index 56cbc35ec..d91987027 100644 --- a/mod/sharedwithme.php +++ b/mod/sharedwithme.php @@ -3,20 +3,20 @@ require_once('include/conversation.php'); require_once('include/text.php'); function sharedwithme_content(&$a) { - if(! local_user()) { + if(! local_channel()) { notice( t('Permission denied.') . EOL); return; } $channel = $a->get_channel(); - $is_owner = (local_user() && (local_user() == $channel['channel_id'])); + $is_owner = (local_channel() && (local_channel() == $channel['channel_id'])); //maintenance - see if a file got dropped and remove it systemwide - this should possibly go to include/poller $x = q("SELECT * FROM item WHERE verb = '%s' AND obj_type = '%s' AND uid = %d", dbesc(ACTIVITY_UPDATE), dbesc(ACTIVITY_OBJ_FILE), - intval(local_user()) + intval(local_channel()) ); if($x) { @@ -47,7 +47,7 @@ function sharedwithme_content(&$a) { q("DELETE FROM item WHERE id = %d AND uid = %d", intval($id), - intval(local_user()) + intval(local_channel()) ); goaway(z_root() . '/sharedwithme'); @@ -59,7 +59,7 @@ function sharedwithme_content(&$a) { q("DELETE FROM item WHERE verb = '%s' AND obj_type = '%s' AND uid = %d", dbesc(ACTIVITY_POST), dbesc(ACTIVITY_OBJ_FILE), - intval(local_user()) + intval(local_channel()) ); goaway(z_root() . '/sharedwithme'); @@ -69,7 +69,7 @@ function sharedwithme_content(&$a) { $r = q("SELECT * FROM item WHERE verb = '%s' AND obj_type = '%s' AND uid = %d AND owner_xchan != '%s'", dbesc(ACTIVITY_POST), dbesc(ACTIVITY_OBJ_FILE), - intval(local_user()), + intval(local_channel()), dbesc($channel['channel_hash']) ); -- cgit v1.2.3