aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/console')
-rw-r--r--phpBB/phpbb/console/command/reparser/reparse.php42
1 files changed, 20 insertions, 22 deletions
diff --git a/phpBB/phpbb/console/command/reparser/reparse.php b/phpBB/phpbb/console/command/reparser/reparse.php
index e77b384d8e..6fac3db854 100644
--- a/phpBB/phpbb/console/command/reparser/reparse.php
+++ b/phpBB/phpbb/console/command/reparser/reparse.php
@@ -174,36 +174,34 @@ class reparse extends \phpbb\console\command\command
if (!$this->reparse_lock->acquire())
{
- $this->load_resume_data();
+ throw new runtime_exception('REPARSE_LOCK_ERROR', array(), null, 1);
+ }
- $name = $input->getArgument('reparser-name');
- if (isset($name))
+ $this->load_resume_data();
+
+ $name = $input->getArgument('reparser-name');
+ if (isset($name))
+ {
+ // Allow "post_text" to be an alias for "text_reparser.post_text"
+ if (!isset($this->reparsers[$name]))
{
- // Allow "post_text" to be an alias for "text_reparser.post_text"
- if (!isset($this->reparsers[$name]))
- {
- $name = 'text_reparser.' . $name;
- }
- $this->reparse($name);
+ $name = 'text_reparser.' . $name;
}
- else
+ $this->reparse($name);
+ }
+ else
+ {
+ foreach ($this->reparsers as $name => $service)
{
- foreach ($this->reparsers as $name => $service)
- {
- $this->reparse($name);
- }
+ $this->reparse($name);
}
+ }
- $this->io->success($this->user->lang('CLI_REPARSER_REPARSE_SUCCESS'));
+ $this->io->success($this->user->lang('CLI_REPARSER_REPARSE_SUCCESS'));
- $this->reparse_lock->release();
+ $this->reparse_lock->release();
- return 0;
- }
- else
- {
- throw new runtime_exception('REPARSE_LOCK_ERROR', array(), null, 1);
- }
+ return 0;
}
/**