Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/311059
Change subject: Move database contants to their own file ...................................................................... Move database contants to their own file Change-Id: I47e067687bbce7b89e02a0e732ee27368beddb61 --- M includes/Defines.php A includes/libs/rdbms/defines.php 2 files changed, 36 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/59/311059/1 diff --git a/includes/Defines.php b/includes/Defines.php index ab02a8e..0a0a849 100644 --- a/includes/Defines.php +++ b/includes/Defines.php @@ -24,29 +24,6 @@ * @defgroup Constants MediaWiki constants */ -/**@{ - * Database related constants - */ -define( 'DBO_DEBUG', 1 ); -define( 'DBO_NOBUFFER', 2 ); -define( 'DBO_IGNORE', 4 ); -define( 'DBO_TRX', 8 ); // automatically start transaction on first query -define( 'DBO_DEFAULT', 16 ); -define( 'DBO_PERSISTENT', 32 ); -define( 'DBO_SYSDBA', 64 ); // for oracle maintenance -define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle -define( 'DBO_SSL', 256 ); -define( 'DBO_COMPRESS', 512 ); -/**@}*/ - -/**@{ - * Valid database indexes - * Operation-based indexes - */ -define( 'DB_REPLICA', -1 ); # Read from a replica (or only server) -define( 'DB_MASTER', -2 ); # Write to master (or only server) -/**@}*/ - # Obsolete aliases define( 'DB_SLAVE', -1 ); @@ -185,16 +162,7 @@ define( 'EDIT_INTERNAL', 128 ); /**@}*/ -/**@{ - * Flags for Database::makeList() - * These are also available as Database class constants - */ -define( 'LIST_COMMA', 0 ); -define( 'LIST_AND', 1 ); -define( 'LIST_SET', 2 ); -define( 'LIST_NAMES', 3 ); -define( 'LIST_OR', 4 ); -/**@}*/ +require_once __DIR__ . '/libs/rdbms/defines.php'; /** * Unicode and normalisation related diff --git a/includes/libs/rdbms/defines.php b/includes/libs/rdbms/defines.php new file mode 100644 index 0000000..48baa3c --- /dev/null +++ b/includes/libs/rdbms/defines.php @@ -0,0 +1,35 @@ +<?php + +/**@{ + * Database related constants + */ +define( 'DBO_DEBUG', 1 ); +define( 'DBO_NOBUFFER', 2 ); +define( 'DBO_IGNORE', 4 ); +define( 'DBO_TRX', 8 ); // automatically start transaction on first query +define( 'DBO_DEFAULT', 16 ); +define( 'DBO_PERSISTENT', 32 ); +define( 'DBO_SYSDBA', 64 ); // for oracle maintenance +define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle +define( 'DBO_SSL', 256 ); +define( 'DBO_COMPRESS', 512 ); +/**@}*/ + +/**@{ + * Valid database indexes + * Operation-based indexes + */ +define( 'DB_REPLICA', -1 ); # Read from a replica (or only server) +define( 'DB_MASTER', -2 ); # Write to master (or only server) +/**@}*/ + +/**@{ + * Flags for IDatabase::makeList() + * These are also available as Database class constants + */ +define( 'LIST_COMMA', 0 ); +define( 'LIST_AND', 1 ); +define( 'LIST_SET', 2 ); +define( 'LIST_NAMES', 3 ); +define( 'LIST_OR', 4 ); +/**@}*/ -- To view, visit https://gerrit.wikimedia.org/r/311059 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I47e067687bbce7b89e02a0e732ee27368beddb61 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits