From fb2642bbc6360dacfd4a3cc9f7e9447b02cb46a1 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 10 Jan 2011 02:27:18 +0100 Subject: [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 --- phpBB/includes/db/postgres.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'phpBB/includes/db/postgres.php') diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php index eb297b8db5..424ce12245 100644 --- a/phpBB/includes/db/postgres.php +++ b/phpBB/includes/db/postgres.php @@ -365,6 +365,22 @@ class dbal_postgres extends dbal return $expression; } + /** + * @inheritdoc + */ + function cast_expr_to_bigint($expression) + { + return 'CAST(' . $expression . ' as DECIMAL(255, 0))'; + } + + /** + * @inheritdoc + */ + function cast_expr_to_string($expression) + { + return 'CAST(' . $expression . ' as VARCHAR(255))'; + } + /** * return sql error array * @access private -- cgit v1.2.1