X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofperm.php;h=0f864d42f3e2b8ca66ce83c31bf55787519e2c46;hb=af39296f0640bc40e58f51ec47c4e5aa53a24316;hp=c49fb7f282721434a29ea5d6fe5ac9fec3c9c19a;hpb=76f73c7236f40ec9a068b91095cd4d90a0488c88;p=friendica.git diff --git a/mod/profperm.php b/mod/profperm.php index c49fb7f282..0f864d42f3 100644 --- a/mod/profperm.php +++ b/mod/profperm.php @@ -1,11 +1,16 @@ user['nickname']; $profile = $a->argv[1]; - profile_load($a,$which,$profile); - + Profile::load($a, $which, $profile); } function profperm_content(App $a) { if (! local_user()) { - notice( t('Permission denied') . EOL); + notice(L10n::t('Permission denied') . EOL); return; } if($a->argc < 2) { - notice( t('Invalid profile identifier.') . EOL ); + notice(L10n::t('Invalid profile identifier.') . EOL ); return; } + $o = ''; + // Switch to text mod interface if we have more than 'n' contacts or group members $switchtotext = PConfig::get(local_user(),'system','groupedit_image_limit'); @@ -45,7 +51,7 @@ function profperm_content(App $a) { intval($a->argv[2]), intval(local_user()) ); - if (dbm::is_result($r)) + if (DBM::is_result($r)) $change = intval($a->argv[2]); } @@ -55,8 +61,8 @@ function profperm_content(App $a) { intval($a->argv[1]), intval(local_user()) ); - if (! dbm::is_result($r)) { - notice( t('Invalid profile identifier.') . EOL ); + if (! DBM::is_result($r)) { + notice(L10n::t('Invalid profile identifier.') . EOL ); return; } $profile = $r[0]; @@ -66,8 +72,8 @@ function profperm_content(App $a) { intval($a->argv[1]) ); - $ingroup = array(); - if (dbm::is_result($r)) + $ingroup = []; + if (DBM::is_result($r)) foreach($r as $member) $ingroup[] = $member['id']; @@ -96,17 +102,17 @@ function profperm_content(App $a) { $members = $r; - $ingroup = array(); - if (dbm::is_result($r)) + $ingroup = []; + if (DBM::is_result($r)) foreach($r as $member) $ingroup[] = $member['id']; } - $o .= '

' . t('Profile Visibility Editor') . '

'; + $o .= '

' . L10n::t('Profile Visibility Editor') . '

'; - $o .= '

' . t('Profile') . ' \'' . $profile['profile-name'] . '\'

'; + $o .= '

' . L10n::t('Profile') . ' \'' . $profile['profile-name'] . '\'

'; - $o .= '
' . t('Click on a contact to add or remove.') . '
'; + $o .= '
' . L10n::t('Click on a contact to add or remove.') . '
'; } @@ -115,7 +121,7 @@ function profperm_content(App $a) { $o = ''; $o .= '
'; - $o .= '

' . t('Visible To') . '

'; + $o .= '

' . L10n::t('Visible To') . '

'; $o .= '
'; $o .= '
'; @@ -131,7 +137,7 @@ function profperm_content(App $a) { $o .= '
'; $o .= '
'; - $o .= '

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

'; + $o .= '

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

'; $o .= '
'; $o .= '
'; @@ -141,7 +147,7 @@ function profperm_content(App $a) { dbesc(NETWORK_DFRN) ); - if (dbm::is_result($r)) { + if (DBM::is_result($r)) { $textmode = (($switchtotext && (count($r) > $switchtotext)) ? true : false); foreach($r as $member) { if(! in_array($member['id'],$ingroup)) { @@ -161,4 +167,3 @@ function profperm_content(App $a) { return $o; } -