diff options
author | friendica <info@friendica.com> | 2015-01-29 15:09:35 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-29 15:09:35 -0800 |
commit | 912be23e1627211fb417c4b7bced414cbbe38ef0 (patch) | |
tree | 2b8567d800624167b3eadf37c8855deb0ba74b0b /mod/profperm.php | |
parent | ff68ea608786a698ad46637ef13854ac1b1e6beb (diff) | |
parent | 872b165eb2bb5d632a12f2d7e1a28e195c2d5348 (diff) | |
download | volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.tar.gz volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.tar.bz2 volse-hubzilla-912be23e1627211fb417c4b7bced414cbbe38ef0.zip |
Merge branch 'master' into tres
Conflicts:
include/group.php
include/text.php
mod/acl.php
mod/channel.php
mod/connections.php
mod/display.php
mod/group.php
mod/item.php
mod/locs.php
mod/network.php
mod/photos.php
mod/ping.php
mod/starred.php
mod/viewsrc.php
Diffstat (limited to 'mod/profperm.php')
-rw-r--r-- | mod/profperm.php | 20 |
1 files changed, 10 insertions, 10 deletions
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 .= '</div>'; $o .= '<div id="prof-all-contacts">'; - $r = abook_connections(local_user()); + $r = abook_connections(local_channel()); if($r) { $textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false); |