aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/textformatter/s9e/acp_utils.php
diff options
context:
space:
mode:
authorJoshyPHP <s9e.dev@gmail.com>2019-12-16 01:34:26 +0100
committerJoshyPHP <s9e.dev@gmail.com>2019-12-16 01:34:26 +0100
commit2733ce07129dceb5b60acdceba1689fa5339a523 (patch)
treef3fc7dd98c7af58b0ff6e056189f4805a440b160 /phpBB/phpbb/textformatter/s9e/acp_utils.php
parent2926ceba6a06a2f0f95452ae838a89247c493c93 (diff)
downloadforums-2733ce07129dceb5b60acdceba1689fa5339a523.tar
forums-2733ce07129dceb5b60acdceba1689fa5339a523.tar.gz
forums-2733ce07129dceb5b60acdceba1689fa5339a523.tar.bz2
forums-2733ce07129dceb5b60acdceba1689fa5339a523.tar.xz
forums-2733ce07129dceb5b60acdceba1689fa5339a523.zip
[ticket/16250] Reworked status as constants
PHPBB3-16250
Diffstat (limited to 'phpBB/phpbb/textformatter/s9e/acp_utils.php')
-rw-r--r--phpBB/phpbb/textformatter/s9e/acp_utils.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/textformatter/s9e/acp_utils.php b/phpBB/phpbb/textformatter/s9e/acp_utils.php
index 981fa60813..c4a668020e 100644
--- a/phpBB/phpbb/textformatter/s9e/acp_utils.php
+++ b/phpBB/phpbb/textformatter/s9e/acp_utils.php
@@ -37,7 +37,7 @@ class acp_utils implements acp_utils_interface
public function analyse_bbcode(string $definition, string $template): array
{
$configurator = $this->factory->get_configurator();
- $return = ['status' => 'safe'];
+ $return = ['status' => self::BBCODE_STATUS_SAFE];
// Capture and normalize the BBCode name manually because there's no easy way to retrieve
// it in TextFormatter <= 2.x
@@ -52,13 +52,13 @@ class acp_utils implements acp_utils_interface
}
catch (UnsafeTemplateException $e)
{
- $return['status'] = 'unsafe';
+ $return['status'] = self::BBCODE_STATUS_UNSAFE;
$return['error_text'] = $e->getMessage();
$return['error_html'] = $e->highlightNode('<span class="highlight">');
}
catch (\Exception $e)
{
- $return['status'] = (preg_match('(xml|xpath|xsl)i', $e->getMessage())) ? 'invalid_template' : 'invalid_definition';
+ $return['status'] = (preg_match('(xml|xpath|xsl)i', $e->getMessage())) ? self::BBCODE_STATUS_INVALID_TEMPLATE : self::BBCODE_STATUS_INVALID_DEFINITION;
$return['error_text'] = $e->getMessage();
}