* The user right 'upload_by_url' is no longer given to sysops by default.
This only affects installations which have $wgAllowCopyUploads set to true.
* Removed f-prot support from $wgAntivirusSetup.
+* $wgDBerrorLogInUTC to log error in $wgDBerrorLog using an UTC date instead
+ of the wiki timezone set by $wgLocalTimezone.
=== New features in 1.20 ===
* Added TitleIsAlwaysKnown hook which gets called when determining if a page exists.
/** File to log database errors to */
$wgDBerrorLog = false;
+/**
+ * Override wiki timezone to UTC for wgDBerrorLog
+ * @since 1.20
+ */
+$wgDBerrorLogInUTC = false;
/** When to give an error message */
$wgDBClusterTimeout = 10;
* @param $text String: database error message.
*/
function wfLogDBError( $text ) {
- global $wgDBerrorLog;
+ global $wgDBerrorLog, $wgDBerrorLogInUtc;
if ( $wgDBerrorLog ) {
$host = wfHostname();
$wiki = wfWikiID();
- $text = date( 'D M j G:i:s T Y' ) . "\t$host\t$wiki\t$text";
+
+ if( $wgDBerrorLogInUtc ) {
+ $wikiTimezone = date_default_timezone_get();
+ date_default_timezone_set( 'UTC' );
+ }
+ $date = date( 'D M j G:i:s T Y' );
+ if( $wgDBerrorLogInUtc ) {
+ // Restore timezone
+ date_default_timezone_set( $wikiTimezone );
+ }
+
+ $text = "$date\t$host\t$wiki\t$text";
wfErrorLog( $text, $wgDBerrorLog );
}
}