X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fregister.php;h=9de7a0ca3800a7c4d7cdc8d78882cbcc2ca49514;hb=e0b33b36a21d7803353692372d7ceb90683d8888;hp=07a20e318de76d13e733675089cb141227d855b5;hpb=8aff8a76eb9efc4acaab0af3c8c0ca7a011f4349;p=friendica.git diff --git a/mod/register.php b/mod/register.php index 07a20e318d..9de7a0ca38 100644 --- a/mod/register.php +++ b/mod/register.php @@ -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,9 @@ use Friendica\Core\PConfig; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Model\User; -use Friendica\Util\Temporal; +use Friendica\Util\DateTimeFormat; require_once 'include/enotify.php'; -require_once 'include/bbcode.php'; function register_post(App $a) { @@ -58,6 +58,7 @@ function register_post(App $a) break; } + $netpublish = !empty($_POST['profile_publish_reg']); $arr = $_POST; @@ -118,7 +119,7 @@ function register_post(App $a) $hash = random_string(); $r = q("INSERT INTO `register` ( `hash`, `created`, `uid`, `password`, `language`, `note` ) VALUES ( '%s', '%s', %d, '%s', '%s', '%s' ) ", dbesc($hash), - dbesc(Temporal::utcNow()), + dbesc(DateTimeFormat::utcNow()), intval($user['uid']), dbesc($result['password']), dbesc($lang), @@ -257,11 +258,11 @@ function register_content(App $a) '$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 +284,9 @@ 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'), + '$baseurl' => System::baseurl(), '$form_security_token' => get_form_security_token("register") ]); return $o;