X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Finvite.php;h=06c0df3b84d5902ede461f243122182da7776d6f;hb=de56a3a824ec9aa0e54dd0903c995076fdb9ae43;hp=81b58800248c84b5fd1b8508c0e5e227e7fb91c0;hpb=a0530d1066d7268f1b1ea67bc3c254e9f9fc5ec8;p=friendica.git diff --git a/mod/invite.php b/mod/invite.php index 81b5880024..06c0df3b84 100644 --- a/mod/invite.php +++ b/mod/invite.php @@ -1,16 +1,15 @@ $max_invites) { notice( t('Total invitation limit exceeded.') . EOL); return; @@ -38,9 +37,9 @@ function invite_post(App $a) { $total = 0; - if (get_config('system','invitation_only')) { + if (Config::get('system','invitation_only')) { $invonly = true; - $x = get_pconfig(local_user(),'system','invites_remaining'); + $x = PConfig::get(local_user(),'system','invites_remaining'); if ((! $x) && (! is_site_admin())) { return; } @@ -67,7 +66,7 @@ function invite_post(App $a) { if (! is_site_admin()) { $x --; if ($x >= 0) { - set_pconfig(local_user(),'system','invites_remaining',$x); + PConfig::set(local_user(),'system','invites_remaining',$x); } else { return; } @@ -76,7 +75,7 @@ function invite_post(App $a) { $nmessage = $message; } - $res = mail($recip, email_header_encode( t('Please join us on Friendica'),'UTF-8'), + $res = mail($recip, Email::encodeHeader(t('Please join us on Friendica'),'UTF-8'), $nmessage, "From: " . $a->user['email'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" @@ -85,7 +84,7 @@ function invite_post(App $a) { if ($res) { $total ++; $current_invites ++; - set_pconfig(local_user(),'system','sent_invites',$current_invites); + PConfig::set(local_user(),'system','sent_invites',$current_invites); if($current_invites > $max_invites) { notice( t('Invitation limit exceeded. Please contact your site administrator.') . EOL); return; @@ -110,16 +109,16 @@ function invite_content(App $a) { $tpl = get_markup_template('invite.tpl'); $invonly = false; - if (get_config('system','invitation_only')) { + if (Config::get('system','invitation_only')) { $invonly = true; - $x = get_pconfig(local_user(),'system','invites_remaining'); + $x = PConfig::get(local_user(),'system','invites_remaining'); if ((! $x) && (! is_site_admin())) { notice( t('You have no more invitations available') . EOL); return ''; } } - $dirloc = get_config('system','directory'); + $dirloc = Config::get('system','directory'); if (strlen($dirloc)) { if ($a->config['register_policy'] == REGISTER_CLOSED) { $linktxt = sprintf( t('Visit %s for a list of public sites that you can join. Friendica members on other sites can all connect with each other, as well as with members of many other social networks.'), $dirloc . '/servers');