From da2752e4004b296ae5acdd08b7c0a758d8f61e9d Mon Sep 17 00:00:00 2001
From: Nils Adermann <naderman@naderman.de>
Date: Sun, 14 Jul 2013 13:30:52 -0400
Subject: [ticket/11700] Modify all code to use the new interface names

PHPBB3-11700
---
 phpBB/phpbb/config/db.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'phpBB/phpbb/config')

diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php
index b18369a479..25647e1d0b 100644
--- a/phpBB/phpbb/config/db.php
+++ b/phpBB/phpbb/config/db.php
@@ -23,7 +23,7 @@ class phpbb_config_db extends phpbb_config
 {
 	/**
 	* Cache instance
-	* @var phpbb_cache_driver_interface
+	* @var phpbb_cache_driver_driver_interface
 	*/
 	protected $cache;
 
@@ -43,10 +43,10 @@ class phpbb_config_db extends phpbb_config
 	* Creates a configuration container with a default set of values
 	*
 	* @param phpbb_db_driver              $db    Database connection
-	* @param phpbb_cache_driver_interface $cache Cache instance
+	* @param phpbb_cache_driver_driver_interface $cache Cache instance
 	* @param string                       $table Configuration table name
 	*/
-	public function __construct(phpbb_db_driver $db, phpbb_cache_driver_interface $cache, $table)
+	public function __construct(phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $table)
 	{
 		$this->db = $db;
 		$this->cache = $cache;
-- 
cgit v1.2.1


From b95fdacdd378877d277e261465da73deb06e50da Mon Sep 17 00:00:00 2001
From: Nils Adermann <naderman@naderman.de>
Date: Tue, 10 Sep 2013 14:01:09 +0200
Subject: [ticket/11700] Move all recent code to namespaces

PHPBB3-11700
---
 phpBB/phpbb/config/config.php  |  8 +++++---
 phpBB/phpbb/config/db.php      | 16 +++++++++-------
 phpBB/phpbb/config/db_text.php | 12 +++++++-----
 3 files changed, 21 insertions(+), 15 deletions(-)

(limited to 'phpBB/phpbb/config')

diff --git a/phpBB/phpbb/config/config.php b/phpBB/phpbb/config/config.php
index 4b533dd55c..dc865df707 100644
--- a/phpBB/phpbb/config/config.php
+++ b/phpBB/phpbb/config/config.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\config;
+
 /**
 * @ignore
 */
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
 * Configuration container class
 * @package phpBB3
 */
-class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
+class config implements \ArrayAccess, \IteratorAggregate, \Countable
 {
 	/**
 	* The configuration data
@@ -44,7 +46,7 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
 	*/
 	public function getIterator()
 	{
-		return new ArrayIterator($this->config);
+		return new \ArrayIterator($this->config);
 	}
 
 	/**
@@ -90,7 +92,7 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
 	*/
 	public function offsetUnset($key)
 	{
-		trigger_error('Config values have to be deleted explicitly with the phpbb_config::delete($key) method.', E_USER_ERROR);
+		trigger_error('Config values have to be deleted explicitly with the \phpbb\config\config::delete($key) method.', E_USER_ERROR);
 	}
 
 	/**
diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php
index 25647e1d0b..7174327ef3 100644
--- a/phpBB/phpbb/config/db.php
+++ b/phpBB/phpbb/config/db.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\config;
+
 /**
 * @ignore
 */
@@ -19,17 +21,17 @@ if (!defined('IN_PHPBB'))
 * Configuration container class
 * @package phpBB3
 */
-class phpbb_config_db extends phpbb_config
+class db extends \phpbb\config\config
 {
 	/**
 	* Cache instance
-	* @var phpbb_cache_driver_driver_interface
+	* @var \phpbb\cache\driver\driver_interface
 	*/
 	protected $cache;
 
 	/**
 	* Database connection
-	* @var phpbb_db_driver
+	* @var \phpbb\db\driver\driver
 	*/
 	protected $db;
 
@@ -42,11 +44,11 @@ class phpbb_config_db extends phpbb_config
 	/**
 	* Creates a configuration container with a default set of values
 	*
-	* @param phpbb_db_driver              $db    Database connection
-	* @param phpbb_cache_driver_driver_interface $cache Cache instance
+	* @param \phpbb\db\driver\driver              $db    Database connection
+	* @param \phpbb\cache\driver\driver_interface $cache Cache instance
 	* @param string                       $table Configuration table name
 	*/
-	public function __construct(phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $table)
+	public function __construct(\phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $table)
 	{
 		$this->db = $db;
 		$this->cache = $cache;
@@ -176,7 +178,7 @@ class phpbb_config_db extends phpbb_config
 	/**
 	* Increments an integer config value directly in the database.
 	*
-	* Using this method instead of setting the new value directly avoids race
+	* Using this method instead of setting the new \value directly avoids race
 	* conditions and unlike set_atomic it cannot fail.
 	*
 	* @param string $key       The configuration option's name
diff --git a/phpBB/phpbb/config/db_text.php b/phpBB/phpbb/config/db_text.php
index b365cb5c77..3ee3351e19 100644
--- a/phpBB/phpbb/config/db_text.php
+++ b/phpBB/phpbb/config/db_text.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\config;
+
 /**
 * @ignore
 */
@@ -17,16 +19,16 @@ if (!defined('IN_PHPBB'))
 
 /**
 * Manages configuration options with an arbitrary length value stored in a TEXT
-* column. In constrast to class phpbb_config_db, values are never cached and
+* column. In constrast to class \phpbb\config\db, values are never cached and
 * prefetched, but every get operation sends a query to the database.
 *
 * @package phpBB3
 */
-class phpbb_config_db_text
+class db_text
 {
 	/**
 	* Database connection
-	* @var phpbb_db_driver
+	* @var \phpbb\db\driver\driver
 	*/
 	protected $db;
 
@@ -37,10 +39,10 @@ class phpbb_config_db_text
 	protected $table;
 
 	/**
-	* @param phpbb_db_driver $db        Database connection
+	* @param \phpbb\db\driver\driver $db        Database connection
 	* @param string          $table     Table name
 	*/
-	public function __construct(phpbb_db_driver $db, $table)
+	public function __construct(\phpbb\db\driver\driver $db, $table)
 	{
 		$this->db = $db;
 		$this->table = $this->db->sql_escape($table);
-- 
cgit v1.2.1


From d905358e2be11cc3fe040036b1138e54be7f30dc Mon Sep 17 00:00:00 2001
From: Nils Adermann <naderman@naderman.de>
Date: Mon, 16 Sep 2013 05:20:27 +0200
Subject: [ticket/11700] Fix leftover backslashes in comments

PHPBB3-11700
---
 phpBB/phpbb/config/db.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'phpBB/phpbb/config')

diff --git a/phpBB/phpbb/config/db.php b/phpBB/phpbb/config/db.php
index 7174327ef3..0a490af14f 100644
--- a/phpBB/phpbb/config/db.php
+++ b/phpBB/phpbb/config/db.php
@@ -178,7 +178,7 @@ class db extends \phpbb\config\config
 	/**
 	* Increments an integer config value directly in the database.
 	*
-	* Using this method instead of setting the new \value directly avoids race
+	* Using this method instead of setting the new value directly avoids race
 	* conditions and unlike set_atomic it cannot fail.
 	*
 	* @param string $key       The configuration option's name
-- 
cgit v1.2.1