]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
Merge pull request #5238 from annando/more-abstraction
[friendica.git] / mod / register.php
index 9de7a0ca3800a7c4d7cdc8d78882cbcc2ca49514..ee614f64d84d703735d1d8442c9221fe63ba48af 100644 (file)
@@ -12,6 +12,7 @@ use Friendica\Core\PConfig;
 use Friendica\Core\System;
 use Friendica\Core\Worker;
 use Friendica\Model\User;
+use Friendica\Module\Tos;
 use Friendica\Util\DateTimeFormat;
 
 require_once 'include/enotify.php';
@@ -133,7 +134,7 @@ function register_post(App $a)
                }
 
                // send email to admins
-               $admin_mail_list = "'" . implode("','", array_map(dbesc, explode(",", str_replace(" ", "", $a->config['admin_email'])))) . "'";
+               $admin_mail_list = "'" . implode("','", array_map("dbesc", explode(",", str_replace(" ", "", $a->config['admin_email'])))) . "'";
                $adminlist = q("SELECT uid, language, email FROM user WHERE email IN (%s)",
                        $admin_mail_list
                );
@@ -232,8 +233,8 @@ function register_content(App $a)
                $profile_publish = replace_macros($publish_tpl, [
                        '$instance' => 'reg',
                        '$pubdesc' => L10n::t('Include your profile in member directory?'),
-                       '$yes_selected' => ' checked="checked" ',
-                       '$no_selected' => '',
+                       '$yes_selected' => '',
+                       '$no_selected' => ' checked="checked"',
                        '$str_yes' => L10n::t('Yes'),
                        '$str_no' => L10n::t('No'),
                ]);
@@ -252,6 +253,8 @@ function register_content(App $a)
 
        $tpl = $arr['template'];
 
+       $tos = new Tos();
+
        $o = replace_macros($tpl, [
                '$oidhtml' => $oidhtml,
                '$invitations' => Config::get('system', 'invitation_only'),
@@ -286,6 +289,8 @@ function register_content(App $a)
                '$importt'   => L10n::t('Import your profile to this friendica instance'),
                '$showtoslink' => Config::get('system', 'tosdisplay'),
                '$tostext'   => L10n::t('Terms of Service'),
+               '$showprivstatement' => Config::get('system', 'tosprivstatement'),
+               '$privstatement' => $tos->privacy_complete,
                '$baseurl'   => System::baseurl(),
                '$form_security_token' => get_form_security_token("register")
        ]);