summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-11 01:12:23 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-04-11 01:12:23 +0000
commit6f8293a5ae3350f6b5b6877e55accf1b1577d7c0 (patch)
tree7171a97681f5a29cb9a41a62117a9a60945814b1 /includes
parent8926b0a8c13b093128a2a84526b637897ac0b08e (diff)
downloadbrdo-6f8293a5ae3350f6b5b6877e55accf1b1577d7c0.tar.gz
brdo-6f8293a5ae3350f6b5b6877e55accf1b1577d7c0.tar.bz2
#764418 by David_Rothstein, jpmckinney, quiptime, Crell: Move query conditional helper functions to database.inc to avoid fatal errors in lower bootstrap levels.
Diffstat (limited to 'includes')
-rw-r--r--includes/database/database.inc41
-rw-r--r--includes/database/query.inc41
2 files changed, 41 insertions, 41 deletions
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
@@ -2454,6 +2454,47 @@ function db_next_id($existing_id = 0) {
}
/**
+ * 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
@@ -1358,46 +1358,5 @@ 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".
*/