aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-10-11 15:51:33 +0200
committerAndreas Fischer <bantu@phpbb.com>2013-10-11 15:53:22 +0200
commitbeda12c05526aebcc6c968d97030f2b691ab1718 (patch)
tree9ddbdd70ef476d13a4835a7fc05b8cd78dbd1a60
parent67530d132ac6eb1eae74bd184014bcc7c6b7d082 (diff)
downloadforums-beda12c05526aebcc6c968d97030f2b691ab1718.tar
forums-beda12c05526aebcc6c968d97030f2b691ab1718.tar.gz
forums-beda12c05526aebcc6c968d97030f2b691ab1718.tar.bz2
forums-beda12c05526aebcc6c968d97030f2b691ab1718.tar.xz
forums-beda12c05526aebcc6c968d97030f2b691ab1718.zip
[feature/plupload/cron] Namespacification
PHPBB3-10929
-rw-r--r--phpBB/config/cron_tasks.yml2
-rw-r--r--phpBB/phpbb/cron/task/core/tidy_plupload.php14
2 files changed, 9 insertions, 7 deletions
diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron_tasks.yml
index a39c3b5767..fd3aea85dc 100644
--- a/phpBB/config/cron_tasks.yml
+++ b/phpBB/config/cron_tasks.yml
@@ -66,7 +66,7 @@ services:
- { name: cron.task }
cron.task.core.tidy_plupload:
- class: phpbb_cron_task_core_tidy_plupload
+ class: phpbb\cron\task\core\tidy_plupload
arguments:
- %core.root_path%
- @config
diff --git a/phpBB/phpbb/cron/task/core/tidy_plupload.php b/phpBB/phpbb/cron/task/core/tidy_plupload.php
index be447d54a5..09e9dfa6b4 100644
--- a/phpBB/phpbb/cron/task/core/tidy_plupload.php
+++ b/phpBB/phpbb/cron/task/core/tidy_plupload.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_plupload extends phpbb_cron_task_base
+class tidy_plupload extends \phpbb\cron\task\base
{
/**
* How old a file must be (in seconds) before it is deleted.
@@ -42,7 +44,7 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base
/**
* Config object
- * @var phpbb_config
+ * @var \phpbb\config\config
*/
protected $config;
@@ -56,9 +58,9 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base
* Constructor.
*
* @param string $phpbb_root_path The root path
- * @param phpbb_config $config The config
+ * @param \phpbb\config\config $config The config
*/
- public function __construct($phpbb_root_path, phpbb_config $config)
+ public function __construct($phpbb_root_path, \phpbb\config\config $config)
{
$this->phpbb_root_path = $phpbb_root_path;
$this->config = $config;
@@ -75,7 +77,7 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base
$last_valid_timestamp = time() - $this->max_file_age;
try
{
- $iterator = new DirectoryIterator($this->plupload_upload_path);
+ $iterator = new \DirectoryIterator($this->plupload_upload_path);
foreach ($iterator as $file)
{
if (strpos($file->getBasename(), $this->config['plupload_salt']) !== 0)
@@ -90,7 +92,7 @@ class phpbb_cron_task_core_tidy_plupload extends phpbb_cron_task_base
}
}
}
- catch (UnexpectedValueException $e)
+ catch (\UnexpectedValueException $e)
{
add_log(
'critical',