From 9d76d8869551264b5d944cc4b0f0fa49a6bef912 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 10 May 2007 21:05:36 +0000 Subject: [PATCH] Fix #5375: profiling does not respect read-only mode --- RELEASE-NOTES | 1 + includes/Profiler.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0481f44d90..1c64c940e7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/Profiler.php b/includes/Profiler.php index da3a82eda6..c7507cb949 100644 --- a/includes/Profiler.php +++ b/includes/Profiler.php @@ -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; -- 2.20.1