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/cron/task/core/prune_forum.php | 6 +++---
 phpBB/phpbb/cron/task/core/tidy_cache.php  | 4 ++--
 phpBB/phpbb/cron/task/parametrized.php     | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

(limited to 'phpBB/phpbb/cron')

diff --git a/phpBB/phpbb/cron/task/core/prune_forum.php b/phpBB/phpbb/cron/task/core/prune_forum.php
index e3c497f072..0e4c75c77f 100644
--- a/phpBB/phpbb/cron/task/core/prune_forum.php
+++ b/phpBB/phpbb/cron/task/core/prune_forum.php
@@ -132,15 +132,15 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
 
 	/**
 	* Parses parameters found in $request, which is an instance of
-	* phpbb_request_interface.
+	* phpbb_request_request_interface.
 	*
 	* It is expected to have a key f whose value is id of the forum to be pruned.
 	*
-	* @param phpbb_request_interface $request Request object.
+	* @param phpbb_request_request_interface $request Request object.
 	*
 	* @return null
 	*/
-	public function parse_parameters(phpbb_request_interface $request)
+	public function parse_parameters(phpbb_request_request_interface $request)
 	{
 		$this->forum_data = null;
 		if ($request->is_set('f'))
diff --git a/phpBB/phpbb/cron/task/core/tidy_cache.php b/phpBB/phpbb/cron/task/core/tidy_cache.php
index 16a45dae7c..4618e8200e 100644
--- a/phpBB/phpbb/cron/task/core/tidy_cache.php
+++ b/phpBB/phpbb/cron/task/core/tidy_cache.php
@@ -29,9 +29,9 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
 	* Constructor.
 	*
 	* @param phpbb_config $config The config
-	* @param phpbb_cache_driver_interface $cache The cache driver
+	* @param phpbb_cache_driver_driver_interface $cache The cache driver
 	*/
-	public function __construct(phpbb_config $config, phpbb_cache_driver_interface $cache)
+	public function __construct(phpbb_config $config, phpbb_cache_driver_driver_interface $cache)
 	{
 		$this->config = $config;
 		$this->cache = $cache;
diff --git a/phpBB/phpbb/cron/task/parametrized.php b/phpBB/phpbb/cron/task/parametrized.php
index 5f0e46eafc..9a6a55c6bc 100644
--- a/phpBB/phpbb/cron/task/parametrized.php
+++ b/phpBB/phpbb/cron/task/parametrized.php
@@ -39,14 +39,14 @@ interface phpbb_cron_task_parametrized extends phpbb_cron_task
 
 	/**
 	* Parses parameters found in $request, which is an instance of
-	* phpbb_request_interface.
+	* phpbb_request_request_interface.
 	*
 	* $request contains user input and must not be trusted.
 	* Cron task must validate all data before using it.
 	*
-	* @param phpbb_request_interface $request Request object.
+	* @param phpbb_request_request_interface $request Request object.
 	*
 	* @return null
 	*/
-	public function parse_parameters(phpbb_request_interface $request);
+	public function parse_parameters(phpbb_request_request_interface $request);
 }
-- 
cgit v1.2.1


From a79e3b341578696c1dd6720d7589b10a3226dbb5 Mon Sep 17 00:00:00 2001
From: Nathan Guse <nathaniel.guse@gmail.com>
Date: Sat, 27 Jul 2013 20:37:50 -0500
Subject: [ticket/11373] Prune old read notifications with cron

PHPBB3-11373
---
 phpBB/phpbb/cron/task/core/prune_notifications.php | 75 ++++++++++++++++++++++
 1 file changed, 75 insertions(+)
 create mode 100644 phpBB/phpbb/cron/task/core/prune_notifications.php

(limited to 'phpBB/phpbb/cron')

diff --git a/phpBB/phpbb/cron/task/core/prune_notifications.php b/phpBB/phpbb/cron/task/core/prune_notifications.php
new file mode 100644
index 0000000000..6d38091e9f
--- /dev/null
+++ b/phpBB/phpbb/cron/task/core/prune_notifications.php
@@ -0,0 +1,75 @@
+<?php
+/**
+*
+* @package phpBB3
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+	exit;
+}
+
+/**
+* Prune notifications cron task.
+*
+* @package phpBB3
+*/
+class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base
+{
+	protected $config;
+	protected $notification_manager;
+
+	/**
+	* Constructor.
+	*
+	* @param phpbb_config $config The config
+	* @param phpbb_notification_manager $notification_manager Notification manager
+	*/
+	public function __construct(phpbb_config $config, phpbb_notification_manager $notification_manager)
+	{
+		$this->config = $config;
+		$this->notification_manager = $notification_manager;
+	}
+
+	/**
+	* Runs this cron task.
+	*
+	* @return null
+	*/
+	public function run()
+	{
+		// time minus expire days in seconds
+		$timestamp = time() - ($this->config['read_notification_expire_days'] * 60 * 60 * 24);
+		$this->notification_manager->prune_notifications($timestamp);
+	}
+
+	/**
+	* Returns whether this cron task can run, given current board configuration.=
+	*
+	* @return bool
+	*/
+	public function is_runnable()
+	{
+		return (bool) $this->config['read_notification_expire_days'];
+	}
+
+	/**
+	* Returns whether this cron task should run now, because enough time
+	* has passed since it was last run.
+	*
+	* The interval between prune notifications is specified in board
+	* configuration.
+	*
+	* @return bool
+	*/
+	public function should_run()
+	{
+		return $this->config['read_notification_last_gc'] < time() - $this->config['read_notification_gc'];
+	}
+}
-- 
cgit v1.2.1


From 0a7508439f20b358f1e51d3f2d8105903588e430 Mon Sep 17 00:00:00 2001
From: Nathan Guse <nathaniel.guse@gmail.com>
Date: Wed, 28 Aug 2013 12:39:57 -0500
Subject: [ticket/11373] Use inheritdoc

PHPBB3-11373
---
 phpBB/phpbb/cron/task/core/prune_notifications.php | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

(limited to 'phpBB/phpbb/cron')

diff --git a/phpBB/phpbb/cron/task/core/prune_notifications.php b/phpBB/phpbb/cron/task/core/prune_notifications.php
index 6d38091e9f..296c0ae64f 100644
--- a/phpBB/phpbb/cron/task/core/prune_notifications.php
+++ b/phpBB/phpbb/cron/task/core/prune_notifications.php
@@ -38,9 +38,7 @@ class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base
 	}
 
 	/**
-	* Runs this cron task.
-	*
-	* @return null
+	* {@inheritdoc}
 	*/
 	public function run()
 	{
@@ -50,9 +48,7 @@ class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base
 	}
 
 	/**
-	* Returns whether this cron task can run, given current board configuration.=
-	*
-	* @return bool
+	* {@inheritdoc}
 	*/
 	public function is_runnable()
 	{
@@ -60,13 +56,7 @@ class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base
 	}
 
 	/**
-	* Returns whether this cron task should run now, because enough time
-	* has passed since it was last run.
-	*
-	* The interval between prune notifications is specified in board
-	* configuration.
-	*
-	* @return bool
+	* {@inheritdoc}
 	*/
 	public function should_run()
 	{
-- 
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/cron/manager.php                    | 24 +++++++++++++-----------
 phpBB/phpbb/cron/task/base.php                  |  4 +++-
 phpBB/phpbb/cron/task/core/prune_all_forums.php | 10 ++++++----
 phpBB/phpbb/cron/task/core/prune_forum.php      | 16 +++++++++-------
 phpBB/phpbb/cron/task/core/queue.php            | 10 ++++++----
 phpBB/phpbb/cron/task/core/tidy_cache.php       | 10 ++++++----
 phpBB/phpbb/cron/task/core/tidy_database.php    |  8 +++++---
 phpBB/phpbb/cron/task/core/tidy_search.php      | 14 ++++++++------
 phpBB/phpbb/cron/task/core/tidy_sessions.php    | 10 ++++++----
 phpBB/phpbb/cron/task/core/tidy_warnings.php    |  8 +++++---
 phpBB/phpbb/cron/task/parametrized.php          | 10 ++++++----
 phpBB/phpbb/cron/task/task.php                  |  4 +++-
 phpBB/phpbb/cron/task/wrapper.php               | 10 ++++++----
 13 files changed, 82 insertions(+), 56 deletions(-)

(limited to 'phpBB/phpbb/cron')

diff --git a/phpBB/phpbb/cron/manager.php b/phpBB/phpbb/cron/manager.php
index 84c9650830..f58ba64a3d 100644
--- a/phpBB/phpbb/cron/manager.php
+++ b/phpBB/phpbb/cron/manager.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron;
+
 /**
 * @ignore
 */
@@ -22,10 +24,10 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_manager
+class manager
 {
 	/**
-	* Set of phpbb_cron_task_wrapper objects.
+	* Set of \phpbb\cron\task\wrapper objects.
 	* Array holding all tasks that have been found.
 	*
 	* @var array
@@ -52,7 +54,7 @@ class phpbb_cron_manager
 	* Loads tasks given by name, wraps them
 	* and puts them into $this->tasks.
 	*
-	* @param array|Traversable $tasks		Array of instances of phpbb_cron_task
+	* @param array|Traversable $tasks		Array of instances of \phpbb\cron\task\task
 	*
 	* @return null
 	*/
@@ -71,7 +73,7 @@ class phpbb_cron_manager
 	*
 	* If no tasks are ready, null is returned.
 	*
-	* @return phpbb_cron_task_wrapper|null
+	* @return \phpbb\cron\task\wrapper|null
 	*/
 	public function find_one_ready_task()
 	{
@@ -88,7 +90,7 @@ class phpbb_cron_manager
 	/**
 	* Finds all tasks that are ready to run.
 	*
-	* @return array		List of tasks which are ready to run (wrapped in phpbb_cron_task_wrapper).
+	* @return array		List of tasks which are ready to run (wrapped in \phpbb\cron\task\wrapper).
 	*/
 	public function find_all_ready_tasks()
 	{
@@ -111,7 +113,7 @@ class phpbb_cron_manager
 	* Web runner uses this method to resolve names to tasks.
 	*
 	* @param string				$name Name of the task to look up.
-	* @return phpbb_cron_task	A task corresponding to the given name, or null.
+	* @return \phpbb\cron\task\task	A task corresponding to the given name, or null.
 	*/
 	public function find_task($name)
 	{
@@ -126,13 +128,13 @@ class phpbb_cron_manager
 	}
 
 	/**
-	* Wraps a task inside an instance of phpbb_cron_task_wrapper.
+	* Wraps a task inside an instance of \phpbb\cron\task\wrapper.
 	*
-	* @param  phpbb_cron_task 			$task The task.
-	* @return phpbb_cron_task_wrapper	The wrapped task.
+	* @param  \phpbb\cron\task\task 			$task The task.
+	* @return \phpbb\cron\task\wrapper	The wrapped task.
 	*/
-	public function wrap_task(phpbb_cron_task $task)
+	public function wrap_task(\phpbb\cron\task\task $task)
 	{
-		return new phpbb_cron_task_wrapper($task, $this->phpbb_root_path, $this->php_ext);
+		return new \phpbb\cron\task\wrapper($task, $this->phpbb_root_path, $this->php_ext);
 	}
 }
diff --git a/phpBB/phpbb/cron/task/base.php b/phpBB/phpbb/cron/task/base.php
index 94a2f267b4..f30c9daf1b 100644
--- a/phpBB/phpbb/cron/task/base.php
+++ b/phpBB/phpbb/cron/task/base.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task;
+
 /**
 * @ignore
 */
@@ -26,7 +28,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-abstract class phpbb_cron_task_base implements phpbb_cron_task
+abstract class base implements \phpbb\cron\task\task
 {
 	private $name;
 
diff --git a/phpBB/phpbb/cron/task/core/prune_all_forums.php b/phpBB/phpbb/cron/task/core/prune_all_forums.php
index 2c5d38cec0..8e3ef25ce6 100644
--- a/phpBB/phpbb/cron/task/core/prune_all_forums.php
+++ b/phpBB/phpbb/cron/task/core/prune_all_forums.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
+class prune_all_forums extends \phpbb\cron\task\base
 {
 	protected $phpbb_root_path;
 	protected $php_ext;
@@ -36,10 +38,10 @@ class phpbb_cron_task_core_prune_all_forums extends phpbb_cron_task_base
 	*
 	* @param string $phpbb_root_path The root path
 	* @param string $php_ext The PHP extension
-	* @param phpbb_config $config The config
-	* @param phpbb_db_driver $db The db connection
+	* @param \phpbb\config\config $config The config
+	* @param \phpbb\db\driver\driver $db The db connection
 	*/
-	public function __construct($phpbb_root_path, $php_ext, phpbb_config $config, phpbb_db_driver $db)
+	public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
 	{
 		$this->phpbb_root_path = $phpbb_root_path;
 		$this->php_ext = $php_ext;
diff --git a/phpBB/phpbb/cron/task/core/prune_forum.php b/phpBB/phpbb/cron/task/core/prune_forum.php
index 0e4c75c77f..f14ab7b702 100644
--- a/phpBB/phpbb/cron/task/core/prune_forum.php
+++ b/phpBB/phpbb/cron/task/core/prune_forum.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -24,7 +26,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements phpbb_cron_task_parametrized
+class prune_forum extends \phpbb\cron\task\base implements \phpbb\cron\task\parametrized
 {
 	protected $phpbb_root_path;
 	protected $php_ext;
@@ -46,10 +48,10 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
 	*
 	* @param string $phpbb_root_path The root path
 	* @param string $php_ext The PHP extension
-	* @param phpbb_config $config The config
-	* @param phpbb_db_driver $db The db connection
+	* @param \phpbb\config\config $config The config
+	* @param \phpbb\db\driver\driver $db The db connection
 	*/
-	public function __construct($phpbb_root_path, $php_ext, phpbb_config $config, phpbb_db_driver $db)
+	public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config, \phpbb\db\driver\driver $db)
 	{
 		$this->phpbb_root_path = $phpbb_root_path;
 		$this->php_ext = $php_ext;
@@ -132,15 +134,15 @@ class phpbb_cron_task_core_prune_forum extends phpbb_cron_task_base implements p
 
 	/**
 	* Parses parameters found in $request, which is an instance of
-	* phpbb_request_request_interface.
+	* \phpbb\request\request_interface.
 	*
 	* It is expected to have a key f whose value is id of the forum to be pruned.
 	*
-	* @param phpbb_request_request_interface $request Request object.
+	* @param \phpbb\request\request_interface $request Request object.
 	*
 	* @return null
 	*/
-	public function parse_parameters(phpbb_request_request_interface $request)
+	public function parse_parameters(\phpbb\request\request_interface $request)
 	{
 		$this->forum_data = null;
 		if ($request->is_set('f'))
diff --git a/phpBB/phpbb/cron/task/core/queue.php b/phpBB/phpbb/cron/task/core/queue.php
index 732f9c6bea..cb13df86df 100644
--- a/phpBB/phpbb/cron/task/core/queue.php
+++ b/phpBB/phpbb/cron/task/core/queue.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_queue extends phpbb_cron_task_base
+class queue extends \phpbb\cron\task\base
 {
 	protected $phpbb_root_path;
 	protected $php_ext;
@@ -31,9 +33,9 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base
 	*
 	* @param string $phpbb_root_path The root path
 	* @param string $php_ext The PHP extension
-	* @param phpbb_config $config The config
+	* @param \phpbb\config\config $config The config
 	*/
-	public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
+	public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
 	{
 		$this->phpbb_root_path = $phpbb_root_path;
 		$this->php_ext = $php_ext;
@@ -51,7 +53,7 @@ class phpbb_cron_task_core_queue extends phpbb_cron_task_base
 		{
 			include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext);
 		}
-		$queue = new queue();
+		$queue = new \queue();
 		$queue->process();
 	}
 
diff --git a/phpBB/phpbb/cron/task/core/tidy_cache.php b/phpBB/phpbb/cron/task/core/tidy_cache.php
index 4618e8200e..021d5fd8a3 100644
--- a/phpBB/phpbb/cron/task/core/tidy_cache.php
+++ b/phpBB/phpbb/cron/task/core/tidy_cache.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
+class tidy_cache extends \phpbb\cron\task\base
 {
 	protected $config;
 	protected $cache;
@@ -28,10 +30,10 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
 	/**
 	* Constructor.
 	*
-	* @param phpbb_config $config The config
-	* @param phpbb_cache_driver_driver_interface $cache The cache driver
+	* @param \phpbb\config\config $config The config
+	* @param \phpbb\cache\driver\driver_interface $cache The cache driver
 	*/
-	public function __construct(phpbb_config $config, phpbb_cache_driver_driver_interface $cache)
+	public function __construct(\phpbb\config\config $config, \phpbb\cache\driver\driver_interface $cache)
 	{
 		$this->config = $config;
 		$this->cache = $cache;
diff --git a/phpBB/phpbb/cron/task/core/tidy_database.php b/phpBB/phpbb/cron/task/core/tidy_database.php
index b882e7b500..d03cba1d86 100644
--- a/phpBB/phpbb/cron/task/core/tidy_database.php
+++ b/phpBB/phpbb/cron/task/core/tidy_database.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
+class tidy_database extends \phpbb\cron\task\base
 {
 	protected $phpbb_root_path;
 	protected $php_ext;
@@ -31,9 +33,9 @@ class phpbb_cron_task_core_tidy_database extends phpbb_cron_task_base
 	*
 	* @param string $phpbb_root_path The root path
 	* @param string $php_ext The PHP extension
-	* @param phpbb_config $config The config
+	* @param \phpbb\config\config $config The config
 	*/
-	public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
+	public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
 	{
 		$this->phpbb_root_path = $phpbb_root_path;
 		$this->php_ext = $php_ext;
diff --git a/phpBB/phpbb/cron/task/core/tidy_search.php b/phpBB/phpbb/cron/task/core/tidy_search.php
index a3d5b7dbd2..ebd0d86cbc 100644
--- a/phpBB/phpbb/cron/task/core/tidy_search.php
+++ b/phpBB/phpbb/cron/task/core/tidy_search.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
+class tidy_search extends \phpbb\cron\task\base
 {
 	protected $phpbb_root_path;
 	protected $php_ext;
@@ -36,12 +38,12 @@ class phpbb_cron_task_core_tidy_search extends phpbb_cron_task_base
 	*
 	* @param string $phpbb_root_path The root path
 	* @param string $php_ext The PHP extension
-	* @param phpbb_auth $auth The auth
-	* @param phpbb_config $config The config
-	* @param phpbb_db_driver $db The db connection
-	* @param phpbb_user $user The user
+	* @param \phpbb\auth\auth $auth The auth
+	* @param \phpbb\config\config $config The config
+	* @param \phpbb\db\driver\driver $db The db connection
+	* @param \phpbb\user $user The user
 	*/
-	public function __construct($phpbb_root_path, $php_ext, phpbb_auth $auth, phpbb_config $config, phpbb_db_driver $db, phpbb_user $user)
+	public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver $db, \phpbb\user $user)
 	{
 		$this->phpbb_root_path = $phpbb_root_path;
 		$this->php_ext = $php_ext;
diff --git a/phpBB/phpbb/cron/task/core/tidy_sessions.php b/phpBB/phpbb/cron/task/core/tidy_sessions.php
index 95f55235c9..5df019ae46 100644
--- a/phpBB/phpbb/cron/task/core/tidy_sessions.php
+++ b/phpBB/phpbb/cron/task/core/tidy_sessions.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -20,7 +22,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base
+class tidy_sessions extends \phpbb\cron\task\base
 {
 	protected $config;
 	protected $user;
@@ -28,10 +30,10 @@ class phpbb_cron_task_core_tidy_sessions extends phpbb_cron_task_base
 	/**
 	* Constructor.
 	*
-	* @param phpbb_config $config The config
-	* @param phpbb_user $user The user
+	* @param \phpbb\config\config $config The config
+	* @param \phpbb\user $user The user
 	*/
-	public function __construct(phpbb_config $config, phpbb_user $user)
+	public function __construct(\phpbb\config\config $config, \phpbb\user $user)
 	{
 		$this->config = $config;
 		$this->user = $user;
diff --git a/phpBB/phpbb/cron/task/core/tidy_warnings.php b/phpBB/phpbb/cron/task/core/tidy_warnings.php
index 2a7798e56e..1cc0abbe88 100644
--- a/phpBB/phpbb/cron/task/core/tidy_warnings.php
+++ b/phpBB/phpbb/cron/task/core/tidy_warnings.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task\core;
+
 /**
 * @ignore
 */
@@ -22,7 +24,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
+class tidy_warnings extends \phpbb\cron\task\base
 {
 	protected $phpbb_root_path;
 	protected $php_ext;
@@ -33,9 +35,9 @@ class phpbb_cron_task_core_tidy_warnings extends phpbb_cron_task_base
 	*
 	* @param string $phpbb_root_path The root path
 	* @param string $php_ext The PHP extension
-	* @param phpbb_config $config The config
+	* @param \phpbb\config\config $config The config
 	*/
-	public function __construct($phpbb_root_path, $php_ext, phpbb_config $config)
+	public function __construct($phpbb_root_path, $php_ext, \phpbb\config\config $config)
 	{
 		$this->phpbb_root_path = $phpbb_root_path;
 		$this->php_ext = $php_ext;
diff --git a/phpBB/phpbb/cron/task/parametrized.php b/phpBB/phpbb/cron/task/parametrized.php
index 9a6a55c6bc..1d2f449c58 100644
--- a/phpBB/phpbb/cron/task/parametrized.php
+++ b/phpBB/phpbb/cron/task/parametrized.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task;
+
 /**
 * @ignore
 */
@@ -26,7 +28,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-interface phpbb_cron_task_parametrized extends phpbb_cron_task
+interface parametrized extends \phpbb\cron\task\task
 {
 	/**
 	* Returns parameters of this cron task as an array.
@@ -39,14 +41,14 @@ interface phpbb_cron_task_parametrized extends phpbb_cron_task
 
 	/**
 	* Parses parameters found in $request, which is an instance of
-	* phpbb_request_request_interface.
+	* \phpbb\request\request_interface.
 	*
 	* $request contains user input and must not be trusted.
 	* Cron task must validate all data before using it.
 	*
-	* @param phpbb_request_request_interface $request Request object.
+	* @param \phpbb\request\request_interface $request Request object.
 	*
 	* @return null
 	*/
-	public function parse_parameters(phpbb_request_request_interface $request);
+	public function parse_parameters(\phpbb\request\request_interface $request);
 }
diff --git a/phpBB/phpbb/cron/task/task.php b/phpBB/phpbb/cron/task/task.php
index 2d585df96d..84218c4fc9 100644
--- a/phpBB/phpbb/cron/task/task.php
+++ b/phpBB/phpbb/cron/task/task.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task;
+
 /**
 * @ignore
 */
@@ -19,7 +21,7 @@ if (!defined('IN_PHPBB'))
 * Cron task interface
 * @package phpBB3
 */
-interface phpbb_cron_task
+interface task
 {
 	/**
 	* Returns the name of the task.
diff --git a/phpBB/phpbb/cron/task/wrapper.php b/phpBB/phpbb/cron/task/wrapper.php
index 386fb5b383..aa015966c6 100644
--- a/phpBB/phpbb/cron/task/wrapper.php
+++ b/phpBB/phpbb/cron/task/wrapper.php
@@ -7,6 +7,8 @@
 *
 */
 
+namespace phpbb\cron\task;
+
 /**
 * @ignore
 */
@@ -21,7 +23,7 @@ if (!defined('IN_PHPBB'))
 *
 * @package phpBB3
 */
-class phpbb_cron_task_wrapper
+class wrapper
 {
 	protected $task;
 	protected $phpbb_root_path;
@@ -32,9 +34,9 @@ class phpbb_cron_task_wrapper
 	*
 	* Wraps a task $task, which must implement cron_task interface.
 	*
-	* @param phpbb_cron_task $task The cron task to wrap.
+	* @param \phpbb\cron\task\task $task The cron task to wrap.
 	*/
-	public function __construct(phpbb_cron_task $task, $phpbb_root_path, $php_ext)
+	public function __construct(\phpbb\cron\task\task $task, $phpbb_root_path, $php_ext)
 	{
 		$this->task = $task;
 		$this->phpbb_root_path = $phpbb_root_path;
@@ -51,7 +53,7 @@ class phpbb_cron_task_wrapper
 	*/
 	public function is_parametrized()
 	{
-		return $this->task instanceof phpbb_cron_task_parametrized;
+		return $this->task instanceof \phpbb\cron\task\parametrized;
 	}
 
 	/**
-- 
cgit v1.2.1