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/profperm.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mod/profperm.php') diff --git a/mod/profperm.php b/mod/profperm.php index 55dc8cc77..4556119a4 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -4,7 +4,7 @@ require_once('include/Contact.php'); function profperm_init(&$a) { - if(! local_user()) + if(! local_channel()) return; $channel = $a->get_channel(); @@ -19,7 +19,7 @@ function profperm_init(&$a) { function profperm_content(&$a) { - if(! local_user()) { + if(! local_channel()) { notice( t('Permission denied') . EOL); return; } @@ -32,7 +32,7 @@ function profperm_content(&$a) { // Switch to text mod interface if we have more than 'n' contacts or group members - $switchtotext = get_pconfig(local_user(),'system','groupedit_image_limit'); + $switchtotext = get_pconfig(local_channel(),'system','groupedit_image_limit'); if($switchtotext === false) $switchtotext = get_config('system','groupedit_image_limit'); if($switchtotext === false) @@ -42,7 +42,7 @@ function profperm_content(&$a) { if((argc() > 2) && intval(argv(1)) && intval(argv(2))) { $r = q("SELECT abook_id FROM abook WHERE abook_id = %d and abook_channel = %d limit 1", intval(argv(2)), - intval(local_user()) + intval(local_channel()) ); if($r) $change = intval(argv(2)); @@ -52,7 +52,7 @@ function profperm_content(&$a) { if((argc() > 1) && (intval(argv(1)))) { $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d AND `is_default` = 0 LIMIT 1", intval(argv(1)), - intval(local_user()) + intval(local_channel()) ); if(! $r) { notice( t('Invalid profile identifier.') . EOL ); @@ -62,7 +62,7 @@ function profperm_content(&$a) { $profile = $r[0]; $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'", - intval(local_user()), + intval(local_channel()), dbesc($profile['profile_guid']) ); @@ -77,14 +77,14 @@ function profperm_content(&$a) { if(in_array($change,$ingroup)) { q("UPDATE abook SET abook_profile = '' WHERE abook_id = %d AND abook_channel = %d", intval($change), - intval(local_user()) + intval(local_channel()) ); } else { q("UPDATE abook SET abook_profile = '%s' WHERE abook_id = %d AND abook_channel = %d", dbesc($profile['profile_guid']), intval($change), - intval(local_user()) + intval(local_channel()) ); } @@ -95,7 +95,7 @@ function profperm_content(&$a) { profile_photo_set_profile_perms($profile['id']); $r = q("SELECT * FROM abook left join xchan on abook_xchan = xchan_hash WHERE abook_channel = %d AND abook_profile = '%s'", - intval(local_user()), + intval(local_channel()), dbesc($profile['profile_guid']) ); @@ -140,7 +140,7 @@ function profperm_content(&$a) { $o .= ''; $o .= '
'; - $r = abook_connections(local_user()); + $r = abook_connections(local_channel()); if($r) { $textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false); -- cgit v1.2.3