aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-10-11 17:57:16 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-10-11 17:57:16 +0530
commit659236a32f58946a501d3fb9f04ba83ed91ef369 (patch)
tree81c9064a764c95a0b796281cf18c36bc8d0723ed /phpBB
parent2198c29c205ba3a98e66746b9527c50c50f7c1e2 (diff)
parent9e0fd29820af282262cbe16363b7b9dd9f6a31d8 (diff)
downloadforums-659236a32f58946a501d3fb9f04ba83ed91ef369.tar
forums-659236a32f58946a501d3fb9f04ba83ed91ef369.tar.gz
forums-659236a32f58946a501d3fb9f04ba83ed91ef369.tar.bz2
forums-659236a32f58946a501d3fb9f04ba83ed91ef369.tar.xz
forums-659236a32f58946a501d3fb9f04ba83ed91ef369.zip
Merge remote-tracking branch 'nickvergessen/ticket/11906' into develop
# By Joas Schilling # Via Joas Schilling * nickvergessen/ticket/11906: [ticket/11906] Fix namespace issues in prune_notifications [ticket/11906] Add notification purge cron to cron tasks [ticket/11906] Add missing configs from notifications cron to schema_data.sql
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/config/cron_tasks.yml10
-rw-r--r--phpBB/install/schemas/schema_data.sql3
-rw-r--r--phpBB/phpbb/cron/task/core/prune_notifications.php10
3 files changed, 19 insertions, 4 deletions
diff --git a/phpBB/config/cron_tasks.yml b/phpBB/config/cron_tasks.yml
index 0c9795c0bd..109c9684f9 100644
--- a/phpBB/config/cron_tasks.yml
+++ b/phpBB/config/cron_tasks.yml
@@ -23,6 +23,16 @@ services:
tags:
- { name: cron.task }
+ cron.task.core.prune_notifications:
+ class: phpbb\cron\task\core\prune_notifications
+ arguments:
+ - @config
+ - @notification_manager
+ calls:
+ - [set_name, [cron.task.core.prune_notifications]]
+ tags:
+ - { name: cron.task }
+
cron.task.core.queue:
class: phpbb\cron\task\core\queue
arguments:
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 4f1cdf5a83..cd38f86312 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -230,6 +230,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '
INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '60');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_expire_days', '30');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_last_gc', '0');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('read_notification_gc', '86400');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
diff --git a/phpBB/phpbb/cron/task/core/prune_notifications.php b/phpBB/phpbb/cron/task/core/prune_notifications.php
index 296c0ae64f..1f75709322 100644
--- a/phpBB/phpbb/cron/task/core/prune_notifications.php
+++ b/phpBB/phpbb/cron/task/core/prune_notifications.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_prune_notifications extends phpbb_cron_task_base
+class prune_notifications extends \phpbb\cron\task\base
{
protected $config;
protected $notification_manager;
@@ -28,10 +30,10 @@ class phpbb_cron_task_core_prune_notifications extends phpbb_cron_task_base
/**
* Constructor.
*
- * @param phpbb_config $config The config
- * @param phpbb_notification_manager $notification_manager Notification manager
+ * @param \phpbb\config\config $config The config
+ * @param \phpbb\notification\manager $notification_manager Notification manager
*/
- public function __construct(phpbb_config $config, phpbb_notification_manager $notification_manager)
+ public function __construct(\phpbb\config\config $config, \phpbb\notification\manager $notification_manager)
{
$this->config = $config;
$this->notification_manager = $notification_manager;