]> git.mxchange.org Git - friendica.git/blobdiff - mod/register.php
Merge pull request #3518 from AndyHee/3.5.2rc
[friendica.git] / mod / register.php
index f0348ef4e5c6b1d61fd26a5c2f1c6473870adca1..71c13ef396815909c2335eab191f668333397c90 100644 (file)
@@ -1,11 +1,13 @@
 <?php
 
+use Friendica\App;
+
 require_once('include/enotify.php');
 require_once('include/bbcode.php');
 require_once('include/user.php');
 
 if(! function_exists('register_post')) {
-function register_post(&$a) {
+function register_post(App $a) {
 
        global $lang;
 
@@ -64,7 +66,7 @@ function register_post(&$a) {
        $user = $result['user'];
 
        if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) {
-               $url = $a->get_baseurl() . '/profile/' . $user['nickname'];
+               $url = App::get_baseurl() . '/profile/' . $user['nickname'];
                proc_run(PRIORITY_LOW, "include/directory.php", $url);
        }
 
@@ -85,7 +87,7 @@ function register_post(&$a) {
                        $res = send_register_open_eml(
                                $user['email'],
                                $a->config['sitename'],
-                               $a->get_baseurl(),
+                               App::get_baseurl(),
                                $user['username'],
                                $result['password']);
 
@@ -142,9 +144,9 @@ function register_post(&$a) {
                                'source_name' => $user['username'],
                                'source_mail' => $user['email'],
                                'source_nick' => $user['nickname'],
-                               'source_link' => $a->get_baseurl()."/admin/users/",
-                               'link' => $a->get_baseurl()."/admin/users/",
-                               'source_photo' => $a->get_baseurl() . "/photo/avatar/".$user['uid'].".jpg",
+                               'source_link' => App::get_baseurl()."/admin/users/",
+                               'link' => App::get_baseurl()."/admin/users/",
+                               'source_photo' => App::get_baseurl() . "/photo/avatar/".$user['uid'].".jpg",
                                'to_email' => $admin['email'],
                                'uid' => $admin['uid'],
                                'language' => ($admin['language']?$admin['language']:'en'),
@@ -172,7 +174,7 @@ function register_post(&$a) {
 
 
 if(! function_exists('register_content')) {
-function register_content(&$a) {
+function register_content(App $a) {
 
        // logged in users can register others (people/pages/groups)
        // even with closed registrations, unless specifically prohibited by site policy.
@@ -282,7 +284,7 @@ function register_content(&$a) {
                '$passwords' => $passwords,
                '$password1' => array('password1', t('New Password:'), '', t('Leave empty for an auto generated password.')),
                '$password2' => array('confirm', t('Confirm:'), '', ''),
-               '$nickdesc'  => str_replace('$sitename',$a->get_hostname(),t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'<strong>nickname@$sitename</strong>\'.')),
+               '$nickdesc'  => str_replace('$sitename',$a->get_hostname(), t('Choose a profile nickname. This must begin with a text character. Your profile address on this site will then be \'<strong>nickname@$sitename</strong>\'.')),
                '$nicklabel' => t('Choose a nickname: '),
                '$photo'     => $photo,
                '$publish'   => $profile_publish,