From 6f8293a5ae3350f6b5b6877e55accf1b1577d7c0 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 11 Apr 2010 01:12:23 +0000 Subject: #764418 by David_Rothstein, jpmckinney, quiptime, Crell: Move query conditional helper functions to database.inc to avoid fatal errors in lower bootstrap levels. --- includes/database/database.inc | 41 +++++++++++++++++++++++++++++++++++++++++ includes/database/query.inc | 41 ----------------------------------------- 2 files changed, 41 insertions(+), 41 deletions(-) (limited to 'includes/database') diff --git a/includes/database/database.inc b/includes/database/database.inc index aa4cc671f..933a52819 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -2453,6 +2453,47 @@ function db_next_id($existing_id = 0) { return Database::getConnection()->nextId($existing_id); } +/** + * Returns a new DatabaseCondition, set to "OR" all conditions together. + * + * @return DatabaseCondition + */ +function db_or() { + return new DatabaseCondition('OR'); +} + +/** + * Returns a new DatabaseCondition, set to "AND" all conditions together. + * + * @return DatabaseCondition + */ +function db_and() { + return new DatabaseCondition('AND'); +} + +/** + * Returns a new DatabaseCondition, set to "XOR" all conditions together. + * + * @return DatabaseCondition + */ +function db_xor() { + return new DatabaseCondition('XOR'); +} + +/** + * Returns a new DatabaseCondition, set to the specified conjunction. + * + * Internal API function call. The db_and(), db_or(), and db_xor() + * functions are preferred. + * + * @param $conjunction + * The conjunction to use for query conditions (AND, OR or XOR). + * @return DatabaseCondition + */ +function db_condition($conjunction) { + return new DatabaseCondition($conjunction); +} + /** * @} End of "defgroup database". */ diff --git a/includes/database/query.inc b/includes/database/query.inc index fb4e99968..c3f5acf39 100644 --- a/includes/database/query.inc +++ b/includes/database/query.inc @@ -1357,47 +1357,6 @@ class DatabaseCondition implements QueryConditionInterface, Countable { } -/** - * Returns a new DatabaseCondition, set to "OR" all conditions together. - * - * @return DatabaseCondition - */ -function db_or() { - return new DatabaseCondition('OR'); -} - -/** - * Returns a new DatabaseCondition, set to "AND" all conditions together. - * - * @return DatabaseCondition - */ -function db_and() { - return new DatabaseCondition('AND'); -} - -/** - * Returns a new DatabaseCondition, set to "XOR" all conditions together. - * - * @return DatabaseCondition - */ -function db_xor() { - return new DatabaseCondition('XOR'); -} - -/** - * Returns a new DatabaseCondition, set to the specified conjunction. - * - * Internal API function call. The db_and(), db_or(), and db_xor() - * functions are preferred. - * - * @param $conjunction - * The conjunction to use for query conditions (AND, OR or XOR). - * @return DatabaseCondition - */ -function db_condition($conjunction) { - return new DatabaseCondition($conjunction); -} - /** * @} End of "ingroup database". */ -- cgit v1.2.3