aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/dbal.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-01-10 02:27:18 +0100
committerNils Adermann <naderman@naderman.de>2011-01-10 04:05:23 +0100
commitfb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1 (patch)
treee96dc907ae493b520beccc8823008903c81e86af /phpBB/includes/db/dbal.php
parent5ea59ba3222965c824284a7f0d0648bbe12a7bec (diff)
downloadforums-fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1.tar
forums-fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1.tar.gz
forums-fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1.tar.bz2
forums-fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1.tar.xz
forums-fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1.zip
[task/config-class] Implemented a config class to replace the global array.
There is a phpbb_config class which simply holds an array and does not persist any data. It implements ArrayAccess, Countable and IteratorAggregate to allow regular use of configuration as if it was still an array. The phpbb_config_db class depends on an instance of the dbal and a cache driver. It obtains the configuration data from cache and database as necessary and persists data to the database. The functions set_config and set_config_count remain for backward compatability but they only call methods on the new config class now instead of directly manipulating the database and cache. PHPBB3-9988
Diffstat (limited to 'phpBB/includes/db/dbal.php')
-rw-r--r--phpBB/includes/db/dbal.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index fd0464814f..cfebb61440 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -448,6 +448,28 @@ class dbal
}
/**
+ * Returns SQL string to cast a string expression to an int.
+ *
+ * @param string $expression An expression evaluating to string
+ * @return string Expression returning an int
+ */
+ function cast_expr_to_bigint($expression)
+ {
+ return $expression;
+ }
+
+ /**
+ * Returns SQL string to cast an integer expression to a string.
+ *
+ * @param string $expression An expression evaluating to int
+ * @return string Expression returning a string
+ */
+ function cast_expr_to_string($expression)
+ {
+ return $expression;
+ }
+
+ /**
* Run more than one insert statement.
*
* @param string $table table name to run the statements on