forked from GNUsocial/gnu-social
Fix dumb mistake -- changed function names partway through writing Nickname and forgot to update a couple places. :)
This commit is contained in:
parent
0410462c4b
commit
f68d4e7d06
@ -124,7 +124,7 @@ require_once 'markdown.php';
|
||||
* note that it includes the [] and repeating bits, so should be wrapped
|
||||
* directly in a capture paren usually.
|
||||
*
|
||||
* For validation, use Nickname::validate() etc.
|
||||
* For validation, use Nickname::normalize(), Nickname::isValid() etc.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ class Nickname
|
||||
* Regex fragment for pulling an arbitrarily-formated nickname.
|
||||
*
|
||||
* Not guaranteed to be valid after normalization; run the string through
|
||||
* Nickname::normalize() to get the canonical form, or Nickname::validate()
|
||||
* Nickname::normalize() to get the canonical form, or Nickname::isValid()
|
||||
* if you just need to check if it's properly formatted.
|
||||
*
|
||||
* This and CANONICAL_FMT replace the old NICKNAME_FMT, but be aware
|
||||
@ -61,7 +61,7 @@ class Nickname
|
||||
* @param string $str
|
||||
* @return boolean
|
||||
*/
|
||||
public static function validate($str)
|
||||
public static function isValid($str)
|
||||
{
|
||||
try {
|
||||
self::normalize($str);
|
||||
|
@ -273,7 +273,7 @@ class FinishopenidloginAction extends Action
|
||||
}
|
||||
|
||||
try {
|
||||
$nickname = Nickname::validate($this->trimmed('newname'));
|
||||
$nickname = Nickname::normalize($this->trimmed('newname'));
|
||||
} catch (NicknameException $e) {
|
||||
$this->showForm($e->getMessage());
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user