Fix #5375: profiling does not respect read-only mode
authorAntoine Musso <hashar@users.mediawiki.org>
Thu, 10 May 2007 21:05:36 +0000 (21:05 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Thu, 10 May 2007 21:05:36 +0000 (21:05 +0000)
RELEASE-NOTES
includes/Profiler.php

index 0481f44..1c64c94 100644 (file)
@@ -48,6 +48,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Links to the MediaWiki namespace for system messages having their default
   values are no longer shown as nonexistent (e.g., in red)
 * Special:Ipblocklist differentiates between empty list and no search results.
+* (bug 5375) profiling does not respect read-only mode.
 
 == Maintenance script changes since 1.10 ==
 
index da3a82e..c7507cb 100644 (file)
@@ -301,6 +301,9 @@ class Profiler {
         * @static
         */
        function logToDB($name, $timeSum, $eventCount) {
+               # Do not log anything if database is readonly (bug 5375)
+               if( wfReadOnly() ) { return; }
+
                # Warning: $wguname is a live patch, it should be moved to Setup.php
                global $wguname, $wgProfilePerHost;