From: Ævar Arnfjörð Bjarmason Date: Mon, 29 Aug 2005 16:36:37 +0000 (+0000) Subject: * Source cleanup X-Git-Tag: 1.6.0~1764 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=7062f265a791f632d4c0acdb3112e6cb96bb747c;p=lhc%2Fweb%2Fwiklou.git * Source cleanup --- diff --git a/includes/Database.php b/includes/Database.php index ba08406d21..446bca5e95 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -325,7 +325,7 @@ class Database { # in MediaWiki, to provide extra safety in addition to UI-level checks. # It is not intended to prevent every conceivable write query, or even # to handle such queries gracefully. - if ( preg_match( '/^(update|insert|replace|delete)/i', $sql ) ) { + if ( preg_match( '/^(?:update|insert|replace|delete)/i', $sql ) ) { wfDebug( "Write query from $fname blocked\n" ); return false; } @@ -410,10 +410,10 @@ class Database { global $wgCommandLineMode, $wgFullyInitialised; # Ignore errors during error handling to avoid infinite recursion $ignore = $this->ignoreErrors( true ); - $this->mErrorCount ++; + ++$this->mErrorCount; if( $ignore || $tempIgnore ) { - wfDebug("SQL ERROR (ignored): " . $error . "\n"); + wfDebug("SQL ERROR (ignored): $error\n"); } else { $sql1line = str_replace( "\n", "\\n", $sql ); wfLogDBError("$fname\t{$this->mServer}\t$errno\t$error\t$sql1line\n"); @@ -740,7 +740,7 @@ class Database { if( is_array( $table ) ) { $from = ' FROM ' . implode( ',', array_map( array( &$this, 'tableName' ), $table ) ); } elseif ($table!='') { - $from = ' FROM ' .$this->tableName( $table ); + $from = ' FROM ' . $this->tableName( $table ); } else { $from = ''; }