X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FDefines.php;h=8ac84e5ab5343ca5dc4937fdce833a8cc8e47efe;hp=06168980ce354312053c9aa14b2aaa200dcdedf0;hb=0bea246d2cf628c69f971e5adfdecfdacc6368d7;hpb=adae996840b9e782f6e14b21c433a83e37c3a74e diff --git a/includes/Defines.php b/includes/Defines.php index 06168980ce..214eba5571 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -20,11 +20,29 @@ * @file */ +require_once __DIR__ . '/libs/mime/defines.php'; +require_once __DIR__ . '/libs/rdbms/defines.php'; +require_once __DIR__ . '/compat/normal/UtfNormalDefines.php'; + +use Wikimedia\Rdbms\IDatabase; + /** * @defgroup Constants MediaWiki constants */ +/** + * The running version of MediaWiki. + * + * This replaces the the $wgVersion global found in earlier versions. + * + * @since 1.31.7 + */ +define( 'MW_VERSION', '1.31.7' ); + # Obsolete aliases +/** + * @deprecated since 1.28 + */ define( 'DB_SLAVE', -1 ); /**@{ @@ -94,11 +112,9 @@ define( 'CACHE_ANYTHING', -1 ); // Use anything, as long as it works define( 'CACHE_NONE', 0 ); // Do not cache define( 'CACHE_DB', 1 ); // Store cache objects in the DB define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers -define( 'CACHE_ACCEL', 3 ); // APC, XCache or WinCache +define( 'CACHE_ACCEL', 3 ); // APC or WinCache /**@}*/ -require_once __DIR__ . '/libs/mime/defines.php'; - /**@{ * Antivirus result codes, for use in $wgAntivirusSetup. */ @@ -153,16 +169,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 */ @@ -273,3 +279,28 @@ define( 'CONTENT_FORMAT_XML', 'application/xml' ); */ define( 'SHELL_MAX_ARG_STRLEN', '100000' ); /**@}*/ + +/**@{ + * Schema change migration flags. + * + * Used as values of a feature flag for an orderly transition from an old + * schema to a new schema. + * + * - MIGRATION_OLD: Only read and write the old schema. The new schema need not + * even exist. This is used from when the patch is merged until the schema + * change is actually applied to the database. + * - MIGRATION_WRITE_BOTH: Write both the old and new schema. Read the new + * schema preferentially, falling back to the old. This is used while the + * change is being tested, allowing easy roll-back to the old schema. + * - MIGRATION_WRITE_NEW: Write only the new schema. Read the new schema + * preferentially, falling back to the old. This is used while running the + * maintenance script to migrate existing entries in the old schema to the + * new schema. + * - MIGRATION_NEW: Only read and write the new schema. The old schema (and the + * feature flag) may now be removed. + */ +define( 'MIGRATION_OLD', 0 ); +define( 'MIGRATION_WRITE_BOTH', 1 ); +define( 'MIGRATION_WRITE_NEW', 2 ); +define( 'MIGRATION_NEW', 3 ); +/**@}*/