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 )
?