diff options
author | kasimi <mail@kasimi.net> | 2018-04-15 18:43:21 +0200 |
---|---|---|
committer | kasimi <mail@kasimi.net> | 2018-04-15 18:46:44 +0200 |
commit | 0aea8ecd8314dcd33f7ed6e86f4a44ebaf27edc0 (patch) | |
tree | 4c6f2743841087f74f32b751bca38b3644b16efc | |
parent | 17c3bf0b39210f3c7519d4e652e431dbe38151d5 (diff) | |
download | forums-0aea8ecd8314dcd33f7ed6e86f4a44ebaf27edc0.tar forums-0aea8ecd8314dcd33f7ed6e86f4a44ebaf27edc0.tar.gz forums-0aea8ecd8314dcd33f7ed6e86f4a44ebaf27edc0.tar.bz2 forums-0aea8ecd8314dcd33f7ed6e86f4a44ebaf27edc0.tar.xz forums-0aea8ecd8314dcd33f7ed6e86f4a44ebaf27edc0.zip |
[ticket/15637] Extract multi-line PHP event descriptions
PHPBB3-15637
-rw-r--r-- | phpBB/phpbb/event/php_exporter.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php index 64d1e429b7..b798d60481 100644 --- a/phpBB/phpbb/event/php_exporter.php +++ b/phpBB/phpbb/event/php_exporter.php @@ -264,7 +264,23 @@ class php_exporter // Find event description line $description_line_num = $this->find_description(); - $description = substr(trim($this->file_lines[$description_line_num]), strlen('* ')); + $description_lines = array(); + + while (true) + { + $description_line = substr(trim($this->file_lines[$description_line_num]), strlen('* ')); + + // Reached end of description if line is empty or a tag + if (!strlen($description_line) || $description_line[0] == '@') + { + break; + } + + $description_lines[] = $description_line; + $description_line_num++; + } + + $description = implode(' ', $description_lines); if (isset($this->events[$this->current_event])) { |