]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
applying changes to mods/sample-nginx.config from #5019
[friendica.git] / mod / register.php
index bf87c9259fba559efd358dfae169508012c8a303..f1f8b7caa928d0a47c9acc96514f75cc808efd37 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 use Friendica\App;
+use Friendica\Content\Text\BBCode;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
@@ -11,10 +12,10 @@ 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';
-require_once 'include/bbcode.php';
 
 function register_post(App $a)
 {
@@ -58,6 +59,7 @@ function register_post(App $a)
                        break;
        }
 
+       $netpublish = !empty($_POST['profile_publish_reg']);
 
        $arr = $_POST;
 
@@ -251,17 +253,19 @@ function register_content(App $a)
 
        $tpl = $arr['template'];
 
+       $tos = new Tos();
+
        $o = replace_macros($tpl, [
                '$oidhtml' => $oidhtml,
                '$invitations' => Config::get('system', 'invitation_only'),
                '$permonly'    => $a->config['register_policy'] == REGISTER_APPROVE,
                '$permonlybox' => ['permonlybox', L10n::t('Note for the admin'), '', L10n::t('Leave a message for the admin, why you want to join this node')],
                '$invite_desc' => L10n::t('Membership on this site is by invitation only.'),
-               '$invite_label' => L10n::t('Your invitation ID: '),
+               '$invite_label' => L10n::t('Your invitation code: '),
                '$invite_id'  => $invite_id,
                '$realpeople' => $realpeople,
                '$regtitle'  => L10n::t('Registration'),
-               '$registertext' => x($a->config, 'register_text') ? bbcode($a->config['register_text']) : "",
+               '$registertext' => BBCode::convert(Config::get('config', 'register_text', '')),
                '$fillwith'  => $fillwith,
                '$fillext'   => $fillext,
                '$oidlabel'  => $oidlabel,
@@ -283,6 +287,11 @@ function register_content(App $a)
                '$sitename'  => $a->get_hostname(),
                '$importh'   => L10n::t('Import'),
                '$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")
        ]);
        return $o;