diff options
| author | Oliver Schramm <oliver.schramm97@gmail.com> | 2015-10-26 01:39:52 +0100 |
|---|---|---|
| committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2015-10-26 01:39:52 +0100 |
| commit | 25e2b17837f5b1c2330d07a86f88b25bb55d96c1 (patch) | |
| tree | 565d21196a663847f932e1e9b5907c4015f54313 /phpBB/phpbb/db | |
| parent | 33500fd3728f6e3444d5479b09b941b2570ff47c (diff) | |
| download | forums-25e2b17837f5b1c2330d07a86f88b25bb55d96c1.tar forums-25e2b17837f5b1c2330d07a86f88b25bb55d96c1.tar.gz forums-25e2b17837f5b1c2330d07a86f88b25bb55d96c1.tar.bz2 forums-25e2b17837f5b1c2330d07a86f88b25bb55d96c1.tar.xz forums-25e2b17837f5b1c2330d07a86f88b25bb55d96c1.zip | |
[ticket/14257] Add text_reparser manager
PHPBB3-14257
Diffstat (limited to 'phpBB/phpbb/db')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v320/text_reparser.php (renamed from phpBB/phpbb/db/migration/data/v320/reparse_fast.php) | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/migration/data/v320/reparse_fast.php b/phpBB/phpbb/db/migration/data/v320/text_reparser.php index ddb11f7f67..0d8fd2ebb5 100644 --- a/phpBB/phpbb/db/migration/data/v320/reparse_fast.php +++ b/phpBB/phpbb/db/migration/data/v320/text_reparser.php @@ -13,7 +13,7 @@ namespace phpbb\db\migration\data\v320; -class reparse_fast extends \phpbb\db\migration\container_aware_migration +class text_reparser extends \phpbb\db\migration\container_aware_migration { static public function depends_on() { @@ -29,6 +29,16 @@ class reparse_fast extends \phpbb\db\migration\container_aware_migration { return array( array('config.add', array('reparse_lock', 0, true)), + array('config.add', array('text_reparser.pm_text_cron_interval', 0)), + array('config.add', array('text_reparser.pm_text_last_cron', 0)), + array('config.add', array('text_reparser.poll_option_cron_interval', 0)), + array('config.add', array('text_reparser.poll_option_last_cron', 0)), + array('config.add', array('text_reparser.poll_title_cron_interval', 0)), + array('config.add', array('text_reparser.poll_title_last_cron', 0)), + array('config.add', array('text_reparser.post_text_cron_interval', 0)), + array('config.add', array('text_reparser.post_text_last_cron', 0)), + array('config.add', array('text_reparser.user_signature_cron_interval', 0)), + array('config.add', array('text_reparser.user_signature_last_cron', 0)), array('custom', array(array($this, 'reparse'))), ); } @@ -36,7 +46,7 @@ class reparse_fast extends \phpbb\db\migration\container_aware_migration public function reparse($resume_data) { // Somtimes a cron job is too much - $limit = 200; + $limit = 100; $fast_reparsers = array( 'text_reparser.contact_admin_info', 'text_reparser.forum_description', @@ -73,6 +83,10 @@ class reparse_fast extends \phpbb\db\migration\container_aware_migration if ($start === 1) { + // Prevent CLI command from running these reparsers again + $reparser_manager = $this->container->get('text_reparser.manager'); + $reparser_manager->update_resume_data($fast_reparsers[$resume_data['reparser']], 1, 0, $limit); + $resume_data['reparser']++; } } |
