From 34060273e7c24e2df99e953a4333783248a0f74c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 12 Jan 2017 16:46:25 -0800 Subject: [PATCH] Move libs/time/defines.php inclusion from GlobalFunctions to Defines.php * Verified none of these constants depend on each other. * Move them to the top of Defines.php for consistency. Change-Id: I19c77e706d69bff513e4abafd0300207de0dbb1d --- includes/Defines.php | 17 +++++------------ includes/GlobalFunctions.php | 4 ---- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/includes/Defines.php b/includes/Defines.php index 06168980ce..35c2a2d8ad 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -20,6 +20,11 @@ * @file */ +require_once __DIR__ . '/libs/mime/defines.php'; +require_once __DIR__ . '/libs/time/defines.php'; +require_once __DIR__ . '/libs/rdbms/defines.php'; +require_once __DIR__ . '/compat/normal/UtfNormalDefines.php'; + /** * @defgroup Constants MediaWiki constants */ @@ -97,8 +102,6 @@ define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCac define( 'CACHE_ACCEL', 3 ); // APC, XCache or WinCache /**@}*/ -require_once __DIR__ . '/libs/mime/defines.php'; - /**@{ * Antivirus result codes, for use in $wgAntivirusSetup. */ @@ -153,16 +156,6 @@ define( 'EDIT_AUTOSUMMARY', 64 ); define( 'EDIT_INTERNAL', 128 ); /**@}*/ -/** - * Database related - */ -require_once __DIR__ . '/libs/rdbms/defines.php'; - -/** - * Unicode and normalisation related - */ -require_once __DIR__ . '/compat/normal/UtfNormalDefines.php'; - /**@{ * Hook support constants */ diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6549fdd57d..5343248a9c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1999,10 +1999,6 @@ function wfRestoreWarnings() { MediaWiki\suppressWarnings( true ); } -# Autodetect, convert and provide timestamps of various types - -require_once __DIR__ . '/libs/time/defines.php'; - /** * Get a timestamp string in one of various formats * -- 2.20.1