On 1/10/08, amidaniel@svn.wikimedia.org amidaniel@svn.wikimedia.org wrote:
$bot = $wgUser->isAllowed( 'bot' ) || ( $flags & EDIT_FORCE_BOT );
$bot = ( $wgUser->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot' , true ) : 0 ) || ( $flags & EDIT_FORCE_BOT );
...
'rc_bot' => $user->isAllowed( 'bot' ) ? 1 : 0,
'rc_bot' => $user->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot' , true ) : 0,
...
'rc_bot' => $user->isAllowed( 'bot' ) ? 1 : 0,
'rc_bot' => $user->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot' , true ) : 0,
Am I missing something, or are these ternary operators all equivalent to:
$(wgU|u)ser->isAllowed( 'bot' ) && $wgRequest->getBool( 'bot', true )
?
Simetrical schreef:
Am I missing something, or are these ternary operators all equivalent to:
$(wgU|u)ser->isAllowed( 'bot' ) && $wgRequest->getBool( 'bot', true )
?
That's true. The only thing you're missing is that 29539 was reverted (and re-implemented cleanly) a couple of days agp.
Roan Kattouw (Catrope)
On 1/13/08, Roan Kattouw roan.kattouw@home.nl wrote:
That's true. The only thing you're missing is that 29539 was reverted (and re-implemented cleanly) a couple of days agp.
Whoops, forgot about that. :)
wikitech-l@lists.wikimedia.org