Index: trunk/phase3/includes/Database.php |
— | — | @@ -325,7 +325,7 @@ |
326 | 326 | # in MediaWiki, to provide extra safety in addition to UI-level checks. |
327 | 327 | # It is not intended to prevent every conceivable write query, or even |
328 | 328 | # 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 ) ) { |
330 | 330 | wfDebug( "Write query from $fname blocked\n" ); |
331 | 331 | return false; |
332 | 332 | } |
— | — | @@ -410,10 +410,10 @@ |
411 | 411 | global $wgCommandLineMode, $wgFullyInitialised; |
412 | 412 | # Ignore errors during error handling to avoid infinite recursion |
413 | 413 | $ignore = $this->ignoreErrors( true ); |
414 | | - $this->mErrorCount ++; |
| 414 | + ++$this->mErrorCount; |
415 | 415 | |
416 | 416 | if( $ignore || $tempIgnore ) { |
417 | | - wfDebug("SQL ERROR (ignored): " . $error . "\n"); |
| 417 | + wfDebug("SQL ERROR (ignored): $error\n"); |
418 | 418 | } else { |
419 | 419 | $sql1line = str_replace( "\n", "\\n", $sql ); |
420 | 420 | wfLogDBError("$fname\t{$this->mServer}\t$errno\t$error\t$sql1line\n"); |
— | — | @@ -740,7 +740,7 @@ |
741 | 741 | if( is_array( $table ) ) { |
742 | 742 | $from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) ); |
743 | 743 | } elseif ($table!='') { |
744 | | - $from = ' FROM ' .$this->tableName( $table ); |
| 744 | + $from = ' FROM ' . $this->tableName( $table ); |
745 | 745 | } else { |
746 | 746 | $from = ''; |
747 | 747 | } |