$row = $dbw->fetchObject($res);
$onlyAuthor = $row->rev_user_text;
// Try to find a second contributor
- while(($row = $dbw->fetchObject($res)))
- if($row->rev_user_text != $onlyAuthor)
- {
+ while( $row = $dbw->fetchObject($res) ) {
+ if($row->rev_user_text != $onlyAuthor) {
$onlyAuthor = false;
break;
}
+ }
$dbw->freeResult($res);
// Generate the summary with a '$1' placeholder
- if($blank)
+ if($blank) {
// The current revision is blank and the one before is also
// blank. It's just not our lucky day
$reason = wfMsgForContent('exbeforeblank', '$1');
- else
- {
+ } else {
if($onlyAuthor)
$reason = wfMsgForContent('excontentauthor', '$1', $onlyAuthor);
else
# Check permissions
$permission_errors = $this->mTitle->getUserPermissionsErrors( 'delete', $wgUser );
- if (count($permission_errors)>0)
- {
+ if (count($permission_errors)>0) {
$wgOut->showPermissionsErrorPage( $permission_errors );
return;
}
if( wfEmptyMsg( 'semiprotectedpagewarning', $notice ) || $notice == '-' )
$notice = '';
} else {
- # Then it must be protected based on static groups (regular)
+ # Then it must be protected based on static groups (regular)
$notice = wfMsg( 'protectedpagewarning' );
}
$wgOut->addWikiText( $notice );
* @access private
*/
function reallyOpenConnection( &$server ) {
+ wfProfileIn( __METHOD__ );
if( !is_array( $server ) ) {
+ wfProfileOut( __METHOD__ );
throw new MWException( 'You must update your load-balancing configuration. See DefaultSettings.php entry for $wgDBservers.' );
}
# Create object
$db = new $class( $host, $user, $password, $dbname, 1, $flags );
$db->setLBInfo( $server );
+ wfProfileOut( __METHOD__ );
return $db;
}