]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Fix double space in message
[quix0rs-gnu-social.git] / actions / register.php
index 57f8e7bdf0394f450ad1cabd79e7fc166cd67429..d1bc381fbc52358ea8ed7d9dcc01deda5a0a0c04 100644 (file)
@@ -259,6 +259,7 @@ class RegisterAction extends Action
 
                 // Re-init language env in case it changed (not yet, but soon)
                 common_init_language();
+
                 $this->showSuccess();
             } else {
                 $this->showForm(_('Invalid username or password.'));
@@ -279,7 +280,7 @@ class RegisterAction extends Action
     function nicknameExists($nickname)
     {
         $user = User::staticGet('nickname', $nickname);
-        return ($user !== false);
+        return is_object($user);
     }
 
     /**
@@ -299,7 +300,7 @@ class RegisterAction extends Action
             return false;
         }
         $user = User::staticGet('email', $email);
-        return ($user !== false);
+        return is_object($user);
     }
 
     // overrrided to add entry-title class
@@ -340,7 +341,7 @@ class RegisterAction extends Action
         } else {
             $instr =
               common_markup_to_html(_('With this form you can create '.
-                                      ' a new account. ' .
+                                      'a new account. ' .
                                       'You can then post notices and '.
                                       'link up to friends and colleagues. '));
 
@@ -490,11 +491,15 @@ class RegisterAction extends Action
             $this->elementStart('li');
             $this->element('input', $attrs);
             $this->elementStart('label', array('class' => 'checkbox', 'for' => 'license'));
-            $this->text(_('My text and files are available under '));
-            $this->element('a', array('href' => common_config('license', 'url')),
-                           common_config('license', 'title'), _("Creative Commons Attribution 3.0"));
-            $this->text(_(' except this private data: password, '.
-                          'email address, IM address, and phone number.'));
+            $message = _('My text and files are available under %s ' .
+                         'except this private data: password, ' .
+                         'email address, IM address, and phone number.');
+            $link = '<a href="' .
+                    htmlspecialchars(common_config('license', 'url')) .
+                    '">' .
+                    htmlspecialchars(common_config('license', 'title')) .
+                    '</a>';
+            $this->raw(sprintf(htmlspecialchars($message), $link));
             $this->elementEnd('label');
             $this->elementEnd('li');
         }
@@ -534,9 +539,9 @@ class RegisterAction extends Action
                                        array('nickname' => $nickname));
 
         $this->elementStart('div', 'success');
-        $instr = sprintf(_('Congratulations, %s! And welcome to %%%%site.name%%%%. '.
+        $instr = sprintf(_('Congratulations, %1$s! And welcome to %%%%site.name%%%%. '.
                            'From here, you may want to...'. "\n\n" .
-                           '* Go to [your profile](%s) '.
+                           '* Go to [your profile](%2$s) '.
                            'and post your first message.' .  "\n" .
                            '* Add a [Jabber/GTalk address]'.
                            '(%%%%action.imsettings%%%%) '.