Skip to content

Commit 27a1802

Browse files
Merge pull request #132 from VSEphpbb/reparsers
Update reparser service names
2 parents 11da5ea + 305735f commit 27a1802

2 files changed

Lines changed: 60 additions & 2 deletions

File tree

config/services.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,13 @@ services:
7171
tags:
7272
- { name: routing.loader }
7373

74-
text_reparser.phpbb_pages_text:
74+
phpbb.pages.text_reparser.page_text:
7575
class: phpbb\pages\textreparser\plugins\pages_text
7676
arguments:
7777
- '@dbal.conn'
7878
- '%phpbb.pages.tables.pages%'
79+
calls:
80+
- [set_name, [phpbb_pages_text]]
7981
tags:
8082
- { name: text_reparser.plugin }
8183

@@ -89,6 +91,6 @@ services:
8991
- '@text_reparser_collection'
9092
calls:
9193
- [set_name, [cron.task.text_reparser.phpbb_pages]]
92-
- [set_reparser, [text_reparser.phpbb_pages_text]]
94+
- [set_reparser, [phpbb.pages.text_reparser.page_text]]
9395
tags:
9496
- { name: cron.task }
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
/**
3+
*
4+
* Pages extension for the phpBB Forum Software package.
5+
*
6+
* @copyright (c) 2016 phpBB Limited <https://www.phpbb.com>
7+
* @license GNU General Public License, version 2 (GPL-2.0)
8+
*
9+
*/
10+
11+
namespace phpbb\pages\migrations\v10x;
12+
13+
/**
14+
* Migration stage 7: Rename reparser cron configs
15+
*/
16+
class m7_reparser_cron_update extends \phpbb\db\migration\migration
17+
{
18+
/**
19+
* Assign migration file dependencies for this migration
20+
*
21+
* @return array Array of migration files
22+
* @static
23+
* @access public
24+
*/
25+
static public function depends_on()
26+
{
27+
return array('\phpbb\pages\migrations\v10x\m6_reparser_cron');
28+
}
29+
30+
/**
31+
* Check if the migration is effectively installed (entirely optional)
32+
*
33+
* @return bool True if this migration is installed, False if this migration is not installed
34+
*/
35+
public function effectively_installed()
36+
{
37+
return $this->config->offsetExists('phpbb.pages.text_reparser.page_text_cron_interval');
38+
}
39+
40+
/**
41+
* Add or update data in the database
42+
*
43+
* @return array Array of table data
44+
* @access public
45+
*/
46+
public function update_data()
47+
{
48+
return array(
49+
array('config.add', array('phpbb.pages.text_reparser.page_text_cron_interval', $this->config['text_reparser.phpbb_pages_text_cron_interval'])),
50+
array('config.add', array('phpbb.pages.text_reparser.page_text_last_cron', $this->config['text_reparser.phpbb_pages_text_last_cron'])),
51+
52+
array('config.remove', array('text_reparser.phpbb_pages_text_cron_interval')),
53+
array('config.remove', array('text_reparser.phpbb_pages_text_last_cron')),
54+
);
55+
}
56+
}

0 commit comments

Comments
 (0)