aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/language/en/cli.php1
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php9
-rw-r--r--phpBB/phpbb/install/module/install_finish/task/install_extensions.php8
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php3
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15348.html1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15348.txt1
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15348.xml33
7 files changed, 55 insertions, 1 deletions
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php
index 124d9cb6ef..1655855edb 100644
--- a/phpBB/language/en/cli.php
+++ b/phpBB/language/en/cli.php
@@ -123,6 +123,7 @@ $lang = array_merge($lang, array(
'CLI_EXTENSION_UPDATE_FAILURE' => 'Could not update extension %s',
'CLI_EXTENSION_UPDATE_SUCCESS' => 'Successfully updated extension %s',
'CLI_EXTENSION_NOT_FOUND' => 'No extensions were found.',
+ 'CLI_EXTENSION_NOT_ENABLEABLE' => 'Extension %s is not enableable.',
'CLI_EXTENSIONS_AVAILABLE' => 'Available',
'CLI_EXTENSIONS_DISABLED' => 'Disabled',
'CLI_EXTENSIONS_ENABLED' => 'Enabled',
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/install/module/install_finish/task/install_extensions.php b/phpBB/phpbb/install/module/install_finish/task/install_extensions.php
index 553a30ea28..eee13a6581 100644
--- a/phpBB/phpbb/install/module/install_finish/task/install_extensions.php
+++ b/phpBB/phpbb/install/module/install_finish/task/install_extensions.php
@@ -118,6 +118,14 @@ class install_extensions extends \phpbb\install\task_base
try
{
+ $extension = $this->extension_manager->get_extension($ext_name);
+
+ if (!$extension->is_enableable())
+ {
+ $this->iohandler->add_log_message(array('CLI_EXTENSION_NOT_ENABLEABLE', $ext_name));
+ continue;
+ }
+
$this->extension_manager->enable($ext_name);
$extensions = $this->get_extensions();
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
diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.html b/tests/text_processing/tickets_data/PHPBB3-15348.html
new file mode 100644
index 0000000000..e65925ec28
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15348.html
@@ -0,0 +1 @@
+<img class="smilies" src="phpBB/images/smilies/icon_e_surprised.gif" width="15" height="17" alt=":o" title="First half of :ok:"> <img class="smilies" src="phpBB/images/smilies/icon_lol.gif" width="15" height="17" alt="k:" title="Second half of :ok:"> <img alt=":ok:" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/emojione/assets/svg/1f197.svg"> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.txt b/tests/text_processing/tickets_data/PHPBB3-15348.txt
new file mode 100644
index 0000000000..d6b971702c
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15348.txt
@@ -0,0 +1 @@
+:o k: :ok: \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.xml b/tests/text_processing/tickets_data/PHPBB3-15348.xml
new file mode 100644
index 0000000000..0c88c8824f
--- /dev/null
+++ b/tests/text_processing/tickets_data/PHPBB3-15348.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_smilies">
+ <column>smiley_id</column>
+ <column>code</column>
+ <column>emotion</column>
+ <column>smiley_url</column>
+ <column>smiley_width</column>
+ <column>smiley_height</column>
+ <column>smiley_order</column>
+ <column>display_on_posting</column>
+ <row>
+ <value>13</value>
+ <value>:o</value>
+ <value>First half of :ok:</value>
+ <value>icon_e_surprised.gif</value>
+ <value>15</value>
+ <value>17</value>
+ <value>14</value>
+ <value>1</value>
+ </row>
+ <row>
+ <value>99</value>
+ <value>k:</value>
+ <value>Second half of :ok:</value>
+ <value>icon_lol.gif</value>
+ <value>15</value>
+ <value>17</value>
+ <value>22</value>
+ <value>1</value>
+ </row>
+ </table>
+</dataset>