r10826 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10825‎ | r10826 | r10827 >
Date:16:36, 29 August 2005
Author:avar
Status:old
Tags:
Comment:
* Source cleanup
Modified paths:
  • /trunk/phase3/includes/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Database.php
@@ -325,7 +325,7 @@
326326 # in MediaWiki, to provide extra safety in addition to UI-level checks.
327327 # It is not intended to prevent every conceivable write query, or even
328328 # to handle such queries gracefully.
329 - if ( preg_match( '/^(update|insert|replace|delete)/i', $sql ) ) {
 329+ if ( preg_match( '/^(?:update|insert|replace|delete)/i', $sql ) ) {
330330 wfDebug( "Write query from $fname blocked\n" );
331331 return false;
332332 }
@@ -410,10 +410,10 @@
411411 global $wgCommandLineMode, $wgFullyInitialised;
412412 # Ignore errors during error handling to avoid infinite recursion
413413 $ignore = $this->ignoreErrors( true );
414 - $this->mErrorCount ++;
 414+ ++$this->mErrorCount;
415415
416416 if( $ignore || $tempIgnore ) {
417 - wfDebug("SQL ERROR (ignored): " . $error . "\n");
 417+ wfDebug("SQL ERROR (ignored): $error\n");
418418 } else {
419419 $sql1line = str_replace( "\n", "\\n", $sql );
420420 wfLogDBError("$fname\t{$this->mServer}\t$errno\t$error\t$sql1line\n");
@@ -740,7 +740,7 @@
741741 if( is_array( $table ) ) {
742742 $from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) );
743743 } elseif ($table!='') {
744 - $from = ' FROM ' .$this->tableName( $table );
 744+ $from = ' FROM ' . $this->tableName( $table );
745745 } else {
746746 $from = '';
747747 }

Status & tagging log