aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php9
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php3
2 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index a8312d5c15..f92de0069c 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -37,11 +37,18 @@ class enable extends command
$io = new SymfonyStyle($input, $output);
$name = $input->getArgument('extension-name');
+ $extension = $this->manager->get_extension($name);
+
+ if (!$extension->is_enableable())
+ {
+ $io->error($this->user->lang('CLI_EXTENSION_NOT_ENABLEABLE', $name));
+ return 1;
+ }
if ($this->manager->is_enabled($name))
{
$io->error($this->user->lang('CLI_EXTENSION_ENABLED', $name));
- return 2;
+ return 1;
}
$this->manager->enable($name);
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index 7719ce5afa..3f2e0ab8cb 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -323,6 +323,9 @@ class factory implements \phpbb\textformatter\cache_interface
// Only parse emoticons at the beginning of the text or if they're preceded by any
// one of: a new line, a space, a dot, or a right square bracket
$configurator->Emoticons->notAfter = '[^\\n .\\]]';
+
+ // Ignore emoticons that are immediately followed by a "word" character
+ $configurator->Emoticons->notBefore = '\\w';
}
// Load the censored words