X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofperm.php;h=8d09c429cc3b006976543d7cb17236559815632f;hb=5f0cb264af63a7d44365d64ba96f7e29a2d7b530;hp=e70992a2b9f62a4f8b7dbe36eb11742cb6d2be70;hpb=4cff911939b263993eb41682ca558c975e2db01f;p=friendica.git diff --git a/mod/profperm.php b/mod/profperm.php index e70992a2b9..8d09c429cc 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -26,6 +26,15 @@ function profperm_content(&$a) { return; } + // Switch to text mod interface if we have more than 'n' contacts or group members + + $switchtotext = get_pconfig(local_user(),'system','groupedit_image_limit'); + if($switchtotext === false) + $switchtotext = get_config('system','groupedit_image_limit'); + if($switchtotext === false) + $switchtotext = 400; + + if(($a->argc > 2) && intval($a->argv[1]) && intval($a->argv[2])) { $r = q("SELECT `id` FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `self` = 0 AND `network` = 'dfrn' AND `id` = %d AND `uid` = %d LIMIT 1", @@ -100,30 +109,39 @@ function profperm_content(&$a) { $o .= '
'; if($change) $o = ''; - - $o .= '
'; + + $o .= '
'; $o .= '

' . t('Visible To') . '

'; + $o .= '
'; + $o .= '
'; + + $textmode = (($switchtotext && (count($members) > $switchtotext)) ? true : false); + foreach($members as $member) { if($member['url']) { $member['click'] = 'profChangeMember(' . $profile['id'] . ',' . $member['id'] . '); return true;'; - $o .= micropro($member,true,'mpprof'); + $o .= micropro($member,true,'mpprof', $textmode); } } $o .= '
'; $o .= '
'; - $o .= '
'; - $o .= '

' . t("All Contacts \x28with secure profile access\x29") . '

'; + $o .= '
'; + $o .= '

' . t("All Contacts \x28with secure profile access\x29") . '

'; + $o .= '
'; + $o .= '
'; + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `blocked` = 0 and `pending` = 0 and `self` = 0 AND `network` = 'dfrn' ORDER BY `name` ASC", intval(local_user()) ); if(count($r)) { + $textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false); foreach($r as $member) { if(! in_array($member['id'],$ingroup)) { $member['click'] = 'profChangeMember(' . $profile['id'] . ',' . $member['id'] . '); return true;'; - $o .= micropro($member,true,'mpprof'); + $o .= micropro($member,true,'mpprof',$textmode); } } }