From: Ævar Arnfjörð Bjarmason Date: Sun, 8 Jan 2006 03:39:26 +0000 (+0000) Subject: * Fixed bugs introduced in revision 1.566 by avar (see, I can make them too!) X-Git-Tag: 1.6.0~703 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=07205d58f49f70ec914b5e4c7ef483003dde941d;p=lhc%2Fweb%2Fwiklou.git * Fixed bugs introduced in revision 1.566 by avar (see, I can make them too!) - User::getOption() doesn't return bool, as a result all signitures were fancy, just use User::getBoolOption() * Fixed stuff introduced in revision 1.564 by rob - User::getOption() output is pre-trimmed, no need for double-trimming - == => === - the ternary op takes precedence over =, -() --- diff --git a/includes/Parser.php b/includes/Parser.php index 7293e1fb87..483ccef251 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3208,10 +3208,10 @@ class Parser global $wgContLang; $username = $user->getName(); - $nickname = trim( $user->getOption( 'nickname' ) ); - $nickname = ( $nickname == '' ? $username : $nickname ); + $nickname = $user->getOption( 'nickname' ); + $nickname = $nickname === '' ? $username : $nickname; - if( $user->getOption( 'fancysig' ) !== false ) { + if( $user->getBoolOption( 'fancysig' ) !== false ) { # Sig. might contain markup; validate this if( $this->validateSig( $nickname ) !== false ) { # Validated; clean up (if needed) and return it