From 31487e5784847762b725eb47d02eec019dc46cab Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Tue, 17 Jan 2006 16:16:43 +0000 Subject: [PATCH] removed misfeature (ignore writes while in read only mode): more trouble than it's worth --- includes/Database.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index c4302e7602..b7b0a16d76 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -361,17 +361,6 @@ class Database { function query( $sql, $fname = '', $tempIgnore = false ) { global $wgProfiling, $wgCommandLineMode; - if ( wfReadOnly() ) { - # This is a quick check for the most common kinds of write query used - # 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 ) ) { - wfDebug( "Write query from $fname blocked\n" ); - return false; - } - } - if ( $wgProfiling ) { # generalizeSQL will probably cut down the query to reasonable # logging size most of the time. The substr is really just a sanity check. -- 2.20.1