aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--phpBB/adm/style/acp_attachments.html95
-rw-r--r--phpBB/adm/style/acp_ext_list.html6
-rw-r--r--phpBB/adm/style/acp_prune_forums.html4
-rw-r--r--phpBB/adm/style/admin.css10
-rw-r--r--phpBB/adm/style/installer_form.html7
-rw-r--r--phpBB/adm/style/permission_mask.html2
-rw-r--r--phpBB/assets/javascript/core.js8
-rw-r--r--phpBB/composer.json4
-rw-r--r--phpBB/composer.lock288
-rw-r--r--phpBB/config/default/container/services_console.yml1
-rw-r--r--phpBB/config/default/container/services_feed.yml9
-rw-r--r--phpBB/config/default/container/services_text_formatter.yml5
-rw-r--r--phpBB/docs/CREDITS.txt5
-rw-r--r--phpBB/docs/events.md28
-rw-r--r--phpBB/docs/nginx.sample.conf10
-rw-r--r--phpBB/download/file.php4
-rw-r--r--phpBB/includes/acp/acp_attachments.php35
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php6
-rw-r--r--phpBB/includes/acp/acp_board.php9
-rw-r--r--phpBB/includes/acp/acp_prune.php34
-rw-r--r--phpBB/includes/acp/acp_styles.php26
-rw-r--r--phpBB/includes/acp/acp_users.php18
-rw-r--r--phpBB/includes/functions.php7
-rw-r--r--phpBB/includes/functions_admin.php10
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_download.php6
-rw-r--r--phpBB/includes/functions_mcp.php6
-rw-r--r--phpBB/includes/functions_messenger.php5
-rw-r--r--phpBB/includes/functions_user.php25
-rw-r--r--phpBB/includes/questionnaire/questionnaire.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php30
-rw-r--r--phpBB/includes/ucp/ucp_register.php69
-rw-r--r--phpBB/index.php6
-rw-r--r--phpBB/install/schemas/schema_data.sql9
-rw-r--r--phpBB/language/en/acp/board.php50
-rw-r--r--phpBB/language/en/acp/permissions_phpbb.php1
-rw-r--r--phpBB/language/en/cli.php1
-rw-r--r--phpBB/language/en/viewforum.php2
-rw-r--r--phpBB/phpbb/cache/driver/memcached.php2
-rw-r--r--phpBB/phpbb/console/command/extension/enable.php7
-rw-r--r--phpBB/phpbb/console/exception_subscriber.php13
-rw-r--r--phpBB/phpbb/content_visibility.php126
-rw-r--r--phpBB/phpbb/datetime.php6
-rw-r--r--phpBB/phpbb/db/migration/data/v310/style_update_p1.php10
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/email_force_sender.php37
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php31
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/fix_user_styles.php50
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php75
-rw-r--r--phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php39
-rw-r--r--phpBB/phpbb/db/migrator.php7
-rw-r--r--phpBB/phpbb/event/dispatcher.php7
-rw-r--r--phpBB/phpbb/event/php_exporter.php36
-rw-r--r--phpBB/phpbb/feed/helper.php55
-rw-r--r--phpBB/phpbb/feed/quote_helper.php36
-rw-r--r--phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php6
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/diff_files.php43
-rw-r--r--phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php7
-rw-r--r--phpBB/phpbb/log/log.php14
-rw-r--r--phpBB/phpbb/pagination.php5
-rw-r--r--phpBB/phpbb/permissions.php1
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php19
-rw-r--r--phpBB/phpbb/search/fulltext_sphinx.php3
-rw-r--r--phpBB/phpbb/template/context.php88
-rw-r--r--phpBB/phpbb/textformatter/s9e/bbcode_merger.php180
-rw-r--r--phpBB/phpbb/textformatter/s9e/factory.php9
-rw-r--r--phpBB/phpbb/textformatter/s9e/parser.php6
-rw-r--r--phpBB/phpbb/textreparser/base.php4
-rw-r--r--phpBB/phpbb/user.php18
-rw-r--r--phpBB/search.php20
-rw-r--r--phpBB/styles/prosilver/style.cfg2
-rw-r--r--phpBB/styles/prosilver/template/mcp_topic.html5
-rw-r--r--phpBB/styles/prosilver/template/ucp_footer.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html1
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html8
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_print.html3
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css8
-rw-r--r--phpBB/styles/prosilver/theme/content.css8
-rw-r--r--phpBB/styles/prosilver/theme/print.css2
-rw-r--r--phpBB/viewforum.php31
-rw-r--r--phpBB/viewtopic.php6
-rw-r--r--tests/dbal/migration/revert_table.php39
-rw-r--r--tests/dbal/migration/revert_table_with_dependency.php52
-rw-r--r--tests/dbal/migrator_test.php45
-rw-r--r--tests/event/dispatcher_test.php16
-rw-r--r--tests/event/fixtures/event_migration.test30
-rw-r--r--tests/event/php_exporter_test.php19
-rw-r--r--tests/feed/attachments_base_test.php14
-rw-r--r--tests/functional/posting_test.php2
-rw-r--r--tests/template/template_test.php40
-rw-r--r--tests/template/templates/loop_nested.html3
-rw-r--r--tests/test_framework/phpbb_functional_test_case.php3
-rw-r--r--tests/text_formatter/s9e/bbcode_merger_test.php280
-rw-r--r--tests/text_formatter/s9e/default_formatting_test.php36
-rw-r--r--tests/text_formatter/s9e/factory_test.php16
-rw-r--r--tests/text_formatter/s9e/fixtures/styles/unsafe/template/bbcode.html40
-rw-r--r--tests/text_formatter/s9e/fixtures/unsafe_default_bbcodes.xml24
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-10122.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-10268.html4
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-13641.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-13921.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-14706.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-14790.html8
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-14846.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-15348.html2
-rw-r--r--tests/text_processing/tickets_data/PHPBB3-8419.html2
-rw-r--r--tests/text_reparser/base_test.php15
-rw-r--r--tests/text_reparser/fixtures/base.xml8
108 files changed, 2033 insertions, 558 deletions
diff --git a/.travis.yml b/.travis.yml
index fa2a86c0db..4cef1af10e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -53,4 +53,4 @@ script:
- sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi"
- sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --verbose --stop-on-error; fi"
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
- - sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
+ - sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git remote set-branches --add origin $TRAVIS_BRANCH && git fetch && git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA; fi"
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html
index e1f7f140c9..2baca09f5e 100644
--- a/phpBB/adm/style/acp_attachments.html
+++ b/phpBB/adm/style/acp_attachments.html
@@ -329,42 +329,71 @@
<fieldset class="tabulated">
<legend>{L_TITLE}</legend>
- <table class="table1 zebra-table fixed-width-table">
- <thead>
- <tr>
- <th>{L_FILENAME}</th>
- <th style="width: 15%;">{L_FILEDATE}</th>
- <th style="width: 15%;">{L_FILESIZE}</th>
- <th style="width: 15%;">{L_ATTACH_POST_ID}</th>
- <th style="width: 15%;">{L_ATTACH_TO_POST}</th>
- <th style="width: 15%;">{L_DELETE}</th>
- </tr>
- </thead>
- <tbody>
- <!-- BEGIN orphan -->
+ <div class="pagination top-pagination">
+ <!-- IF .pagination or TOTAL_FILES -->
+ {L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} &bull; {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
+ <!-- IF .pagination -->
+ &bull; <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ <!-- ENDIF -->
+ </div>
+
+ <!-- IF .orphan -->
+ <table class="table1 zebra-table fixed-width-table">
+ <thead>
<tr>
- <td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
- <td>{orphan.FILETIME}</td>
- <td>{orphan.FILESIZE}</td>
- <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" min="0" max="9999999999" name="post_id[{orphan.ATTACH_ID}]" value="{orphan.POST_ID}" style="width: 75%;" /></td>
- <td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
- <td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
+ <th>{L_FILENAME}</th>
+ <th style="width: 15%;">{L_FILEDATE}</th>
+ <th style="width: 15%;">{L_FILESIZE}</th>
+ <th style="width: 15%;">{L_ATTACH_POST_ID}</th>
+ <th style="width: 15%;">{L_ATTACH_TO_POST}</th>
+ <th style="width: 15%;">{L_DELETE}</th>
</tr>
- <!-- END orphan -->
- <tr class="row4">
- <td colspan="4">&nbsp;</td>
- <td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
- <td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
- </tr>
- </tbody>
- </table>
+ </thead>
+ <tbody>
+ <!-- BEGIN orphan -->
+ <tr>
+ <td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
+ <td>{orphan.FILETIME}</td>
+ <td>{orphan.FILESIZE}</td>
+ <td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" min="0" max="9999999999" name="post_id[{orphan.ATTACH_ID}]" value="{orphan.POST_ID}" style="width: 75%;" /></td>
+ <td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
+ <td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
+ </tr>
+ <!-- END orphan -->
+ <tr class="row4">
+ <td colspan="4">&nbsp;</td>
+ <td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
+ <td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
+ </tr>
+ </tbody>
+ </table>
+ <!-- ELSE -->
+ <div class="errorbox">
+ <p>{L_NO_ATTACHMENTS}</p>
+ </div>
+ <!-- ENDIF -->
+
+ <!-- IF TOTAL_FILES -->
+ <div class="pagination">
+ {L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} &bull; {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
+ <!-- IF .pagination -->
+ &bull; <!-- INCLUDE pagination.html -->
+ <!-- ELSE -->
+ &bull; {PAGE_NUMBER}
+ <!-- ENDIF -->
+ </div>
+ <!-- ENDIF -->
- <br />
+ <!-- IF .orphan -->
+ <p class="submit-buttons">
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
+ <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
+ </p>
+ <!-- ENDIF -->
- <p class="submit-buttons">
- <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />&nbsp;
- <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
- </p>
{S_FORM_TOKEN}
</fieldset>
</form>
@@ -440,7 +469,7 @@
<input class="button2" type="submit" name="submit" value="{L_DELETE_MARKED}" /><br />
<p class="small">
<a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> &bull;
- <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a>
+ <a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a>
</p>
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_ext_list.html b/phpBB/adm/style/acp_ext_list.html
index af9e00a614..7ab2608e13 100644
--- a/phpBB/adm/style/acp_ext_list.html
+++ b/phpBB/adm/style/acp_ext_list.html
@@ -51,7 +51,8 @@
<td><strong title="{enabled.NAME}">{enabled.META_DISPLAY_NAME}</strong><!-- EVENT acp_ext_list_enabled_name_after --></td>
<td style="text-align: center;">
<!-- IF enabled.S_VERSIONCHECK -->
- <strong <!-- IF enabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{enabled.META_VERSION}</strong>
+ <strong class="<!-- IF enabled.S_UP_TO_DATE -->current-ext<!-- ELSE -->outdated-ext<!-- ENDIF -->">{enabled.META_VERSION}</strong>
+ <!-- IF not enabled.S_UP_TO_DATE --><i class="fa fa-exclamation-circle outdated-ext" aria-hidden="true"></i><!-- ENDIF -->
<!-- ELSE -->
{enabled.META_VERSION}
<!-- ENDIF -->
@@ -76,7 +77,8 @@
<td><strong title="{disabled.NAME}">{disabled.META_DISPLAY_NAME}</strong><!-- EVENT acp_ext_list_disabled_name_after --></td>
<td style="text-align: center;">
<!-- IF disabled.S_VERSIONCHECK -->
- <strong <!-- IF disabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{disabled.META_VERSION}</strong>
+ <strong class="<!-- IF disabled.S_UP_TO_DATE -->current-ext<!-- ELSE -->outdated-ext<!-- ENDIF -->">{disabled.META_VERSION}</strong>
+ <!-- IF not disabled.S_UP_TO_DATE --><i class="fa fa-exclamation-circle outdated-ext" aria-hidden="true"></i><!-- ENDIF -->
<!-- ELSE -->
{disabled.META_VERSION}
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html
index b8c681ea00..ef3880e851 100644
--- a/phpBB/adm/style/acp_prune_forums.html
+++ b/phpBB/adm/style/acp_prune_forums.html
@@ -94,7 +94,9 @@
<dd><label><input type="radio" class="radio" name="prune_sticky" value="1" /> {L_YES}</label>
<label><input type="radio" class="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</label></dd>
</dl>
-
+
+ <!-- EVENT acp_prune_forums_settings_append -->
+
<p class="quick">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index 2322b3da88..eafe11ee89 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -525,7 +525,6 @@ li {
padding: 0;
border-right: 1px solid #CCCFD3;
position: relative;
- z-index: 1;
}
.rtl #menu {
@@ -1891,7 +1890,6 @@ li.pagination ul {
color: #000;
text-align: center;
border: 1px solid #AAA;
- opacity: .95;
}
.tooltip span.top {
@@ -2506,6 +2504,14 @@ fieldset.permissions .padding {
/* Classes for additional tasks
---------------------------------------- */
+.current-ext {
+ color: #228822;
+}
+
+.outdated-ext {
+ color: #BC2A4D;
+}
+
.phpinfo {
overflow: auto;
width: 99%;
diff --git a/phpBB/adm/style/installer_form.html b/phpBB/adm/style/installer_form.html
index a38f33c7c2..592d361d1e 100644
--- a/phpBB/adm/style/installer_form.html
+++ b/phpBB/adm/style/installer_form.html
@@ -1,3 +1,4 @@
+<!-- IF FORM_TITLE --><h1>{FORM_TITLE}</h1><!-- ENDIF -->
<form id="<!-- IF FORM_ID -->{FORM_ID}<!-- ELSE -->install_install<!-- ENDIF -->" method="POST" action="{U_ACTION}">
<!-- IF .options -->
<!-- IF S_NOT_ONLY_BUTTON_FORM -->
@@ -8,9 +9,9 @@
<!-- IF options.S_LEGEND -->
<!-- IF not options.S_FIRST_ROW -->
</fieldset>
-
- <fieldset>
<!-- ENDIF -->
+ <fieldset>
+
<legend>{options.LEGEND}</legend>
<!-- ELSE -->
<dl>
@@ -49,7 +50,7 @@
<fieldset class="submit-buttons">
<legend>{L_SUBMIT}</legend>
<!-- BEGIN submit_buttons -->
- <input class="button1<!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> />
+ <input class="<!-- IF not submit_buttons.IS_SECONDARY -->button1<!-- ELSE -->button2<!-- ENDIF --><!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> />
<!-- END submit_buttons -->
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html
index 017d29d832..8b3121bfa0 100644
--- a/phpBB/adm/style/permission_mask.html
+++ b/phpBB/adm/style/permission_mask.html
@@ -41,7 +41,7 @@
<dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt>
{% if p_mask.f_mask.role_options %}
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%">
- <div class="dropdown-container dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}">
+ <div class="dropdown-container dropdown-right dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}">
<select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">{p_mask.f_mask.S_ROLE_OPTIONS}</select>
<span title="Roles" class="button icon-button tools-icon dropdown-trigger dropdown-select">{L_NO_ROLE_ASSIGNED}</span>
<div class="dropdown hidden">
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index a88719f1df..069f9089c2 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -27,9 +27,9 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
*/
phpbb.loadingIndicator = function() {
if (!$loadingIndicator) {
- $loadingIndicator = $('<div />', {
- id: 'loading_indicator',
- class: 'loading_indicator',
+ $loadingIndicator = $('<div />', {
+ 'id': 'loading_indicator',
+ 'class': 'loading_indicator'
});
$loadingIndicator.appendTo('#page-footer');
}
@@ -179,7 +179,7 @@ phpbb.alert.close = function($alert, fadedark) {
phpbb.confirm = function(msg, callback, fadedark) {
var $confirmDiv = $('#phpbb_confirm');
$confirmDiv.find('.alert_text').html(msg);
- fadedark = fadedark !== 'undefined' ? fadedark : true;
+ fadedark = typeof fadedark !== 'undefined' ? fadedark : true;
$(document).on('keydown.phpbb.alert', function(e) {
if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) {
diff --git a/phpBB/composer.json b/phpBB/composer.json
index 5bc8f5dc0d..926fad5188 100644
--- a/phpBB/composer.json
+++ b/phpBB/composer.json
@@ -33,7 +33,7 @@
"marc1706/fast-image-size": "^1.1",
"paragonie/random_compat": "^1.4",
"patchwork/utf8": "^1.1",
- "s9e/text-formatter": "~0.11.0",
+ "s9e/text-formatter": "~0.13.0",
"symfony/config": "^2.8",
"symfony/console": "^2.8",
"symfony/debug": "^2.8",
@@ -69,7 +69,7 @@
},
"config": {
"platform": {
- "php": "5.4"
+ "php": "5.4.7"
}
}
}
diff --git a/phpBB/composer.lock b/phpBB/composer.lock
index 9345d07dbf..59143a1fa7 100644
--- a/phpBB/composer.lock
+++ b/phpBB/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "7c30306b2abcb79a206bf6497ef45a02",
- "content-hash": "d559dd0af2317fb0fc15720a18834e33",
+ "hash": "f14915a2ccaf76ccd6d3ea725721a8a8",
+ "content-hash": "c843abc1344cd9df37f63c08a125cad0",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@@ -346,19 +346,20 @@
},
{
"name": "marc1706/fast-image-size",
- "version": "v1.1.3",
+ "version": "v1.1.4",
"source": {
"type": "git",
"url": "https://github.com/marc1706/fast-image-size.git",
- "reference": "5f7e8377746524e2b8a49a631c1fc9afeb9d8bee"
+ "reference": "c4ded0223a4e49ae45a2183a69f6afac5baf7250"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/marc1706/fast-image-size/zipball/5f7e8377746524e2b8a49a631c1fc9afeb9d8bee",
- "reference": "5f7e8377746524e2b8a49a631c1fc9afeb9d8bee",
+ "url": "https://api.github.com/repos/marc1706/fast-image-size/zipball/c4ded0223a4e49ae45a2183a69f6afac5baf7250",
+ "reference": "c4ded0223a4e49ae45a2183a69f6afac5baf7250",
"shasum": ""
},
"require": {
+ "ext-mbstring": "*",
"php": ">=5.3.0"
},
"require-dev": {
@@ -393,7 +394,7 @@
"php",
"size"
],
- "time": "2017-03-26 12:48:28"
+ "time": "2017-10-23 18:52:01"
},
{
"name": "ocramius/proxy-manager",
@@ -660,27 +661,27 @@
},
{
"name": "s9e/text-formatter",
- "version": "0.11.0",
+ "version": "0.13.1",
"source": {
"type": "git",
"url": "https://github.com/s9e/TextFormatter.git",
- "reference": "664b3eaf52baaae4d93548f5e20246fa5942b2b9"
+ "reference": "804ed8fdfa9fd0c8d99f5a33000d4f7e5ed90c6f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/664b3eaf52baaae4d93548f5e20246fa5942b2b9",
- "reference": "664b3eaf52baaae4d93548f5e20246fa5942b2b9",
+ "url": "https://api.github.com/repos/s9e/TextFormatter/zipball/804ed8fdfa9fd0c8d99f5a33000d4f7e5ed90c6f",
+ "reference": "804ed8fdfa9fd0c8d99f5a33000d4f7e5ed90c6f",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-filter": "*",
"lib-pcre": ">=7.2",
- "php": ">=5.3.3"
+ "php": ">=5.4.7"
},
"require-dev": {
"matthiasmullie/minify": "*",
- "php": ">=5.3.3",
+ "php": ">=5.4.7",
"s9e/regexp-builder": ">=1.3.0"
},
"suggest": {
@@ -721,20 +722,20 @@
"parser",
"shortcodes"
],
- "time": "2017-08-04 23:06:38"
+ "time": "2017-12-10 00:55:53"
},
{
"name": "symfony/config",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "0b8541d18507d10204a08384640ff6df3c739ebe"
+ "reference": "1dbeaa8e2db4b29159265867efff075ad961558c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/0b8541d18507d10204a08384640ff6df3c739ebe",
- "reference": "0b8541d18507d10204a08384640ff6df3c739ebe",
+ "url": "https://api.github.com/repos/symfony/config/zipball/1dbeaa8e2db4b29159265867efff075ad961558c",
+ "reference": "1dbeaa8e2db4b29159265867efff075ad961558c",
"shasum": ""
},
"require": {
@@ -777,20 +778,20 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12 14:07:15"
+ "time": "2017-10-04 18:56:36"
},
{
"name": "symfony/console",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "efa4d466b67c2fc9bf9419a981e683e1f99fa029"
+ "reference": "f81549d2c5fdee8d711c9ab3c7e7362353ea5853"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/efa4d466b67c2fc9bf9419a981e683e1f99fa029",
- "reference": "efa4d466b67c2fc9bf9419a981e683e1f99fa029",
+ "url": "https://api.github.com/repos/symfony/console/zipball/f81549d2c5fdee8d711c9ab3c7e7362353ea5853",
+ "reference": "f81549d2c5fdee8d711c9ab3c7e7362353ea5853",
"shasum": ""
},
"require": {
@@ -838,20 +839,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-05-28 14:07:33"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/debug",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "344f50ce827413b3640bfcb1e37386a67d06ea1f"
+ "reference": "eaaec993ca5e8067e204b2ee653cdd142961f33e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/344f50ce827413b3640bfcb1e37386a67d06ea1f",
- "reference": "344f50ce827413b3640bfcb1e37386a67d06ea1f",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/eaaec993ca5e8067e204b2ee653cdd142961f33e",
+ "reference": "eaaec993ca5e8067e204b2ee653cdd142961f33e",
"shasum": ""
},
"require": {
@@ -895,20 +896,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-04-19 19:56:30"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/dependency-injection",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
- "reference": "155b770e68150139779295864d6b6cb3172cd821"
+ "reference": "2562562610dbdabbb98c6ceb60459a351811c734"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/155b770e68150139779295864d6b6cb3172cd821",
- "reference": "155b770e68150139779295864d6b6cb3172cd821",
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2562562610dbdabbb98c6ceb60459a351811c734",
+ "reference": "2562562610dbdabbb98c6ceb60459a351811c734",
"shasum": ""
},
"require": {
@@ -958,20 +959,20 @@
],
"description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
- "time": "2017-05-25 22:57:22"
+ "time": "2017-10-02 07:17:52"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "7fc8e2b4118ff316550596357325dfd92a51f531"
+ "reference": "7fe089232554357efb8d4af65ce209fc6e5a2186"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7fc8e2b4118ff316550596357325dfd92a51f531",
- "reference": "7fc8e2b4118ff316550596357325dfd92a51f531",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7fe089232554357efb8d4af65ce209fc6e5a2186",
+ "reference": "7fe089232554357efb8d4af65ce209fc6e5a2186",
"shasum": ""
},
"require": {
@@ -1018,20 +1019,20 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-04-26 16:56:54"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/filesystem",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "19c11158da8d110cc5289c063bf2ec4cc1ce9e7c"
+ "reference": "5e3af878f144089faddd4060a48cadae4fc44dee"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/19c11158da8d110cc5289c063bf2ec4cc1ce9e7c",
- "reference": "19c11158da8d110cc5289c063bf2ec4cc1ce9e7c",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/5e3af878f144089faddd4060a48cadae4fc44dee",
+ "reference": "5e3af878f144089faddd4060a48cadae4fc44dee",
"shasum": ""
},
"require": {
@@ -1067,20 +1068,20 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-05-28 14:07:33"
+ "time": "2017-10-02 08:46:46"
},
{
"name": "symfony/finder",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "b058a6f0cb6ee9b6b727aae03d5a62474a308528"
+ "reference": "a945724b201f74d543e356f6059c930bb8d10c92"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/b058a6f0cb6ee9b6b727aae03d5a62474a308528",
- "reference": "b058a6f0cb6ee9b6b727aae03d5a62474a308528",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/a945724b201f74d543e356f6059c930bb8d10c92",
+ "reference": "a945724b201f74d543e356f6059c930bb8d10c92",
"shasum": ""
},
"require": {
@@ -1116,20 +1117,20 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2017-05-25 22:57:22"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/http-foundation",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "03bf5ded5a4b54473e7551df5cfab854f7434ed4"
+ "reference": "e6e0170e134bf25d03030b71a19ca409e036157a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/03bf5ded5a4b54473e7551df5cfab854f7434ed4",
- "reference": "03bf5ded5a4b54473e7551df5cfab854f7434ed4",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e6e0170e134bf25d03030b71a19ca409e036157a",
+ "reference": "e6e0170e134bf25d03030b71a19ca409e036157a",
"shasum": ""
},
"require": {
@@ -1171,20 +1172,20 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2017-05-19 11:49:58"
+ "time": "2017-10-05 23:06:47"
},
{
"name": "symfony/http-kernel",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "ae9dd4cfde4a3efa94475863fc330825715fe549"
+ "reference": "d912b76d7db324f7650da9d1132be78c5f7ceb93"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/ae9dd4cfde4a3efa94475863fc330825715fe549",
- "reference": "ae9dd4cfde4a3efa94475863fc330825715fe549",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/d912b76d7db324f7650da9d1132be78c5f7ceb93",
+ "reference": "d912b76d7db324f7650da9d1132be78c5f7ceb93",
"shasum": ""
},
"require": {
@@ -1195,7 +1196,8 @@
"symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6"
},
"conflict": {
- "symfony/config": "<2.7"
+ "symfony/config": "<2.7",
+ "twig/twig": "<1.34|<2.4,>=2"
},
"require-dev": {
"symfony/browser-kit": "~2.3|~3.0.0",
@@ -1253,20 +1255,20 @@
],
"description": "Symfony HttpKernel Component",
"homepage": "https://symfony.com",
- "time": "2017-05-29 19:14:58"
+ "time": "2017-10-05 23:24:02"
},
{
"name": "symfony/polyfill-mbstring",
- "version": "v1.3.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
- "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": ""
},
"require": {
@@ -1278,7 +1280,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -1312,20 +1314,20 @@
"portable",
"shim"
],
- "time": "2016-11-14 01:06:16"
+ "time": "2017-10-11 12:05:26"
},
{
"name": "symfony/polyfill-php54",
- "version": "v1.3.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php54.git",
- "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0"
+ "reference": "d7810a14b2c6c1aff415e1bb755f611b3d5327bc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/90e085822963fdcc9d1c5b73deb3d2e5783b16a0",
- "reference": "90e085822963fdcc9d1c5b73deb3d2e5783b16a0",
+ "url": "https://api.github.com/repos/symfony/polyfill-php54/zipball/d7810a14b2c6c1aff415e1bb755f611b3d5327bc",
+ "reference": "d7810a14b2c6c1aff415e1bb755f611b3d5327bc",
"shasum": ""
},
"require": {
@@ -1334,7 +1336,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -1370,20 +1372,20 @@
"portable",
"shim"
],
- "time": "2016-11-14 01:06:16"
+ "time": "2017-10-11 12:05:26"
},
{
"name": "symfony/polyfill-php55",
- "version": "v1.3.0",
+ "version": "v1.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php55.git",
- "reference": "03e3f0350bca2220e3623a0e340eef194405fc67"
+ "reference": "b64e7f0c37ecf144ecc16668936eef94e628fbfd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/03e3f0350bca2220e3623a0e340eef194405fc67",
- "reference": "03e3f0350bca2220e3623a0e340eef194405fc67",
+ "url": "https://api.github.com/repos/symfony/polyfill-php55/zipball/b64e7f0c37ecf144ecc16668936eef94e628fbfd",
+ "reference": "b64e7f0c37ecf144ecc16668936eef94e628fbfd",
"shasum": ""
},
"require": {
@@ -1393,7 +1395,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
@@ -1426,20 +1428,20 @@
"portable",
"shim"
],
- "time": "2016-11-14 01:06:16"
+ "time": "2017-10-11 12:05:26"
},
{
"name": "symfony/proxy-manager-bridge",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/proxy-manager-bridge.git",
- "reference": "991c0fcd1d461ee9c7cde7d2c44d1ed7f4cc36ae"
+ "reference": "2513b97c244414c45d2c64e2f421b718daacebaa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/991c0fcd1d461ee9c7cde7d2c44d1ed7f4cc36ae",
- "reference": "991c0fcd1d461ee9c7cde7d2c44d1ed7f4cc36ae",
+ "url": "https://api.github.com/repos/symfony/proxy-manager-bridge/zipball/2513b97c244414c45d2c64e2f421b718daacebaa",
+ "reference": "2513b97c244414c45d2c64e2f421b718daacebaa",
"shasum": ""
},
"require": {
@@ -1480,20 +1482,20 @@
],
"description": "Symfony ProxyManager Bridge",
"homepage": "https://symfony.com",
- "time": "2017-04-12 14:07:15"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/routing",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "a8f328c7e701b7bb05a93fca62a5ab2b6b3e500e"
+ "reference": "74808bc927c173935edc31e331d742698b055d0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/a8f328c7e701b7bb05a93fca62a5ab2b6b3e500e",
- "reference": "a8f328c7e701b7bb05a93fca62a5ab2b6b3e500e",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/74808bc927c173935edc31e331d742698b055d0a",
+ "reference": "74808bc927c173935edc31e331d742698b055d0a",
"shasum": ""
},
"require": {
@@ -1555,32 +1557,35 @@
"uri",
"url"
],
- "time": "2017-04-12 14:07:15"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/twig-bridge",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/twig-bridge.git",
- "reference": "362aa855b5819355811b58f8b5f15679196a181e"
+ "reference": "624cfc984d47ac5d3a940ba53bd14c4550c8a9e4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/362aa855b5819355811b58f8b5f15679196a181e",
- "reference": "362aa855b5819355811b58f8b5f15679196a181e",
+ "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/624cfc984d47ac5d3a940ba53bd14c4550c8a9e4",
+ "reference": "624cfc984d47ac5d3a940ba53bd14c4550c8a9e4",
"shasum": ""
},
"require": {
"php": ">=5.3.9",
- "twig/twig": "~1.28|~2.0"
+ "twig/twig": "~1.34|~2.4"
+ },
+ "conflict": {
+ "symfony/form": "<2.8.23"
},
"require-dev": {
"symfony/asset": "~2.7|~3.0.0",
"symfony/console": "~2.8|~3.0.0",
"symfony/expression-language": "~2.4|~3.0.0",
"symfony/finder": "~2.3|~3.0.0",
- "symfony/form": "^2.8.19",
+ "symfony/form": "^2.8.23",
"symfony/http-kernel": "~2.8|~3.0.0",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/routing": "~2.2|~3.0.0",
@@ -1636,20 +1641,20 @@
],
"description": "Symfony Twig Bridge",
"homepage": "https://symfony.com",
- "time": "2017-04-12 14:07:15"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/yaml",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "93ccdde79f4b079c7558da4656a3cb1c50c68e02"
+ "reference": "842fb6df22180244b4c65935ce1a88d324e5ff9e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/93ccdde79f4b079c7558da4656a3cb1c50c68e02",
- "reference": "93ccdde79f4b079c7558da4656a3cb1c50c68e02",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/842fb6df22180244b4c65935ce1a88d324e5ff9e",
+ "reference": "842fb6df22180244b4c65935ce1a88d324e5ff9e",
"shasum": ""
},
"require": {
@@ -1685,24 +1690,24 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01 14:31:55"
+ "time": "2017-10-05 14:38:30"
},
{
"name": "twig/twig",
- "version": "v1.33.2",
+ "version": "v1.35.0",
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "dd6ca96227917e1e85b41c7c3cc6507b411e0927"
+ "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/dd6ca96227917e1e85b41c7c3cc6507b411e0927",
- "reference": "dd6ca96227917e1e85b41c7c3cc6507b411e0927",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f",
+ "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f",
"shasum": ""
},
"require": {
- "php": ">=5.2.7"
+ "php": ">=5.3.3"
},
"require-dev": {
"psr/container": "^1.0",
@@ -1712,12 +1717,15 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.33-dev"
+ "dev-master": "1.35-dev"
}
},
"autoload": {
"psr-0": {
"Twig_": "lib/"
+ },
+ "psr-4": {
+ "Twig\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1747,7 +1755,7 @@
"keywords": [
"templating"
],
- "time": "2017-04-20 17:39:48"
+ "time": "2017-09-27 18:06:46"
},
{
"name": "zendframework/zend-code",
@@ -2294,22 +2302,22 @@
},
{
"name": "phpspec/prophecy",
- "version": "v1.7.0",
+ "version": "v1.7.2",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
+ "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
- "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
+ "reference": "c9b8c6088acd19d769d4cc0ffa60a9fe34344bd6",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
"sebastian/comparator": "^1.1|^2.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
@@ -2320,7 +2328,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
},
"autoload": {
@@ -2353,7 +2361,7 @@
"spy",
"stub"
],
- "time": "2017-03-02 20:05:34"
+ "time": "2017-09-04 11:05:03"
},
{
"name": "phpunit/dbunit",
@@ -2664,16 +2672,16 @@
},
{
"name": "phpunit/phpunit",
- "version": "4.8.35",
+ "version": "4.8.36",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87"
+ "reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87",
- "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
+ "reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
"shasum": ""
},
"require": {
@@ -2732,7 +2740,7 @@
"testing",
"xunit"
],
- "time": "2017-02-06 05:18:07"
+ "time": "2017-06-21 08:07:12"
},
{
"name": "phpunit/phpunit-mock-objects",
@@ -3345,16 +3353,16 @@
},
{
"name": "symfony/browser-kit",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
- "reference": "4386755566fc8d29bddf89694663b0e96cb01e61"
+ "reference": "87a03da13c5110e6638e874803437dcd5c76d472"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/browser-kit/zipball/4386755566fc8d29bddf89694663b0e96cb01e61",
- "reference": "4386755566fc8d29bddf89694663b0e96cb01e61",
+ "url": "https://api.github.com/repos/symfony/browser-kit/zipball/87a03da13c5110e6638e874803437dcd5c76d472",
+ "reference": "87a03da13c5110e6638e874803437dcd5c76d472",
"shasum": ""
},
"require": {
@@ -3398,20 +3406,20 @@
],
"description": "Symfony BrowserKit Component",
"homepage": "https://symfony.com",
- "time": "2017-04-12 14:07:15"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/css-selector",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
- "reference": "ba3204654efa779691fac9e948a96b4a7067e4ab"
+ "reference": "ef01ca1352deb0c029cf496a89a6b175659c1ec3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/css-selector/zipball/ba3204654efa779691fac9e948a96b4a7067e4ab",
- "reference": "ba3204654efa779691fac9e948a96b4a7067e4ab",
+ "url": "https://api.github.com/repos/symfony/css-selector/zipball/ef01ca1352deb0c029cf496a89a6b175659c1ec3",
+ "reference": "ef01ca1352deb0c029cf496a89a6b175659c1ec3",
"shasum": ""
},
"require": {
@@ -3451,20 +3459,20 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2017-05-01 14:31:55"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/dom-crawler",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
- "reference": "b19d01ec41c704497b0bee78bce8bf97619c0649"
+ "reference": "6433e25f338ff174dc9429283354faf06df05f67"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b19d01ec41c704497b0bee78bce8bf97619c0649",
- "reference": "b19d01ec41c704497b0bee78bce8bf97619c0649",
+ "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/6433e25f338ff174dc9429283354faf06df05f67",
+ "reference": "6433e25f338ff174dc9429283354faf06df05f67",
"shasum": ""
},
"require": {
@@ -3507,20 +3515,20 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2017-05-25 22:57:22"
+ "time": "2017-10-01 21:00:16"
},
{
"name": "symfony/process",
- "version": "v2.8.21",
+ "version": "v2.8.28",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "d54232f5682fda2f8bbebff7c81b864646867ab9"
+ "reference": "26c9fb02bf06bd6b90f661a5bd17e510810d0176"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/d54232f5682fda2f8bbebff7c81b864646867ab9",
- "reference": "d54232f5682fda2f8bbebff7c81b864646867ab9",
+ "url": "https://api.github.com/repos/symfony/process/zipball/26c9fb02bf06bd6b90f661a5bd17e510810d0176",
+ "reference": "26c9fb02bf06bd6b90f661a5bd17e510810d0176",
"shasum": ""
},
"require": {
@@ -3556,7 +3564,7 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-05-08 01:19:21"
+ "time": "2017-10-01 21:00:16"
}
],
"aliases": [],
@@ -3569,6 +3577,6 @@
},
"platform-dev": [],
"platform-overrides": {
- "php": "5.4"
+ "php": "5.4.7"
}
}
diff --git a/phpBB/config/default/container/services_console.yml b/phpBB/config/default/container/services_console.yml
index 697e147d85..a327b74ac4 100644
--- a/phpBB/config/default/container/services_console.yml
+++ b/phpBB/config/default/container/services_console.yml
@@ -3,7 +3,6 @@ services:
class: phpbb\console\exception_subscriber
arguments:
- '@language'
- - '%debug.exceptions%'
tags:
- { name: kernel.event_subscriber }
diff --git a/phpBB/config/default/container/services_feed.yml b/phpBB/config/default/container/services_feed.yml
index d3e7924f2f..e8bac4b5ce 100644
--- a/phpBB/config/default/container/services_feed.yml
+++ b/phpBB/config/default/container/services_feed.yml
@@ -18,9 +18,10 @@ services:
class: phpbb\feed\helper
arguments:
- '@config'
+ - '@service_container'
+ - '@path_helper'
+ - '@text_formatter.renderer'
- '@user'
- - '%core.root_path%'
- - '%core.php_ext%'
feed.forum:
class: phpbb\feed\forum
@@ -78,6 +79,10 @@ services:
- '@dispatcher'
- '%core.php_ext%'
+ feed.quote_helper:
+ class: phpbb\feed\quote_helper
+ parent: text_formatter.s9e.quote_helper
+
feed.topic:
class: phpbb\feed\topic
shared: false
diff --git a/phpBB/config/default/container/services_text_formatter.yml b/phpBB/config/default/container/services_text_formatter.yml
index a9f2efdb16..74624ea4e4 100644
--- a/phpBB/config/default/container/services_text_formatter.yml
+++ b/phpBB/config/default/container/services_text_formatter.yml
@@ -26,6 +26,11 @@ services:
text_formatter.utils:
alias: text_formatter.s9e.utils
+ text_formatter.s9e.bbcode_merger:
+ class: phpbb\textformatter\s9e\bbcode_merger
+ arguments:
+ - '@text_formatter.s9e.factory'
+
text_formatter.s9e.factory:
class: phpbb\textformatter\s9e\factory
arguments:
diff --git a/phpBB/docs/CREDITS.txt b/phpBB/docs/CREDITS.txt
index 2df7543ce1..cb42779641 100644
--- a/phpBB/docs/CREDITS.txt
+++ b/phpBB/docs/CREDITS.txt
@@ -26,9 +26,11 @@ phpBB Lead Developer: Marc (Marc Alexander)
phpBB Developers: bantu (Andreas Fischer)
CHItA (Máté Bartus)
+ Derky (Derk Ruitenbeek)
Elsensee (Oliver Schramm)
+ Hanakin (Michael Miday)
+ MichaelC (Michael Cullum)
Nicofuma (Tristan Darricau)
- prototech (Cesar Gallegos)
For a list of phpBB Team members, please see:
http://www.phpbb.com/about/team/
@@ -61,6 +63,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
kellanved (Henry Sudhof) [04/2007 - 03/2011]
nickvergessen (Joas Schilling)[04/2010 - 12/2015]
Oleg (Oleg Pudeyev) [01/2011 - 05/2013]
+ prototech (Cesar Gallegos) [01/2014 - 12/2016]
rxu (Ruslan Uzdenov) [04/2010 - 12/2012]
TerraFrost (Jim Wigginton) [04/2009 - 01/2011]
ToonArmy (Chris Smith) [06/2008 - 11/2011]
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index 6af3f55d21..68dec5085d 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -433,6 +433,13 @@ acp_prune_forums_prepend
* Since: 3.1.7-RC1
* Purpose: Add content before the forum select form label
+acp_prune_forums_settings_append
+===
+* Locations:
+ + adm/style/acp_prune_forums.html
+* Since: 3.2.2-RC1
+* Purpose: Add content after the prune settings
+
acp_prune_users_find_username_append
===
* Locations:
@@ -953,6 +960,27 @@ mcp_topic_options_before
* Since: 3.1.6-RC1
* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject
+mcp_topic_postrow_attachments_after
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+* Since: 3.2.2-RC1
+* Purpose: Show additional content after attachments in mcp topic review
+
+mcp_topic_postrow_attachments_before
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+* Since: 3.2.2-RC1
+* Purpose: Show additional content before attachments in mcp topic review
+
+mcp_topic_postrow_post_before
+===
+* Locations:
+ + styles/prosilver/template/mcp_topic.html
+* Since: 3.2.2-RC1
+* Purpose: Show additional content after postrow begins in mcp topic review
+
mcp_topic_postrow_post_details_after
===
* Locations:
diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf
index ce929b6e54..55c01a1fc9 100644
--- a/phpBB/docs/nginx.sample.conf
+++ b/phpBB/docs/nginx.sample.conf
@@ -18,11 +18,11 @@ http {
gzip_vary on;
gzip_http_version 1.1;
gzip_min_length 700;
-
+
# Compression levels over 6 do not give an appreciable improvement
# in compression ratio, but take more resources.
gzip_comp_level 6;
-
+
# IE 6 and lower do not support gzip with Vary correctly.
gzip_disable "msie6";
# Before nginx 0.7.63:
@@ -49,9 +49,7 @@ http {
server_name myforums.com;
# A trick from http://wiki.nginx.org/Pitfalls#Taxing_Rewrites:
- rewrite ^ http://www.myforums.com$request_uri permanent;
- # Equivalent to:
- #rewrite ^(.*)$ http://www.myforums.com$1 permanent;
+ return 301 http://www.myforums.com$request_uri;
}
# The actual board domain.
@@ -72,7 +70,7 @@ http {
}
# Deny access to internal phpbb files.
- location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|phpbb|store|vendor) {
+ location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
deny all;
# deny was ignored before 0.8.40 for connections over IPv6.
# Use internal directive to prohibit access on older versions.
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index a9cd4a3b3c..9ee489cef4 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -159,6 +159,8 @@ $user->session_begin(false);
$auth->acl($user->data);
$user->setup('viewtopic');
+$phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
{
send_status_line(404, 'Not Found');
@@ -225,7 +227,7 @@ else
$post_row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if (!$post_row || ($post_row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $post_row['forum_id'])))
+ if (!$post_row || !$phpbb_content_visibility->is_visible('post', $post_row['forum_id'], $post_row))
{
// Attachment of a soft deleted post and the user is not allowed to see the post
send_status_line(404, 'Not Found');
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php
index 3cfe5de293..2480f1f025 100644
--- a/phpBB/includes/acp/acp_attachments.php
+++ b/phpBB/includes/acp/acp_attachments.php
@@ -922,6 +922,9 @@ class acp_attachments
case 'orphan':
+ /* @var $pagination \phpbb\pagination */
+ $pagination = $this->phpbb_container->get('pagination');
+
if ($submit)
{
$delete_files = (isset($_POST['delete'])) ? array_keys($request->variable('delete', array('' => 0))) : array();
@@ -1064,13 +1067,29 @@ class acp_attachments
'S_ORPHAN' => true)
);
+ $attachments_per_page = (int) $config['topics_per_page'];
+
+ // Get total number or orphans older than 3 hours
+ $sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
+ FROM ' . ATTACHMENTS_TABLE . '
+ WHERE is_orphan = 1
+ AND filetime < ' . (time() - 3*60*60);
+ $result = $this->db->sql_query($sql);
+ $row = $this->db->sql_fetchrow($result);
+ $num_files = (int) $row['num_files'];
+ $total_size = (int) $row['total_size'];
+ $this->db->sql_freeresult($result);
+
+ $start = $request->variable('start', 0);
+ $start = $pagination->validate_start($start, $attachments_per_page, $num_files);
+
// Just get the files with is_orphan set and older than 3 hours
$sql = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 1
AND filetime < ' . (time() - 3*60*60) . '
ORDER BY filetime DESC';
- $result = $db->sql_query($sql);
+ $result = $db->sql_query_limit($sql, $attachments_per_page, $start);
while ($row = $db->sql_fetchrow($result))
{
@@ -1086,6 +1105,20 @@ class acp_attachments
}
$db->sql_freeresult($result);
+ $pagination->generate_template_pagination(
+ $this->u_action,
+ 'pagination',
+ 'start',
+ $num_files,
+ $attachments_per_page,
+ $start
+ );
+
+ $template->assign_vars(array(
+ 'TOTAL_FILES' => $num_files,
+ 'TOTAL_SIZE' => get_formatted_filesize($total_size),
+ ));
+
break;
case 'manage':
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php
index f958ae93c7..18d574081a 100644
--- a/phpBB/includes/acp/acp_bbcodes.php
+++ b/phpBB/includes/acp/acp_bbcodes.php
@@ -553,10 +553,10 @@ class acp_bbcodes
}
// Lowercase tags
- $bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
- $bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match);
+ $bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
+ $bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
- if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag))
+ if (!preg_match('/^[a-zA-Z0-9_-]+$/', $bbcode_tag))
{
global $user;
trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 77e6133fe6..d2a4262e36 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -444,11 +444,11 @@ class acp_board
'legend1' => 'GENERAL_SETTINGS',
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
- 'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'number:0:99999', 'explain' => true),
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
'board_contact_name' => array('lang' => 'CONTACT_EMAIL_NAME', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => true),
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
+ 'email_force_sender' => array('lang' => 'EMAIL_FORCE_SENDER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'send_test_email' => array('lang' => 'SEND_TEST_EMAIL', 'validate' => 'bool', 'type' => 'custom', 'method' => 'send_test_email', 'explain' => true),
@@ -532,13 +532,6 @@ class acp_board
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
- if ($config_name == 'email_function_name')
- {
- $this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));
- $this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];
- $config_value = $this->new_config['email_function_name'];
- }
-
if ($submit)
{
if (strpos($data['type'], 'password') === 0 && $config_value === '********')
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index d37050869a..a8c0dd060d 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -55,7 +55,7 @@ class acp_prune
*/
function prune_forums($id, $mode)
{
- global $db, $user, $auth, $template, $phpbb_log, $request;
+ global $db, $user, $auth, $template, $phpbb_log, $request, $phpbb_dispatcher;
$all_forums = $request->variable('all_forums', 0);
$forum_id = $request->variable('f', array(0));
@@ -165,7 +165,7 @@ class acp_prune
}
else
{
- confirm_box(false, $user->lang['PRUNE_FORUM_CONFIRM'], build_hidden_fields(array(
+ $hidden_fields = array(
'i' => $id,
'mode' => $mode,
'submit' => 1,
@@ -177,7 +177,19 @@ class acp_prune
'prune_old_polls' => $request->variable('prune_old_polls', 0),
'prune_announce' => $request->variable('prune_announce', 0),
'prune_sticky' => $request->variable('prune_sticky', 0),
- )));
+ );
+
+ /**
+ * Use this event to pass data from the prune form to the confirmation screen
+ *
+ * @event core.prune_forums_settings_confirm
+ * @var array hidden_fields Hidden fields that are passed through the confirm screen
+ * @since 3.2.2-RC1
+ */
+ $vars = array('hidden_fields');
+ extract($phpbb_dispatcher->trigger_event('core.prune_forums_settings_confirm', compact($vars)));
+
+ confirm_box(false, $user->lang['PRUNE_FORUM_CONFIRM'], build_hidden_fields($hidden_fields));
}
}
@@ -217,13 +229,25 @@ class acp_prune
$l_selected_forums = (sizeof($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
- $template->assign_vars(array(
+ $template_data = array(
'L_SELECTED_FORUMS' => $user->lang[$l_selected_forums],
'U_ACTION' => $this->u_action,
'U_BACK' => $this->u_action,
'FORUM_LIST' => $forum_list,
- 'S_HIDDEN_FIELDS' => $s_hidden_fields)
+ 'S_HIDDEN_FIELDS' => $s_hidden_fields,
);
+
+ /**
+ * Event to add/modify prune forums settings template data
+ *
+ * @event core.prune_forums_settings_template_data
+ * @var array template_data Array with form template data
+ * @since 3.2.2-RC1
+ */
+ $vars = array('template_data');
+ extract($phpbb_dispatcher->trigger_event('core.prune_forums_settings_template_data', compact($vars)));
+
+ $template->assign_vars($template_data);
}
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index b954f90451..4c390c5f0e 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -398,7 +398,7 @@ class acp_styles
// Reset default style for users who use selected styles
$sql = 'UPDATE ' . USERS_TABLE . '
- SET user_style = 0
+ SET user_style = ' . (int) $this->default_style . '
WHERE user_style IN (' . implode(', ', $ids) . ')';
$this->db->sql_query($sql);
@@ -1249,7 +1249,7 @@ class acp_styles
// Change default style for users
$sql = 'UPDATE ' . USERS_TABLE . '
- SET user_style = 0
+ SET user_style = ' . (int) $this->default_style . '
WHERE user_style = ' . $id;
$this->db->sql_query($sql);
@@ -1355,18 +1355,18 @@ class acp_styles
}
// Hardcoded template bitfield to add for new templates
+ $default_bitfield = '1111111111111';
+
$bitfield = new bitfield();
- $bitfield->set(0);
- $bitfield->set(1);
- $bitfield->set(2);
- $bitfield->set(3);
- $bitfield->set(4);
- $bitfield->set(8);
- $bitfield->set(9);
- $bitfield->set(11);
- $bitfield->set(12);
- $value = $bitfield->get_base64();
- return $value;
+ for ($i = 0; $i < strlen($default_bitfield); $i++)
+ {
+ if ($default_bitfield[$i] == '1')
+ {
+ $bitfield->set($i);
+ }
+ }
+
+ return $bitfield->get_base64();
}
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index cf442bbc33..beaa1d11f1 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -813,16 +813,22 @@ class acp_users
break;
default:
+ $u_action = $this->u_action;
+
/**
* Run custom quicktool code
*
* @event core.acp_users_overview_run_quicktool
- * @var array user_row Current user data
* @var string action Quick tool that should be run
+ * @var array user_row Current user data
+ * @var string u_action The u_action link
* @since 3.1.0-a1
+ * @changed 3.2.2-RC1 Added u_action
*/
- $vars = array('action', 'user_row');
+ $vars = array('action', 'user_row', 'u_action');
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
+
+ unset($u_action);
break;
}
@@ -1485,12 +1491,14 @@ class acp_users
* Validate profile data in ACP before submitting to the database
*
* @event core.acp_users_profile_validate
- * @var bool submit Flag indicating if submit button has been pressed
* @var array data Array with user profile data
+ * @var int user_id The user id
+ * @var array user_row Array with the full user data
* @var array error Array with the form errors
* @since 3.1.4-RC1
+ * @changed 3.1.12-RC1 Removed submit, added user_id, user_row
*/
- $vars = array('submit', 'data', 'error');
+ $vars = array('data', 'user_id', 'user_row', 'error');
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
if (!sizeof($error))
@@ -2489,7 +2497,7 @@ class acp_users
'U_DELETE' => $this->u_action . "&amp;action=delete&amp;u=$user_id&amp;g=" . $data['group_id'],
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&amp;action=approve&amp;u=$user_id&amp;g=" . $data['group_id'] : '',
- 'GROUP_NAME' => ($group_type == 'special') ? $user->lang['G_' . $data['group_name']] : $data['group_name'],
+ 'GROUP_NAME' => $group_helper->get_name($data['group_name']),
'L_DEMOTE_PROMOTE' => ($data['group_leader']) ? $user->lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE'],
'S_IS_MEMBER' => ($group_type != 'pending') ? true : false,
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 43d8cce3c4..2cd62d7bac 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4070,11 +4070,6 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
if ($driver)
{
$html = $driver->get_custom_html($user, $row, $alt);
- if (!empty($html))
- {
- return $html;
- }
-
$avatar_data = $driver->get_data($row);
}
else
@@ -4082,7 +4077,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
$avatar_data['src'] = '';
}
- if (!empty($avatar_data['src']))
+ if (empty($html) && !empty($avatar_data['src']))
{
if ($lazy)
{
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 1ad41156f9..96916e1e43 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2369,6 +2369,16 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
$topic_list = array_unique($topic_list);
}
+ /**
+ * Perform additional actions before topic deletion via pruning
+ *
+ * @event core.prune_delete_before
+ * @var int[] topic_list The IDs of the topics to be deleted
+ * @since 3.2.2-RC1
+ */
+ $vars = array('topic_list');
+ extract($phpbb_dispatcher->trigger_event('core.prune_delete_before', compact($vars)));
+
return delete_topics('topic_id', $topic_list, $auto_sync, false);
}
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 32bee14eef..171a73a8de 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -537,7 +537,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
// Create last post link information, if appropriate
if ($row['forum_last_post_id'])
{
- if ($row['forum_password_last_post'] === '' && $auth->acl_get('f_read', $row['forum_id_last_post']))
+ if ($row['forum_password_last_post'] === '' && $auth->acl_gets('f_read', 'f_list_topics', $row['forum_id_last_post']))
{
$last_post_subject = censor_text($row['forum_last_post_subject']);
$last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']);
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index e00be1e01a..e3af294b75 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -662,6 +662,8 @@ function phpbb_increment_downloads($db, $ids)
*/
function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
{
+ global $phpbb_container;
+
$sql_array = array(
'SELECT' => 't.topic_visibility, t.forum_id, f.forum_name, f.forum_password, f.parent_id',
'FROM' => array(
@@ -677,7 +679,9 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
- if ($row && $row['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
+ if ($row && !$phpbb_content_visibility->is_visible('topic', $row['forum_id'], $row))
{
send_status_line(404, 'Not Found');
trigger_error('ERROR_NO_ATTACHMENT');
diff --git a/phpBB/includes/functions_mcp.php b/phpBB/includes/functions_mcp.php
index dfe3fefbd0..7ab2da8e5c 100644
--- a/phpBB/includes/functions_mcp.php
+++ b/phpBB/includes/functions_mcp.php
@@ -197,7 +197,7 @@ function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = fa
*/
function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = false)
{
- global $db, $auth, $config, $user;
+ global $db, $auth, $config, $user, $phpbb_container;
$rowset = array();
@@ -246,6 +246,8 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals
$result = $db->sql_query($sql);
unset($sql_array);
+ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
+
while ($row = $db->sql_fetchrow($result))
{
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
@@ -253,7 +255,7 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals
continue;
}
- if ($row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
+ if (!$phpbb_content_visibility->is_visible('post', $row['forum_id'], $row))
{
// Moderators without the permission to approve post should at least not see them. ;)
continue;
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index ab7f00a65a..4eda5ac6cb 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -416,7 +416,7 @@ class messenger
switch ($type)
{
case 'EMAIL':
- $message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/' . $config['email_function_name'] . '()') . '</strong>';
+ $message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/mail()') . '</strong>';
break;
default:
@@ -1839,7 +1839,8 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
- $result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
+ $additional_parameters = $config['email_force_sender'] ? '-f' . $config['board_email'] : '';
+ $result = mail($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, $additional_parameters);
$collector->uninstall();
$err_msg = $collector->format_errors();
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index c746bd0e4c..175cdeeda8 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -272,8 +272,8 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
* Use this event to modify the values to be inserted when a user is added
*
* @event core.user_add_modify_data
- * @var array user_row Array of user details submited to user_add
- * @var array cp_data Array of Custom profile fields submited to user_add
+ * @var array user_row Array of user details submitted to user_add
+ * @var array cp_data Array of Custom profile fields submitted to user_add
* @var array sql_ary Array of data to be inserted when a user is added
* @var array notifications_data Array of notification data to be inserted when a user is added
* @since 3.1.0-a1
@@ -376,6 +376,19 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
);
}
+ /**
+ * Modify the notifications data to be inserted in the database when a user is added
+ *
+ * @event core.user_add_modify_notifications_data
+ * @var array user_row Array of user details submitted to user_add
+ * @var array cp_data Array of Custom profile fields submitted to user_add
+ * @var array sql_ary Array of data to be inserted when a user is added
+ * @var array notifications_data Array of notification data to be inserted when a user is added
+ * @since 3.2.2-RC1
+ */
+ $vars = array('user_row', 'cp_data', 'sql_ary', 'notifications_data');
+ extract($phpbb_dispatcher->trigger_event('core.user_add_modify_notifications_data', compact($vars)));
+
// Subscribe user to notifications if necessary
if (!empty($notifications_data))
{
@@ -388,12 +401,12 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
}
/**
- * Event that returns user id, user detals and user CPF of newly registared user
+ * Event that returns user id, user details and user CPF of newly registered user
*
* @event core.user_add_after
- * @var int user_id User id of newly registared user
- * @var array user_row Array of user details submited to user_add
- * @var array cp_data Array of Custom profile fields submited to user_add
+ * @var int user_id User id of newly registered user
+ * @var array user_row Array of user details submitted to user_add
+ * @var array cp_data Array of Custom profile fields submitted to user_add
* @since 3.1.0-b5
*/
$vars = array('user_id', 'user_row', 'cp_data');
diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php
index 9699843db4..ee6d0ee2a6 100644
--- a/phpBB/includes/questionnaire/questionnaire.php
+++ b/phpBB/includes/questionnaire/questionnaire.php
@@ -337,7 +337,7 @@ class phpbb_questionnaire_phpbb_data_provider
'edit_time' => true,
'email_check_mx' => true,
'email_enable' => true,
- 'email_function_name' => true,
+ 'email_force_sender' => true,
'email_package_size' => true,
'enable_confirm' => true,
'enable_pm_icons' => true,
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index 48d14a133c..cf767a7cce 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -267,6 +267,8 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
* @var array user_info User data of the sender
* @since 3.1.0-a1
* @changed 3.1.6-RC1 Added user_info into event
+ * @changed 3.2.2-RC1 Deprecated
+ * @deprecated 4.0.0 Event name is misspelled and is replaced with new event with correct name
*/
$vars = array(
'id',
@@ -281,6 +283,34 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
);
extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_messsage', compact($vars)));
+ /**
+ * Modify pm and sender data before it is assigned to the template
+ *
+ * @event core.ucp_pm_view_message
+ * @var mixed id Active module category (can be int or string)
+ * @var string mode Active module
+ * @var int folder_id ID of the folder the message is in
+ * @var int msg_id ID of the private message
+ * @var array folder Array with data of user's message folders
+ * @var array message_row Array with message data
+ * @var array cp_row Array with senders custom profile field data
+ * @var array msg_data Template array with message data
+ * @var array user_info User data of the sender
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'id',
+ 'mode',
+ 'folder_id',
+ 'msg_id',
+ 'folder',
+ 'message_row',
+ 'cp_row',
+ 'msg_data',
+ 'user_info',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_pm_view_message', compact($vars)));
+
$template->assign_vars($msg_data);
$contact_fields = array(
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 594100ac65..a7a93d6115 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -166,7 +166,7 @@ class ucp_register
->format($user->lang['DATE_FORMAT'], true);
unset($now);
- $template->assign_vars(array(
+ $template_vars = array(
'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
'L_COPPA_NO' => sprintf($user->lang['UCP_COPPA_BEFORE'], $coppa_birthday),
'L_COPPA_YES' => sprintf($user->lang['UCP_COPPA_ON_AFTER'], $coppa_birthday),
@@ -180,11 +180,11 @@ class ucp_register
'COOKIE_NAME' => $config['cookie_name'],
'COOKIE_PATH' => $config['cookie_path'],
- ));
+ );
}
else
{
- $template->assign_vars(array(
+ $template_vars = array(
'S_LANG_OPTIONS' => (sizeof($lang_row) > 1) ? language_select($user_lang) : '',
'L_TERMS_OF_USE' => sprintf($user->lang['TERMS_OF_USE_CONTENT'], $config['sitename'], generate_board_url()),
@@ -195,11 +195,32 @@ class ucp_register
'COOKIE_NAME' => $config['cookie_name'],
'COOKIE_PATH' => $config['cookie_path'],
- )
);
}
+
+ $tpl_name = 'ucp_agreement';
+
+ /**
+ * Allows to modify the agreements.
+ *
+ * @event core.ucp_register_agreement_modify_template_data
+ * @var string tpl_name Template file
+ * @var array template_vars Array with data about to be assigned to the template
+ * @var array s_hidden_fields Array with hidden form elements
+ * @var array lang_row Array with available languages, read only
+ * @since 3.2.2-RC1
+ */
+ $vars = array('tpl_name', 'template_vars', 's_hidden_fields', 'lang_row');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_register_agreement_modify_template_data', compact($vars)));
+
unset($lang_row);
+ $template_vars = array_merge($template_vars, array(
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
+ ));
+
+ $template->assign_vars($template_vars);
+
/**
* Allows to modify the agreements.
*
@@ -207,10 +228,11 @@ class ucp_register
*
* @event core.ucp_register_agreement
* @since 3.1.6-RC1
+ * @deprecated 3.2.2-RC1 Replaced by core.ucp_register_agreement_modify_template_data and to be removed in 3.3.0-RC1
*/
$phpbb_dispatcher->dispatch('core.ucp_register_agreement');
- $this->tpl_name = 'ucp_agreement';
+ $this->tpl_name = $tpl_name;
return;
}
@@ -505,7 +527,6 @@ class ucp_register
{
$s_hidden_fields = array_merge($s_hidden_fields, $captcha->get_hidden_fields());
}
- $s_hidden_fields = build_hidden_fields($s_hidden_fields);
// Visual Confirmation - Show images
if ($config['enable_confirm'])
@@ -531,8 +552,7 @@ class ucp_register
// Assign template vars for timezone select
phpbb_timezone_select($template, $user, $data['tz'], true);
- $template->assign_vars(array(
- 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ $template_vars = array(
'USERNAME' => $data['username'],
'PASSWORD' => $data['new_password'],
'PASSWORD_CONFIRM' => $data['password_confirm'],
@@ -547,13 +567,41 @@ class ucp_register
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
'S_REGISTRATION' => true,
'S_COPPA' => $coppa,
- 'S_HIDDEN_FIELDS' => $s_hidden_fields,
'S_UCP_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=register'),
'COOKIE_NAME' => $config['cookie_name'],
'COOKIE_PATH' => $config['cookie_path'],
+ );
+
+ $tpl_name = 'ucp_register';
+
+ /**
+ * Modify template data on the registration page
+ *
+ * @event core.ucp_register_modify_template_data
+ * @var array template_vars Array with template data
+ * @var array data Array with user data, read only
+ * @var array error Array with errors
+ * @var array s_hidden_fields Array with hidden field elements
+ * @var string tpl_name Template name
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'template_vars',
+ 'data',
+ 'error',
+ 's_hidden_fields',
+ 'tpl_name',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.ucp_register_modify_template_data', compact($vars)));
+
+ $template_vars = array_merge($template_vars, array(
+ 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'S_HIDDEN_FIELDS' => build_hidden_fields($s_hidden_fields),
));
+ $template->assign_vars($template_vars);
+
//
$user->profile_fields = array();
@@ -561,8 +609,7 @@ class ucp_register
$cp->generate_profile_fields('register', $user->get_iso_lang_id());
//
- $this->tpl_name = 'ucp_register';
- $this->page_title = 'UCP_REGISTRATION';
+ $this->tpl_name = $tpl_name;
}
/**
diff --git a/phpBB/index.php b/phpBB/index.php
index 83535b50af..4e37782206 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -123,8 +123,10 @@ $db->sql_freeresult($result);
$legend = implode($user->lang['COMMA_SEPARATOR'], $legend);
// Generate birthday list if required ...
+$show_birthdays = ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'));
+
$birthdays = $birthday_list = array();
-if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
+if ($show_birthdays)
{
$time = $user->create_datetime();
$now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset());
@@ -215,7 +217,7 @@ $template->assign_vars(array(
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'U_SEND_PASSWORD' => ($config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=sendpassword') : '',
- 'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
+ 'S_DISPLAY_BIRTHDAY_LIST' => $show_birthdays,
'S_INDEX' => true,
'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'hash=' . generate_link_hash('global') . '&amp;mark=forums&amp;mark_time=' . time()) : '',
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index ca0e8bd614..9d1236f340 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -103,7 +103,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('extension_force_un
INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_force_sender', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_max_chunk_size', '50');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size', '20');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
@@ -328,6 +328,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_icons', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_ignoreflood', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_img', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_list', 1);
+INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_list_topics', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_noapprove', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_poll', 1);
INSERT INTO phpbb_acl_options (auth_option, is_local) VALUES ('f_post', 1);
@@ -477,7 +478,7 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order)
INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) VALUES ('ROLE_FORUM_NEW_MEMBER', 'ROLE_DESCRIPTION_FORUM_NEW_MEMBER', 'f_', 10);
# -- phpbb_styles
-INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '&copy; phpBB Limited', 1, 'prosilver', 'kNg=', 0, '');
+INSERT INTO phpbb_styles (style_name, style_copyright, style_active, style_path, bbcode_bitfield, style_parent_id, style_parent_tree) VALUES ('prosilver', '&copy; phpBB Limited', 1, 'prosilver', '//g=', 0, '');
# -- Forums
INSERT INTO phpbb_forums (forum_name, forum_desc, left_id, right_id, parent_id, forum_type, forum_posts_approved, forum_posts_unapproved, forum_posts_softdeleted, forum_topics_approved, forum_topics_unapproved, forum_topics_softdeleted, forum_last_post_id, forum_last_poster_id, forum_last_poster_name, forum_last_poster_colour, forum_last_post_time, forum_link, forum_password, forum_image, forum_rules, forum_rules_link, forum_rules_uid, forum_desc_uid, prune_days, prune_viewed, forum_parents) VALUES ('{L_FORUMS_FIRST_CATEGORY}', '', 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 'Admin', 'AA0000', 972086460, '', '', '', '', '', '', '', 0, 0, '');
@@ -565,13 +566,13 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 16, auth_option_id, 0 FROM phpbb_acl_options WHERE auth_option = 'f_';
# Read Only Access (f_)
-INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_search', 'f_subscribe', 'f_print');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 17, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_list_topics', 'f_read', 'f_search', 'f_subscribe', 'f_print');
# Limited Access (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 18, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_attach', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg');
# Bot Access (f_)
-INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_read', 'f_print');
+INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 19, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option IN ('f_', 'f_download', 'f_list', 'f_list_topics', 'f_read', 'f_print');
# On Moderation Queue (f_)
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 20, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'f_%' AND auth_option NOT IN ('f_announce', 'f_announce_global', 'f_bump', 'f_delete', 'f_flash', 'f_icons', 'f_ignoreflood', 'f_poll', 'f_sticky', 'f_user_lock', 'f_votechg', 'f_noapprove');
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index e6c56a5bbb..25d70813f6 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -107,7 +107,7 @@ $lang = array_merge($lang, array(
'ACP_AVATAR_SETTINGS_EXPLAIN' => 'Avatars are generally small, unique images a user can associate with themselves. Depending on the style they are usually displayed below the username when viewing topics. Here you can determine how users can define their avatars. Please note that in order to upload avatars you need to have created the directory you name below and ensure it can be written to by the web server. Please also note that file size limits are only imposed on uploaded avatars, they do not apply to remotely linked images.',
'ALLOW_AVATARS' => 'Enable avatars',
- 'ALLOW_AVATARS_EXPLAIN' => 'Allow general usage of avatars;<br />If you disable avatars in general or avatars of a certain mode, the disabled avatars will no longer be shown on the board, but users will still be able to download their own avatars in the User Control Panel.',
+ 'ALLOW_AVATARS_EXPLAIN' => 'Allow general usage of avatars;<br>If you disable avatars in general or avatars of a certain mode, the disabled avatars will no longer be shown on the board, but users will still be able to download their own avatars in the User Control Panel.',
'ALLOW_GRAVATAR' => 'Enable gravatar avatars',
'ALLOW_LOCAL' => 'Enable gallery avatars',
'ALLOW_REMOTE' => 'Enable remote avatars',
@@ -116,9 +116,9 @@ $lang = array_merge($lang, array(
'ALLOW_REMOTE_UPLOAD_EXPLAIN' => 'Allow uploading of avatars from another website.',
'ALLOW_UPLOAD' => 'Enable avatar uploading',
'AVATAR_GALLERY_PATH' => 'Avatar gallery path',
- 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. <samp>images/avatars/gallery</samp>.<br />Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
+ 'AVATAR_GALLERY_PATH_EXPLAIN' => 'Path under your phpBB root directory for pre-loaded images, e.g. <samp>images/avatars/gallery</samp>.<br>Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
'AVATAR_STORAGE_PATH' => 'Avatar storage path',
- 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/avatars/upload</samp>.<br />Avatar uploading <strong>will not be available</strong> if this path is not writable.<br />Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
+ 'AVATAR_STORAGE_PATH_EXPLAIN' => 'Path under your phpBB root directory, e.g. <samp>images/avatars/upload</samp>.<br>Avatar uploading <strong>will not be available</strong> if this path is not writable.<br>Double dots like <samp>../</samp> will be stripped from the path for security reasons.',
'MAX_AVATAR_SIZE' => 'Maximum avatar dimensions',
'MAX_AVATAR_SIZE_EXPLAIN' => 'Width x Height in pixels.',
'MAX_FILESIZE' => 'Maximum avatar file size',
@@ -274,7 +274,7 @@ $lang = array_merge($lang, array(
'ACP_FEED_SETTINGS_OTHER' => 'Other feeds and settings',
'ACP_FEED_ENABLE' => 'Enable feeds',
- 'ACP_FEED_ENABLE_EXPLAIN' => 'Turns on or off ATOM feeds for the entire board.<br />Disabling this switches off all feeds, no matter how the options below are set.',
+ 'ACP_FEED_ENABLE_EXPLAIN' => 'Turns on or off ATOM feeds for the entire board.<br>Disabling this switches off all feeds, no matter how the options below are set.',
'ACP_FEED_LIMIT' => 'Number of items',
'ACP_FEED_LIMIT_EXPLAIN' => 'The maximum number of feed items to display.',
@@ -290,7 +290,7 @@ $lang = array_merge($lang, array(
'ACP_FEED_TOPICS_ACTIVE' => 'Enable active topics feed',
'ACP_FEED_TOPICS_ACTIVE_EXPLAIN' => 'Enables the “Active Topics” feed, which displays the last active topics including the last post.',
'ACP_FEED_NEWS' => 'News feed',
- 'ACP_FEED_NEWS_EXPLAIN' => 'Pull the first post from these forums. Select no forums to disable news feed.<br />Select multiple forums by holding <samp>CTRL</samp> and clicking.',
+ 'ACP_FEED_NEWS_EXPLAIN' => 'Pull the first post from these forums. Select no forums to disable news feed.<br>Select multiple forums by holding <samp>CTRL</samp> and clicking.',
'ACP_FEED_OVERALL_FORUMS' => 'Enable forums feed',
'ACP_FEED_OVERALL_FORUMS_EXPLAIN' => 'Enables the “All forums” feed, which displays a list of forums.',
@@ -298,9 +298,9 @@ $lang = array_merge($lang, array(
'ACP_FEED_HTTP_AUTH' => 'Allow HTTP Authentication',
'ACP_FEED_HTTP_AUTH_EXPLAIN' => 'Enables HTTP authentication, which allows users to receive content that is hidden to guest users by adding the <samp>auth=http</samp> parameter to the feed URL. Please note that some PHP setups require additional changes to the .htaccess file. Instructions can be found in that file.',
'ACP_FEED_ITEM_STATISTICS' => 'Item statistics',
- 'ACP_FEED_ITEM_STATISTICS_EXPLAIN' => 'Display individual statistics underneath feed items<br />(e.g. posted by, date and time, replies, views)',
+ 'ACP_FEED_ITEM_STATISTICS_EXPLAIN' => 'Display individual statistics underneath feed items<br>(e.g. posted by, date and time, replies, views)',
'ACP_FEED_EXCLUDE_ID' => 'Exclude these forums',
- 'ACP_FEED_EXCLUDE_ID_EXPLAIN' => 'Content from these will be <strong>not included in feeds</strong>. Select no forum to pull data from all forums.<br />Select/Deselect multiple forums by holding <samp>CTRL</samp> and clicking.',
+ 'ACP_FEED_EXCLUDE_ID_EXPLAIN' => 'Content from these will be <strong>not included in feeds</strong>. Select no forum to pull data from all forums.<br>Select/Deselect multiple forums by holding <samp>CTRL</samp> and clicking.',
));
// Visual Confirmation Settings
@@ -351,13 +351,13 @@ $lang = array_merge($lang, array(
'ACP_COOKIE_SETTINGS_EXPLAIN' => 'These details define the data used to send cookies to your users browsers. In most cases the default values for the cookie settings should be sufficient. If you do need to change any do so with care, incorrect settings can prevent users logging in. If you have problems with users staying logging in to your board, visit the <b><a href="https://www.phpbb.com/support/go/cookie-settings/">phpBB.com Knowledge Base - Fixing incorrect cookie settings</a></b>.',
'COOKIE_DOMAIN' => 'Cookie domain',
- 'COOKIE_DOMAIN_EXPLAIN' => 'In most cases the cookie domain is optional. Leave it blank if you are unsure.<br /><br /> In the case where you have a board integrated with other software or have multiple domains, then to determine the cookie domain you need to do the following. If you have something like <i>example.com</i> and <i>forums.example.com</i>, or perhaps <i>forums.example.com</i> and <i>blog.example.com</i>. Remove the subdomains until you find the common domain, <i>example.com</i>. Now add a dot in front of the common domain and you would enter .example.com (note the dot at the beginning).',
+ 'COOKIE_DOMAIN_EXPLAIN' => 'In most cases the cookie domain is optional. Leave it blank if you are unsure.<br><br> In the case where you have a board integrated with other software or have multiple domains, then to determine the cookie domain you need to do the following. If you have something like <i>example.com</i> and <i>forums.example.com</i>, or perhaps <i>forums.example.com</i> and <i>blog.example.com</i>. Remove the subdomains until you find the common domain, <i>example.com</i>. Now add a dot in front of the common domain and you would enter .example.com (note the dot at the beginning).',
'COOKIE_NAME' => 'Cookie name',
'COOKIE_NAME_EXPLAIN' => 'This can be anything what you want, make it original. Whenever the cookie settings are changed the name of the cookie should be changed.',
'COOKIE_NOTICE' => 'Cookie notice',
'COOKIE_NOTICE_EXPLAIN' => 'If enabled a cookie notice will be displayed to users when visiting your board. This might be required by law depending on the content of your board and enabled extensions.',
'COOKIE_PATH' => 'Cookie path',
- 'COOKIE_PATH_EXPLAIN' => 'Note that this is always a slash, it does not matter what your board URL is.',
+ 'COOKIE_PATH_EXPLAIN' => 'This will usually be the same as your script path or simply a slash to make the cookie accessible across the site domain.',
'COOKIE_SECURE' => 'Cookie secure',
'COOKIE_SECURE_EXPLAIN' => 'If your server is running via SSL set this to enabled else leave as disabled. Having this enabled and not running via SSL will result in server errors during redirects.',
'ONLINE_LENGTH' => 'View online time span',
@@ -371,7 +371,7 @@ $lang = array_merge($lang, array(
'ACP_CONTACT_SETTINGS_EXPLAIN' => 'Here you can enable and disable the contact page and also add a text that is displayed on the page.',
'CONTACT_US_ENABLE' => 'Enable contact page',
- 'CONTACT_US_ENABLE_EXPLAIN' => 'This page allows users to send emails to board administrators',
+ 'CONTACT_US_ENABLE_EXPLAIN' => 'This page allows users to send emails to board administrators. Please note that board-wide emails option must be enabled as well. You can find this option in General > Client Communication > Email settings.',
'CONTACT_US_INFO' => 'Contact information',
'CONTACT_US_INFO_EXPLAIN' => 'The message is displayed on the contact page',
@@ -430,7 +430,7 @@ $lang = array_merge($lang, array(
'AUTH_METHOD' => 'Select an authentication method',
'AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING' => 'Both the key and secret of each enabled OAuth service provider must be provided. Only one was provided for an OAuth service provider.',
- 'AUTH_PROVIDER_OAUTH_EXPLAIN' => 'Each OAuth provider requires a unique secret and key in order to authenticate with the external server. These should be supplied by the OAuth service when you register your website with them and should be entered exactly as provided to you.<br />Any service that does not have both a key and a secret entered here will not be available for use by the forum users. Also note, that user can still register and login using the DB authentication plug-in.',
+ 'AUTH_PROVIDER_OAUTH_EXPLAIN' => 'Each OAuth provider requires a unique secret and key in order to authenticate with the external server. These should be supplied by the OAuth service when you register your website with them and should be entered exactly as provided to you.<br>Any service that does not have both a key and a secret entered here will not be available for use by the forum users. Also note, that user can still register and login using the DB authentication plug-in.',
'AUTH_PROVIDER_OAUTH_KEY' => 'Key',
'AUTH_PROVIDER_OAUTH_TITLE' => 'OAuth',
'AUTH_PROVIDER_OAUTH_SECRET' => 'Secret',
@@ -446,7 +446,7 @@ $lang = array_merge($lang, array(
'LDAP_NO_EMAIL' => 'The specified email attribute does not exist.',
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
'LDAP_PASSWORD' => 'LDAP password',
- 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding, otherwise fill in the password for the above user. Required for Active Directory Servers.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
+ 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding, otherwise fill in the password for the above user. Required for Active Directory Servers.<br><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'LDAP_PORT' => 'LDAP server port',
'LDAP_PORT_EXPLAIN' => 'Optionally you can specify a port which should be used to connect to the LDAP server instead of the default port 389.',
'LDAP_SERVER' => 'LDAP server name',
@@ -527,7 +527,7 @@ $lang = array_merge($lang, array(
'IP_LOGIN_LIMIT_TIME' => 'IP address login attempt expiration time',
'IP_LOGIN_LIMIT_TIME_EXPLAIN' => 'Login attempts expire after this period.',
'IP_LOGIN_LIMIT_USE_FORWARDED' => 'Limit login attempts by <var>X_FORWARDED_FOR</var> header',
- 'IP_LOGIN_LIMIT_USE_FORWARDED_EXPLAIN' => 'Instead of limiting login attempts by IP address they are limited by <var>X_FORWARDED_FOR</var> values. <br /><em><strong>Warning:</strong> Only enable this if you are operating a proxy server that sets <var>X_FORWARDED_FOR</var> to trustworthy values.</em>',
+ 'IP_LOGIN_LIMIT_USE_FORWARDED_EXPLAIN' => 'Instead of limiting login attempts by IP address they are limited by <var>X_FORWARDED_FOR</var> values. <br><em><strong>Warning:</strong> Only enable this if you are operating a proxy server that sets <var>X_FORWARDED_FOR</var> to trustworthy values.</em>',
'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts per username',
'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'The number of login attempts allowed for a single account before the anti-spambot task is triggered. Enter 0 to prevent the anti-spambot task from being triggered for distinct user accounts.',
'NO_IP_VALIDATION' => 'None',
@@ -552,8 +552,8 @@ $lang = array_merge($lang, array(
$lang = array_merge($lang, array(
'ACP_EMAIL_SETTINGS_EXPLAIN' => 'This information is used when the board sends emails to your users. Please ensure the email address you specify is valid, any bounced or undeliverable messages will likely be sent to that address. If your host does not provide a native (PHP based) email service you can instead send messages directly using SMTP. This requires the address of an appropriate server (ask your provider if necessary). If the server requires authentication (and only if it does) enter the necessary username, password and authentication method.',
- 'ADMIN_EMAIL' => 'Return email address',
- 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the return address on all emails, the technical contact email address. It will always be used as the <samp>Return-Path</samp> and <samp>Sender</samp> address in emails.',
+ 'ADMIN_EMAIL' => 'From email address',
+ 'ADMIN_EMAIL_EXPLAIN' => 'This will be used as the from address on all emails, the technical contact email address. It will always be used as the <samp>Sender</samp> address in emails.',
'BOARD_EMAIL_FORM' => 'Users send email via board',
'BOARD_EMAIL_FORM_EXPLAIN' => 'Instead of showing the users email address users are able to send emails via the board.',
'BOARD_HIDE_EMAILS' => 'Hide email addresses',
@@ -562,8 +562,8 @@ $lang = array_merge($lang, array(
'CONTACT_EMAIL_EXPLAIN' => 'This address will be used whenever a specific contact point is needed, e.g. spam, error output, etc. It will always be used as the <samp>From</samp> and <samp>Reply-To</samp> address in emails.',
'CONTACT_EMAIL_NAME' => 'Contact name',
'CONTACT_EMAIL_NAME_EXPLAIN' => 'This is the contact name that e-mail recipients will see. If you don’t want to have a contact name, leave this field empty.',
- 'EMAIL_FUNCTION_NAME' => 'Email function name',
- 'EMAIL_FUNCTION_NAME_EXPLAIN' => 'The email function used to send mails through PHP.',
+ 'EMAIL_FORCE_SENDER' => 'Force from email address',
+ 'EMAIL_FORCE_SENDER_EXPLAIN' => 'This will set the <samp>Return-Path</samp> to the from email address instead of using the local user and hostname of the server. This setting does not apply when using SMTP.<br><em><strong>Warning:</strong> Requires the user that the webserver runs as to be added as trusted user to the sendmail configuration.</em>',
'EMAIL_PACKAGE_SIZE' => 'Email package size',
'EMAIL_PACKAGE_SIZE_EXPLAIN' => 'This is the number of maximum emails sent out in one package. This setting is applied to the internal message queue; set this value to 0 if you have problems with non-delivered notification emails.',
'EMAIL_SIG' => 'Email signature',
@@ -573,14 +573,14 @@ $lang = array_merge($lang, array(
'SEND_TEST_EMAIL' => 'Send a test email',
'SEND_TEST_EMAIL_EXPLAIN' => 'This will send a test email to the address defined in your account.',
'SMTP_ALLOW_SELF_SIGNED' => 'Allow self-signed SSL certificates',
- 'SMTP_ALLOW_SELF_SIGNED_EXPLAIN'=> 'Allow connections to SMTP server with self-signed SSL certificate.<em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
+ 'SMTP_ALLOW_SELF_SIGNED_EXPLAIN'=> 'Allow connections to SMTP server with self-signed SSL certificate. <br><em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
'SMTP_AUTH_METHOD' => 'Authentication method for SMTP',
'SMTP_AUTH_METHOD_EXPLAIN' => 'Only used if a username/password is set, ask your provider if you are unsure which method to use.',
'SMTP_CRAM_MD5' => 'CRAM-MD5',
'SMTP_DIGEST_MD5' => 'DIGEST-MD5',
'SMTP_LOGIN' => 'LOGIN',
'SMTP_PASSWORD' => 'SMTP password',
- 'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
+ 'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.<br><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'SMTP_PLAIN' => 'PLAIN',
'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
'SMTP_PORT' => 'SMTP server port',
@@ -591,10 +591,10 @@ $lang = array_merge($lang, array(
'SMTP_USERNAME' => 'SMTP username',
'SMTP_USERNAME_EXPLAIN' => 'Only enter a username if your SMTP server requires it.',
'SMTP_VERIFY_PEER' => 'Verify SSL certificate',
- 'SMTP_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by SMTP server.<em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
+ 'SMTP_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by SMTP server. <br><em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
'SMTP_VERIFY_PEER_NAME' => 'Verify SMTP peer name',
- 'SMTP_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for SMTP servers using SSL / TLS connections.<em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
- 'TEST_EMAIL_SENT' => 'The test email has been sent.<br />If you don’t receive it, please check your emails configuration.<br /><br />If you require assistance, please visit the <a href="https://www.phpbb.com/community/">phpBB support forums</a>.',
+ 'SMTP_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for SMTP servers using SSL / TLS connections. <br><em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
+ 'TEST_EMAIL_SENT' => 'The test email has been sent.<br>If you don’t receive it, please check your emails configuration.<br><br>If you require assistance, please visit the <a href="https://www.phpbb.com/community/">phpBB support forums</a>.',
'USE_SMTP' => 'Use SMTP server for email',
'USE_SMTP_EXPLAIN' => 'Select “Yes” if you want or have to send email via a named server instead of the local mail function.',
@@ -605,7 +605,7 @@ $lang = array_merge($lang, array(
'ACP_JABBER_SETTINGS_EXPLAIN' => 'Here you can enable and control the use of Jabber for instant messaging and board notifications. Jabber is an open source protocol and therefore available for use by anyone. Some Jabber servers include gateways or transports which allow you to contact users on other networks. Not all servers offer all transports and changes in protocols can prevent transports from operating. Please be sure to enter already registered account details - phpBB will use the details you enter here as is.',
'JAB_ALLOW_SELF_SIGNED' => 'Allow self-signed SSL certificates',
- 'JAB_ALLOW_SELF_SIGNED_EXPLAIN' => 'Allow connections to Jabber server with self-signed SSL certificate.<em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
+ 'JAB_ALLOW_SELF_SIGNED_EXPLAIN' => 'Allow connections to Jabber server with self-signed SSL certificate. <br><em><strong>Warning:</strong> Allowing self-signed SSL certificates may cause security implications.</em>',
'JAB_ENABLE' => 'Enable Jabber',
'JAB_ENABLE_EXPLAIN' => 'Enables use of Jabber messaging and notifications.',
'JAB_GTALK_NOTE' => 'Please note that GTalk will not work because the <samp>dns_get_record</samp> function could not be found. This function is not available in PHP4, and is not implemented on Windows platforms. It currently does not work on BSD-based systems, including Mac OS.',
@@ -623,7 +623,7 @@ $lang = array_merge($lang, array(
'JAB_USERNAME' => 'Jabber username or JID',
'JAB_USERNAME_EXPLAIN' => 'Specify a registered username or a valid JID. The username will not be checked for validity. If you only specify a username, then your JID will be the username and the server you specified above. Else, specify a valid JID, for example user@jabber.org.',
'JAB_VERIFY_PEER' => 'Verify SSL certificate',
- 'JAB_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by Jabber server.<em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
+ 'JAB_VERIFY_PEER_EXPLAIN' => 'Require verification of SSL certificate used by Jabber server. <br><em><strong>Warning:</strong> Connecting peers with unverified SSL certificates may cause security implications.</em>',
'JAB_VERIFY_PEER_NAME' => 'Verify Jabber peer name',
- 'JAB_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for Jabber servers using SSL / TLS connections.<em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
+ 'JAB_VERIFY_PEER_NAME_EXPLAIN' => 'Require verification of peer name for Jabber servers using SSL / TLS connections. <br><em><strong>Warning:</strong> Connecting to unverified peers may cause security implications.</em>',
));
diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php
index f986eced38..64740b311b 100644
--- a/phpBB/language/en/acp/permissions_phpbb.php
+++ b/phpBB/language/en/acp/permissions_phpbb.php
@@ -107,6 +107,7 @@ $lang = array_merge($lang, array(
// Forum Permissions
$lang = array_merge($lang, array(
'ACL_F_LIST' => 'Can see forum',
+ 'ACL_F_LIST_TOPICS' => 'Can see topics',
'ACL_F_READ' => 'Can read forum',
'ACL_F_SEARCH' => 'Can search the forum',
'ACL_F_SUBSCRIBE' => 'Can subscribe forum',
diff --git a/phpBB/language/en/cli.php b/phpBB/language/en/cli.php
index 1655855edb..505d12e8ff 100644
--- a/phpBB/language/en/cli.php
+++ b/phpBB/language/en/cli.php
@@ -117,6 +117,7 @@ $lang = array_merge($lang, array(
'CLI_EXTENSION_ENABLE_FAILURE' => 'Could not enable extension %s',
'CLI_EXTENSION_ENABLE_SUCCESS' => 'Successfully enabled extension %s',
'CLI_EXTENSION_ENABLED' => 'Extension %s is already enabled',
+ 'CLI_EXTENSION_NOT_EXIST' => 'Extension %s does not exist',
'CLI_EXTENSION_NAME' => 'Name of the extension',
'CLI_EXTENSION_PURGE_FAILURE' => 'Could not purge extension %s',
'CLI_EXTENSION_PURGE_SUCCESS' => 'Successfully purged extension %s',
diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php
index 9946a3eda4..cab205ddf9 100644
--- a/phpBB/language/en/viewforum.php
+++ b/phpBB/language/en/viewforum.php
@@ -53,7 +53,7 @@ $lang = array_merge($lang, array(
'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', // Not used anymore
'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]', // Not used anymore
'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]', // Not used anymore
- 'NO_READ_ACCESS' => 'You do not have the required permissions to read topics within this forum.',
+ 'NO_READ_ACCESS' => 'You do not have the required permissions to view or read topics within this forum.',
'NO_UNREAD_POSTS_HOT' => 'No unread posts [ Popular ]',
'NO_UNREAD_POSTS_LOCKED' => 'No unread posts [ Locked ]',
diff --git a/phpBB/phpbb/cache/driver/memcached.php b/phpBB/phpbb/cache/driver/memcached.php
index 808e15afe8..7d66759ec2 100644
--- a/phpBB/phpbb/cache/driver/memcached.php
+++ b/phpBB/phpbb/cache/driver/memcached.php
@@ -65,7 +65,7 @@ class memcached extends \phpbb\cache\driver\memory
$this->memcached->setOption(\Memcached::OPT_COMPRESSION, false);
}
- foreach (explode(',', PHPBB_ACM_MEMCACHE) as $u)
+ foreach (explode(',', PHPBB_ACM_MEMCACHED) as $u)
{
preg_match('#(.*)/(\d+)#', $u, $parts);
$this->memcached->addServer(trim($parts[1]), (int) trim($parts[2]));
diff --git a/phpBB/phpbb/console/command/extension/enable.php b/phpBB/phpbb/console/command/extension/enable.php
index f92de0069c..a6f5b10e86 100644
--- a/phpBB/phpbb/console/command/extension/enable.php
+++ b/phpBB/phpbb/console/command/extension/enable.php
@@ -37,6 +37,13 @@ class enable extends command
$io = new SymfonyStyle($input, $output);
$name = $input->getArgument('extension-name');
+
+ if (!$this->manager->is_available($name))
+ {
+ $io->error($this->user->lang('CLI_EXTENSION_NOT_EXIST', $name));
+ return 1;
+ }
+
$extension = $this->manager->get_extension($name);
if (!$extension->is_enableable())
diff --git a/phpBB/phpbb/console/exception_subscriber.php b/phpBB/phpbb/console/exception_subscriber.php
index b920d4abae..b240993203 100644
--- a/phpBB/phpbb/console/exception_subscriber.php
+++ b/phpBB/phpbb/console/exception_subscriber.php
@@ -29,12 +29,10 @@ class exception_subscriber implements EventSubscriberInterface
* Construct method
*
* @param \phpbb\language\language $language Language object
- * @param bool $debug Debug mode
*/
- public function __construct(\phpbb\language\language $language, $debug = false)
+ public function __construct(\phpbb\language\language $language)
{
$this->language = $language;
- $this->debug = $debug;
}
/**
@@ -52,14 +50,7 @@ class exception_subscriber implements EventSubscriberInterface
$parameters = array_merge(array($original_exception->getMessage()), $original_exception->get_parameters());
$message = call_user_func_array(array($this->language, 'lang'), $parameters);
- if ($this->debug)
- {
- $exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception);
- }
- else
- {
- $exception = new \RuntimeException($message , $original_exception->getCode());
- }
+ $exception = new \RuntimeException($message , $original_exception->getCode(), $original_exception);
$event->setException($exception);
}
diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php
index bf7dc2c703..237300894b 100644
--- a/phpBB/phpbb/content_visibility.php
+++ b/phpBB/phpbb/content_visibility.php
@@ -131,6 +131,42 @@ class content_visibility
return (int) $data[$mode . '_approved'] + (int) $data[$mode . '_unapproved'] + (int) $data[$mode . '_softdeleted'];
}
+
+ /**
+ * Check topic/post visibility for a given forum ID
+ *
+ * Note: Read permissions are not checked.
+ *
+ * @param $mode string Either "topic" or "post"
+ * @param $forum_id int The forum id is used for permission checks
+ * @param $data array Array with item information to check visibility
+ * @return bool True if the item is visible, false if not
+ */
+ public function is_visible($mode, $forum_id, $data)
+ {
+ $is_visible = $this->auth->acl_get('m_approve', $forum_id) || $data[$mode . '_visibility'] == ITEM_APPROVED;
+
+ /**
+ * Allow changing the result of calling is_visible
+ *
+ * @event core.phpbb_content_visibility_is_visible
+ * @var bool is_visible Default visibility condition, to be modified by extensions if needed.
+ * @var string mode Either "topic" or "post"
+ * @var int forum_id Forum id of the current item
+ * @var array data Array of item information
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'is_visible',
+ 'mode',
+ 'forum_id',
+ 'data',
+ );
+ extract($this->phpbb_dispatcher->trigger_event('core.phpbb_content_visibility_is_visible', compact($vars)));
+
+ return $is_visible;
+ }
+
/**
* Create topic/post visibility SQL for a given forum ID
*
@@ -176,10 +212,14 @@ class content_visibility
if ($this->auth->acl_get('m_approve', $forum_id))
{
- return $where_sql . '1 = 1';
+ $where_sql .= '1 = 1';
+ }
+ else
+ {
+ $where_sql .= $table_alias . $mode . '_visibility = ' . ITEM_APPROVED;
}
- return $where_sql . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED;
+ return '(' . $where_sql . ')';
}
/**
@@ -195,16 +235,21 @@ class content_visibility
*/
public function get_forums_visibility_sql($mode, $forum_ids = array(), $table_alias = '')
{
- $where_sql = '(';
+ $where_sql = '';
- $approve_forums = array_intersect($forum_ids, array_keys($this->auth->acl_getf('m_approve', true)));
+ $approve_forums = array_keys($this->auth->acl_getf('m_approve', true));
+ if (!empty($forum_ids) && !empty($approve_forums))
+ {
+ $approve_forums = array_intersect($forum_ids, $approve_forums);
+ $forum_ids = array_diff($forum_ids, $approve_forums);
+ }
$get_forums_visibility_sql_overwrite = false;
/**
* Allow changing the result of calling get_forums_visibility_sql
*
* @event core.phpbb_content_visibility_get_forums_visibility_before
- * @var string where_sql The action the user tried to execute
+ * @var string where_sql Extra visibility conditions. It must end with either an SQL "AND" or an "OR"
* @var string mode Either "topic" or "post" depending on the query this is being used in
* @var array forum_ids Array of forum ids which the posts/topics are limited to
* @var string table_alias Table alias to prefix in SQL queries
@@ -229,33 +274,13 @@ class content_visibility
return $get_forums_visibility_sql_overwrite;
}
- if (sizeof($approve_forums))
- {
- // Remove moderator forums from the rest
- $forum_ids = array_diff($forum_ids, $approve_forums);
-
- if (!sizeof($forum_ids))
- {
- // The user can see all posts/topics in all specified forums
- return $where_sql . $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums) . ')';
- }
- else
- {
- // Moderator can view all posts/topics in some forums
- $where_sql .= $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums) . ' OR ';
- }
- }
- else
- {
- // The user is just a normal user
- return $where_sql . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
- AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true) . ')';
- }
-
+ // Moderator can view all posts/topics in the moderated forums
+ $where_sql .= '(' . $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums, false, true) . ' OR ';
+ // Normal user can view approved items only
$where_sql .= '(' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . '
- AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids) . '))';
+ AND ' . $this->db->sql_in_set($table_alias . 'forum_id', $forum_ids, false, true) . '))';
- return $where_sql;
+ return '(' . $where_sql . ')';
}
/**
@@ -281,12 +306,12 @@ class content_visibility
* Allow changing the result of calling get_global_visibility_sql
*
* @event core.phpbb_content_visibility_get_global_visibility_before
- * @var array where_sqls The action the user tried to execute
+ * @var array where_sqls Array of extra visibility conditions. Will be joined by imploding with "OR".
* @var string mode Either "topic" or "post" depending on the query this is being used in
* @var array exclude_forum_ids Array of forum ids the current user doesn't have access to
* @var string table_alias Table alias to prefix in SQL queries
* @var array approve_forums Array of forums where the user has m_approve permissions
- * @var string visibility_sql_overwrite Forces the function to return an implosion of where_sqls (joined by "OR")
+ * @var string visibility_sql_overwrite If not empty, forces the function to return visibility_sql_overwrite after executing the event
* @since 3.1.3-RC1
*/
$vars = array(
@@ -304,24 +329,17 @@ class content_visibility
return $visibility_sql_overwrite;
}
- if (sizeof($exclude_forum_ids))
- {
- $where_sqls[] = '(' . $this->db->sql_in_set($table_alias . 'forum_id', $exclude_forum_ids, true) . '
- AND ' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ')';
- }
- else
- {
- $where_sqls[] = $table_alias . $mode . '_visibility = ' . ITEM_APPROVED;
- }
+ // Include approved items in all forums but the excluded
+ $where_sqls[] = '(' . $this->db->sql_in_set($table_alias . 'forum_id', $exclude_forum_ids, true, true) . '
+ AND ' . $table_alias . $mode . '_visibility = ' . ITEM_APPROVED . ')';
+ // If user has moderator permissions, add everything in the moderated forums
if (sizeof($approve_forums))
{
$where_sqls[] = $this->db->sql_in_set($table_alias . 'forum_id', $approve_forums);
- return '(' . implode(' OR ', $where_sqls) . ')';
}
- // There is only one element, so we just return that one
- return $where_sqls[0];
+ return '(' . implode(' OR ', $where_sqls) . ')';
}
/**
@@ -437,12 +455,13 @@ class content_visibility
* @var int topic_id Topic of the post IDs to be modified.
* @var int forum_id Forum ID that the topic_id resides in.
* @var int user_id User ID doing this action.
- * @var int timestamp Timestamp of this action.
+ * @var int time Timestamp of this action.
* @var string reason Reason specified by the user for this change.
* @var bool is_starter Are we changing the topic's starter?
* @var bool is_latest Are we changing the topic's latest post?
* @var array data The data array for this action.
* @since 3.1.10-RC1
+ * @changed 3.2.2-RC1 Use time instead of non-existent timestamp
*/
$vars = array(
'visibility',
@@ -450,7 +469,7 @@ class content_visibility
'topic_id',
'forum_id',
'user_id',
- 'timestamp',
+ 'time',
'reason',
'is_starter',
'is_latest',
@@ -622,12 +641,13 @@ class content_visibility
* @var int topic_id Topic of the post IDs to be modified.
* @var int forum_id Forum ID that the topic_id resides in.
* @var int user_id User ID doing this action.
- * @var int timestamp Timestamp of this action.
+ * @var int time Timestamp of this action.
* @var string reason Reason specified by the user for this change.
* @var bool is_starter Are we changing the topic's starter?
* @var bool is_latest Are we changing the topic's latest post?
* @var array data The data array for this action.
* @since 3.1.10-RC1
+ * @changed 3.2.2-RC1 Use time instead of non-existent timestamp
*/
$vars = array(
'visibility',
@@ -635,7 +655,7 @@ class content_visibility
'topic_id',
'forum_id',
'user_id',
- 'timestamp',
+ 'time',
'reason',
'is_starter',
'is_latest',
@@ -709,18 +729,19 @@ class content_visibility
* @var int topic_id Topic of the post IDs to be modified.
* @var int forum_id Forum ID that the topic_id resides in.
* @var int user_id User ID doing this action.
- * @var int timestamp Timestamp of this action.
+ * @var int time Timestamp of this action.
* @var string reason Reason specified by the user for this change.
* @var bool force_update_all Force an update on all posts within the topic, regardless of their current approval state.
* @var array data The data array for this action.
* @since 3.1.10-RC1
+ * @changed 3.2.2-RC1 Use time instead of non-existent timestamp
*/
$vars = array(
'visibility',
'topic_id',
'forum_id',
'user_id',
- 'timestamp',
+ 'time',
'reason',
'force_update_all',
'data',
@@ -758,18 +779,19 @@ class content_visibility
* @var int topic_id Topic of the post IDs to be modified.
* @var int forum_id Forum ID that the topic_id resides in.
* @var int user_id User ID doing this action.
- * @var int timestamp Timestamp of this action.
+ * @var int time Timestamp of this action.
* @var string reason Reason specified by the user for this change.
* @var bool force_update_all Force an update on all posts within the topic, regardless of their current approval state.
* @var array data The data array for this action.
* @since 3.1.10-RC1
+ * @changed 3.2.2-RC1 Use time instead of non-existent timestamp
*/
$vars = array(
'visibility',
'topic_id',
'forum_id',
'user_id',
- 'timestamp',
+ 'time',
'reason',
'force_update_all',
'data',
diff --git a/phpBB/phpbb/datetime.php b/phpBB/phpbb/datetime.php
index 63cdba90fd..4b799b6219 100644
--- a/phpBB/phpbb/datetime.php
+++ b/phpBB/phpbb/datetime.php
@@ -60,6 +60,12 @@ class datetime extends \DateTime
public function format($format = '', $force_absolute = false)
{
$format = $format ? $format : $this->user->date_format;
+
+ if (substr($this->user->lang_name, 0,2) != 'en')
+ {
+ $format = preg_replace('/([^\\\])S/','$1', $format);
+ }
+
$format = self::format_cache($format, $this->user);
$relative = ($format['is_short'] && !$force_absolute);
$now = new self($this->user, 'now', $this->user->timezone);
diff --git a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
index 2c7b7edf2e..f50ab33830 100644
--- a/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
+++ b/phpBB/phpbb/db/migration/data/v310/style_update_p1.php
@@ -160,12 +160,12 @@ class style_update_p1 extends \phpbb\db\migration\migration
FROM ' . STYLES_TABLE . "
WHERE style_name = 'prosilver'";
$result = $this->sql_query($sql);
- $default_style = $this->db->sql_fetchfield('style_id');
+ $default_style = (int) $this->db->sql_fetchfield('style_id');
$this->db->sql_freeresult($result);
$this->config->set('default_style', $default_style);
- $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = 0';
+ $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . (int) $default_style;
$this->sql_query($sql);
}
else
@@ -183,9 +183,9 @@ class style_update_p1 extends \phpbb\db\migration\migration
}
// Reset styles for users
- $this->sql_query('UPDATE ' . USERS_TABLE . '
- SET user_style = 0
- WHERE ' . $this->db->sql_in_set('user_style', $valid_styles, true));
+ $this->sql_query('UPDATE ' . USERS_TABLE . "
+ SET user_style = '" . (int) $valid_styles[0] . "'
+ WHERE " . $this->db->sql_in_set('user_style', $valid_styles, true));
}
}
}
diff --git a/phpBB/phpbb/db/migration/data/v32x/email_force_sender.php b/phpBB/phpbb/db/migration/data/v32x/email_force_sender.php
new file mode 100644
index 0000000000..5319b7f76e
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/email_force_sender.php
@@ -0,0 +1,37 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v32x;
+
+class email_force_sender extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v321',
+ );
+ }
+
+ public function effectively_installed()
+ {
+ return isset($this->config['email_force_sender']);
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.add', array('email_force_sender', '0')),
+ array('config.remove', array('email_function_name')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php
new file mode 100644
index 0000000000..49727e5a62
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/f_list_topics_permission_add.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\db\migration\data\v32x;
+
+class f_list_topics_permission_add extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v321',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('permission.add', array('f_list_topics', false, 'f_read')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/fix_user_styles.php b/phpBB/phpbb/db/migration/data/v32x/fix_user_styles.php
new file mode 100644
index 0000000000..282c6bef2f
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/fix_user_styles.php
@@ -0,0 +1,50 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v32x;
+
+class fix_user_styles extends \phpbb\db\migration\migration
+{
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v320\v320',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'styles_fix'))),
+ );
+ }
+
+ public function styles_fix()
+ {
+ $default_style = (int) $this->config['default_style'];
+
+ // Get enabled styles
+ $sql = 'SELECT style_id
+ FROM ' . STYLES_TABLE . '
+ WHERE style_active = 1';
+ $result = $this->db->sql_query($sql);
+ $enabled_styles = $result->fetch_array();
+ $this->db->sql_freeresult($result);
+
+ // Set the default style to users who have an invalid style
+ $this->sql_query('UPDATE ' . USERS_TABLE . '
+ SET user_style = ' . (int) $default_style . '
+ WHERE ' . $this->db->sql_in_set('user_style', $enabled_styles, true));
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php b/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php
new file mode 100644
index 0000000000..3bf442bab5
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/merge_duplicate_bbcodes.php
@@ -0,0 +1,75 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v32x;
+
+class merge_duplicate_bbcodes extends \phpbb\db\migration\migration
+{
+ public function update_data()
+ {
+ return [
+ ['custom', [[$this, 'update_bbcodes_table']]],
+ ];
+ }
+
+ public function update_bbcodes_table()
+ {
+ $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline, bbcode_match, bbcode_tpl FROM ' . BBCODES_TABLE;
+ $result = $this->sql_query($sql);
+ $bbcodes = [];
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $variant = (substr($row['bbcode_tag'], -1) === '=') ? 'with': 'without';
+ $bbcode_name = rtrim($row['bbcode_tag'], '=');
+ $bbcodes[$bbcode_name][$variant] = $row;
+ }
+ $this->db->sql_freeresult($result);
+
+ foreach ($bbcodes as $bbcode_name => $variants)
+ {
+ if (count($variants) === 2)
+ {
+ $this->merge_bbcodes($variants['without'], $variants['with']);
+ }
+ }
+ }
+
+ protected function merge_bbcodes(array $without, array $with)
+ {
+ $merged = $this->container->get('text_formatter.s9e.bbcode_merger')->merge_bbcodes(
+ [
+ 'usage' => $without['bbcode_match'],
+ 'template' => $without['bbcode_tpl']
+ ],
+ [
+ 'usage' => $with['bbcode_match'],
+ 'template' => $with['bbcode_tpl']
+ ]
+ );
+ $bbcode_data = [
+ 'bbcode_tag' => $without['bbcode_tag'],
+ 'bbcode_helpline' => $without['bbcode_helpline'] . ' | ' . $with['bbcode_helpline'],
+ 'bbcode_match' => $merged['usage'],
+ 'bbcode_tpl' => $merged['template']
+ ];
+
+ $sql = 'UPDATE ' . BBCODES_TABLE . '
+ SET ' . $this->db->sql_build_array('UPDATE', $bbcode_data) . '
+ WHERE bbcode_id = ' . $without['bbcode_id'];
+ $this->sql_query($sql);
+
+ $sql = 'DELETE FROM ' . BBCODES_TABLE . '
+ WHERE bbcode_id = ' . $with['bbcode_id'];
+ $this->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php b/phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php
new file mode 100644
index 0000000000..6e51a01834
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v32x/update_prosilver_bitfield.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\db\migration\data\v32x;
+
+class update_prosilver_bitfield extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v32x\v321',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_bbcode_bitfield'))),
+ );
+ }
+
+ public function update_bbcode_bitfield()
+ {
+ $sql = 'UPDATE ' . STYLES_TABLE . "
+ SET bbcode_bitfield = '//g='
+ WHERE style_path = 'prosilver'";
+ $this->sql_query($sql);
+ }
+}
diff --git a/phpBB/phpbb/db/migrator.php b/phpBB/phpbb/db/migrator.php
index d7d7f18d2b..6c026c3ae1 100644
--- a/phpBB/phpbb/db/migrator.php
+++ b/phpBB/phpbb/db/migrator.php
@@ -503,11 +503,14 @@ class migrator
return;
}
- foreach ($this->migration_state as $name => $state)
+ foreach ($this->migrations as $name)
{
- if (!empty($state['migration_depends_on']) && in_array($migration, $state['migration_depends_on']))
+ $state = $this->migration_state($name);
+
+ if ($state && in_array($migration, $state['migration_depends_on']) && ($state['migration_schema_done'] || $state['migration_data_done']))
{
$this->revert_do($name);
+ return;
}
}
diff --git a/phpBB/phpbb/event/dispatcher.php b/phpBB/phpbb/event/dispatcher.php
index 1c4abeb108..1ba2ab8987 100644
--- a/phpBB/phpbb/event/dispatcher.php
+++ b/phpBB/phpbb/event/dispatcher.php
@@ -57,7 +57,12 @@ class dispatcher extends ContainerAwareEventDispatcher implements dispatcher_int
return $event;
}
- return parent::dispatch($eventName, $event);
+ foreach ((array) $eventName as $name)
+ {
+ $event = parent::dispatch($name, $event);
+ }
+
+ return $event;
}
/**
diff --git a/phpBB/phpbb/event/php_exporter.php b/phpBB/phpbb/event/php_exporter.php
index 26d7e2b426..7b80863305 100644
--- a/phpBB/phpbb/event/php_exporter.php
+++ b/phpBB/phpbb/event/php_exporter.php
@@ -196,13 +196,13 @@ class php_exporter
$content = file_get_contents($this->path . $this->current_file);
$num_events_found = 0;
- if (strpos($content, "dispatcher->trigger_event('") || strpos($content, "dispatcher->dispatch('"))
+ if (strpos($content, 'dispatcher->trigger_event(') || strpos($content, 'dispatcher->dispatch('))
{
$this->set_content(explode("\n", $content));
for ($i = 0, $num_lines = sizeof($this->file_lines); $i < $num_lines; $i++)
{
$event_line = false;
- $found_trigger_event = strpos($this->file_lines[$i], "dispatcher->trigger_event('");
+ $found_trigger_event = strpos($this->file_lines[$i], 'dispatcher->trigger_event(');
$arguments = array();
if ($found_trigger_event !== false)
{
@@ -216,7 +216,7 @@ class php_exporter
}
else
{
- $found_dispatch = strpos($this->file_lines[$i], "dispatcher->dispatch('");
+ $found_dispatch = strpos($this->file_lines[$i], 'dispatcher->dispatch(');
if ($found_dispatch !== false)
{
$event_line = $i;
@@ -316,17 +316,17 @@ class php_exporter
if ($is_dispatch)
{
- $regex = '#\$([a-z](?:[a-z0-9_]|->)*)';
- $regex .= '->dispatch\(';
- $regex .= '\'' . $this->preg_match_event_name() . '\'';
- $regex .= '\);#';
+ $regex = '#\$[a-z](?:[a-z0-9_]|->)*';
+ $regex .= '->dispatch\((\[)?';
+ $regex .= '\'' . $this->preg_match_event_name() . '(?(1)\', \'(?2))+\'';
+ $regex .= '(?(1)\])\);#';
}
else
{
- $regex = '#extract\(\$([a-z](?:[a-z0-9_]|->)*)';
- $regex .= '->trigger_event\(';
- $regex .= '\'' . $this->preg_match_event_name() . '\'';
- $regex .= ', compact\(\$vars\)\)\);#';
+ $regex = '#extract\(\$[a-z](?:[a-z0-9_]|->)*';
+ $regex .= '->trigger_event\((\[)?';
+ $regex .= '\'' . $this->preg_match_event_name() . '(?(1)\', \'(?2))+\'';
+ $regex .= '(?(1)\]), compact\(\$vars\)\)\);#';
}
$match = array();
@@ -359,7 +359,7 @@ class php_exporter
public function get_vars_from_array()
{
$line = ltrim($this->file_lines[$this->current_event_line - 1], "\t");
- if ($line === ');')
+ if ($line === ');' || $line === '];')
{
$vars_array = $this->get_vars_from_multi_line_array();
}
@@ -370,7 +370,7 @@ class php_exporter
foreach ($vars_array as $var)
{
- if (!preg_match('#^([a-zA-Z_][a-zA-Z0-9_]*)$#', $var))
+ if (!preg_match('#^[a-z_][a-z0-9_]*$#i', $var))
{
throw new \LogicException("Found invalid var '{$var}' in array for event '{$this->current_event}' in file '{$this->current_file}:{$this->current_event_line}'", 3);
}
@@ -392,11 +392,11 @@ class php_exporter
public function get_vars_from_single_line_array($line, $throw_multiline = true)
{
$match = array();
- preg_match('#^\$vars = (?:\[|array\()\'([a-zA-Z0-9_\' ,]+)\'[\)\]];$#', $line, $match);
+ preg_match('#^\$vars = (?:(\[)|array\()\'([a-z0-9_\' ,]+)\'(?(1)\]|\));$#i', $line, $match);
- if (isset($match[1]))
+ if (isset($match[2]))
{
- $vars_array = explode("', '", $match[1]);
+ $vars_array = explode("', '", $match[2]);
if ($throw_multiline && sizeof($vars_array) > 6)
{
throw new \LogicException('Should use multiple lines for $vars definition '
@@ -420,7 +420,7 @@ class php_exporter
{
$current_vars_line = 2;
$var_lines = array();
- while (ltrim($this->file_lines[$this->current_event_line - $current_vars_line], "\t") !== '$vars = array(')
+ while (!in_array(ltrim($this->file_lines[$this->current_event_line - $current_vars_line], "\t"), ['$vars = array(', '$vars = [']))
{
$var_lines[] = substr(trim($this->file_lines[$this->current_event_line - $current_vars_line]), 0, -1);
@@ -485,7 +485,7 @@ class php_exporter
foreach ($doc_vars as $var)
{
- if (!preg_match('#^([a-zA-Z_][a-zA-Z0-9_]*)$#', $var))
+ if (!preg_match('#^[a-z_][a-z0-9_]*$#i', $var))
{
throw new \LogicException("Found invalid @var '{$var}' in docblock for event "
. "'{$this->current_event}' in file '{$this->current_file}:{$this->current_event_line}'", 4);
diff --git a/phpBB/phpbb/feed/helper.php b/phpBB/phpbb/feed/helper.php
index e15d1e131e..7d50b7ce7d 100644
--- a/phpBB/phpbb/feed/helper.php
+++ b/phpBB/phpbb/feed/helper.php
@@ -13,41 +13,52 @@
namespace phpbb\feed;
+use phpbb\config\config;
+use phpbb\path_helper;
+use phpbb\textformatter\s9e\renderer;
+use phpbb\user;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
/**
* Class with some helpful functions used in feeds
*/
class helper
{
- /** @var \phpbb\config\config */
+ /** @var config */
protected $config;
- /** @var \phpbb\user */
- protected $user;
+ /** @var ContainerInterface */
+ protected $container;
- /** @var string */
- protected $phpbb_root_path;
+ /** @var path_helper */
+ protected $path_helper;
- /** @var string */
- protected $phpEx;
+ /** @var renderer */
+ protected $renderer;
+
+ /** @var user */
+ protected $user;
/**
* Constructor
*
- * @param \phpbb\config\config $config Config object
- * @param \phpbb\user $user User object
- * @param string $phpbb_root_path Root path
- * @param string $phpEx PHP file extension
+ * @param config $config Config object
+ * @param ContainerInterface $container Service container object
+ * @param path_helper $path_helper Path helper object
+ * @param renderer $renderer TextFormatter renderer object
+ * @param user $user User object
*/
- public function __construct(\phpbb\config\config $config, \phpbb\user $user, $phpbb_root_path, $phpEx)
+ public function __construct(config $config, ContainerInterface $container, path_helper $path_helper, renderer $renderer, user $user)
{
$this->config = $config;
+ $this->container = $container;
+ $this->path_helper = $path_helper;
+ $this->renderer = $renderer;
$this->user = $user;
- $this->phpbb_root_path = $phpbb_root_path;
- $this->phpEx = $phpEx;
}
/**
- * Run links through append_sid(), prepend generate_board_url() and remove session id
+ * Returns the board url (and caches it in the function)
*/
public function get_board_url()
{
@@ -104,16 +115,12 @@ class helper
return '';
}
- // Prepare some bbcodes for better parsing
- $content = preg_replace("#\[quote(=&quot;.*?&quot;)?:$uid\]\s*(.*?)\s*\[/quote:$uid\]#si", "[quote$1:$uid]<br />$2<br />[/quote:$uid]", $content);
-
- $content = generate_text_for_display($content, $uid, $bitfield, $options);
+ // Setup our own quote_helper to remove all attributes from quotes
+ $this->renderer->configure_quote_helper($this->container->get('feed.quote_helper'));
- // Add newlines
- $content = str_replace('<br />', '<br />' . "\n", $content);
+ $this->renderer->set_smilies_path($this->get_board_url() . '/' . $this->config['smilies_path']);
- // Convert smiley Relative paths to Absolute path, Windows style
- $content = str_replace($this->phpbb_root_path . $this->config['smilies_path'], $this->get_board_url() . '/' . $this->config['smilies_path'], $content);
+ $content = generate_text_for_display($content, $uid, $bitfield, $options);
// Remove "Select all" link and mouse events
$content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $this->user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
@@ -152,7 +159,7 @@ class helper
$content .= implode('<br />', $post_attachments);
// Convert attachments' relative path to absolute path
- $content = str_replace($this->phpbb_root_path . 'download/file.' . $this->phpEx, $this->get_board_url() . '/download/file.' . $this->phpEx, $content);
+ $content = str_replace($this->path_helper->get_web_root_path() . 'download/file.' . $this->path_helper->get_php_ext(), $this->get_board_url() . '/download/file.' . $this->path_helper->get_php_ext(), $content);
}
// Remove Comments from inline attachments [ia]
diff --git a/phpBB/phpbb/feed/quote_helper.php b/phpBB/phpbb/feed/quote_helper.php
new file mode 100644
index 0000000000..843d075028
--- /dev/null
+++ b/phpBB/phpbb/feed/quote_helper.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
+
+namespace phpbb\feed;
+
+/**
+ * Modified quote_helper for feeds (basically just removing all attributes)
+ */
+class quote_helper extends \phpbb\textformatter\s9e\quote_helper
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function inject_metadata($xml)
+ {
+ // In feeds we don't want any attributes, so delete all of them
+ return \s9e\TextFormatter\Utils::replaceAttributes(
+ $xml,
+ 'QUOTE',
+ function ()
+ {
+ return [];
+ }
+ );
+ }
+}
diff --git a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
index bce0149890..dd584eff30 100644
--- a/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
+++ b/phpBB/phpbb/install/helper/iohandler/ajax_iohandler.php
@@ -187,6 +187,7 @@ class ajax_iohandler extends iohandler_base
$tpl_ary['KEY'] = $input_name;
$tpl_ary['S_EXPLAIN'] = false;
$tpl_ary['DISABLED'] = isset($input_options['disabled']) ? $input_options['disabled'] : false;
+ $tpl_ary['IS_SECONDARY'] = isset($input_options['is_secondary']) ? $input_options['is_secondary'] : false;
if (isset($input_options['default']))
{
@@ -218,6 +219,11 @@ class ajax_iohandler extends iohandler_base
$this->template->assign_block_vars($block_name, $tpl_ary);
}
+ if (isset($form['database_update_submit']) && !$form['database_update_submit']['disabled'])
+ {
+ $this->template->assign_var('FORM_TITLE', $this->language->lang('UPDATE_CONTINUE_UPDATE_PROCESS'));
+ }
+
$this->template->assign_var('S_NOT_ONLY_BUTTON_FORM', $not_button_form);
if (!$not_button_form)
diff --git a/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php b/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php
index 1792a3b723..8151a24f2d 100644
--- a/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php
+++ b/phpBB/phpbb/install/module/update_filesystem/task/diff_files.php
@@ -103,8 +103,8 @@ class diff_files extends task_base
$old_path = $this->update_helper->get_path_to_old_update_files();
$new_path = $this->update_helper->get_path_to_new_update_files();
- $files_to_diff = $this->installer_config->get('update_files', array());
- $files_to_diff = $files_to_diff['update_with_diff'];
+ $update_files = $this->installer_config->get('update_files', array());
+ $files_to_diff = $update_files['update_with_diff'];
// Set progress bar
$this->iohandler->set_task_count(count($files_to_diff), true);
@@ -154,7 +154,6 @@ class diff_files extends task_base
}
$diff = new \diff3($file_contents[0], $file_contents[1], $file_contents[2]);
- unset($file_contents);
// Handle conflicts
if ($diff->get_num_conflicts() !== 0)
@@ -162,12 +161,20 @@ class diff_files extends task_base
$merge_conflicts[] = $filename;
}
- // Save merged output
- $this->cache->put(
- '_file_' . md5($filename),
- base64_encode(implode("\n", $diff->merged_output()))
- );
+ if ($diff->merged_output() !== $file_contents[1])
+ {
+ // Save merged output
+ $this->cache->put(
+ '_file_' . md5($filename),
+ base64_encode(implode("\n", $diff->merged_output()))
+ );
+ }
+ else
+ {
+ unset($update_files['update_with_diff'][$key]);
+ }
+ unset($file_contents);
unset($diff);
}
else
@@ -199,6 +206,16 @@ class diff_files extends task_base
$this->installer_config->set('merge_conflict_list', $merge_conflicts);
$this->installer_config->set('file_diff_update_count', $progress_count);
+ foreach ($update_files as $type => $files)
+ {
+ if (empty($files))
+ {
+ unset($update_files[$type]);
+ }
+ }
+
+ $this->installer_config->set('update_files', $update_files);
+
// Request refresh
throw new resource_limit_reached_exception();
}
@@ -206,6 +223,16 @@ class diff_files extends task_base
$this->iohandler->finish_progress('ALL_FILES_DIFFED');
$this->installer_config->set('merge_conflict_list', $merge_conflicts);
+
+ foreach ($update_files as $type => $files)
+ {
+ if (empty($files))
+ {
+ unset($update_files[$type]);
+ }
+ }
+
+ $this->installer_config->set('update_files', $update_files);
}
/**
diff --git a/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php b/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php
index 21aa93b7ea..0b83e9a79d 100644
--- a/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php
+++ b/phpBB/phpbb/install/module/update_filesystem/task/download_updated_files.php
@@ -99,13 +99,14 @@ class download_updated_files extends task_base
// Add form to continue update
$this->iohandler->add_user_form_group('UPDATE_CONTINUE_UPDATE_PROCESS', array(
'update_recheck_files_submit' => array(
- 'label' => 'UPDATE_RECHECK_UPDATE_FILES',
- 'type' => 'submit',
+ 'label' => 'UPDATE_RECHECK_UPDATE_FILES',
+ 'type' => 'submit',
+ 'is_secondary' => empty($file_update_info),
),
'database_update_submit' => array(
'label' => 'UPDATE_CONTINUE_UPDATE_PROCESS',
'type' => 'submit',
- 'disabled' => count($file_update_info) > 0,
+ 'disabled' => !empty($file_update_info),
),
));
diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php
index 5aad7ee326..dcc4cdde51 100644
--- a/phpBB/phpbb/log/log.php
+++ b/phpBB/phpbb/log/log.php
@@ -933,6 +933,20 @@ class log implements \phpbb\log\log_interface
$forum_auth['f_read'][$row['topic_id']] = $row['forum_id'];
}
+ /**
+ * Allow modifying SQL query after topic data is retrieved (inside loop).
+ *
+ * @event core.phpbb_log_get_topic_auth_sql_after
+ * @var array forum_auth Forum permissions
+ * @var array row One row of data from SQL query
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'forum_auth',
+ 'row',
+ );
+ extract($this->dispatcher->trigger_event('core.phpbb_log_get_topic_auth_sql_after', compact($vars)));
+
if ($this->auth->acl_gets('a_', 'm_', $row['forum_id']))
{
$forum_auth['m_'][$row['topic_id']] = $row['forum_id'];
diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php
index a5a95b096d..40af5eda6b 100644
--- a/phpBB/phpbb/pagination.php
+++ b/phpBB/phpbb/pagination.php
@@ -136,6 +136,11 @@ class pagination
*/
public function generate_template_pagination($base_url, $block_var_name, $start_name, $num_items, $per_page, $start = 1, $reverse_count = false, $ignore_on_page = false)
{
+ if (empty($base_url))
+ {
+ return;
+ }
+
$total_pages = ceil($num_items / $per_page);
$on_page = $this->get_on_page($per_page, $start);
$u_previous_page = $u_next_page = '';
diff --git a/phpBB/phpbb/permissions.php b/phpBB/phpbb/permissions.php
index c9181e6202..7697884b6a 100644
--- a/phpBB/phpbb/permissions.php
+++ b/phpBB/phpbb/permissions.php
@@ -260,6 +260,7 @@ class permissions
// Forum Permissions
'f_list' => array('lang' => 'ACL_F_LIST', 'cat' => 'actions'),
+ 'f_list_topics' => array('lang' => 'ACL_F_LIST_TOPICS', 'cat' => 'actions'),
'f_read' => array('lang' => 'ACL_F_READ', 'cat' => 'actions'),
'f_search' => array('lang' => 'ACL_F_SEARCH', 'cat' => 'actions'),
'f_subscribe' => array('lang' => 'ACL_F_SUBSCRIBE', 'cat' => 'actions'),
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index da1aad1c3a..c8df1951e3 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -591,6 +591,7 @@ class fulltext_mysql extends \phpbb\search\base
WHERE MATCH ($sql_match) AGAINST ('" . $this->db->sql_escape(htmlspecialchars_decode($this->search_query)) . "' IN BOOLEAN MODE)
$sql_where_options
ORDER BY $sql_sort";
+ $this->db->sql_return_on_error(true);
$result = $this->db->sql_query_limit($sql, $this->config['search_block_size'], $start);
while ($row = $this->db->sql_fetchrow($result))
@@ -602,7 +603,7 @@ class fulltext_mysql extends \phpbb\search\base
$id_ary = array_unique($id_ary);
// if the total result count is not cached yet, retrieve it from the db
- if (!$result_count)
+ if (!$result_count && count($id_ary))
{
$sql_found_rows = 'SELECT FOUND_ROWS() as result_count';
$result = $this->db->sql_query($sql_found_rows);
@@ -1004,6 +1005,11 @@ class fulltext_mysql extends \phpbb\search\base
}
}
+ if (!isset($this->stats['post_text']))
+ {
+ $this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ADD FULLTEXT post_text (post_text)');
+ }
+
$this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
return false;
@@ -1039,6 +1045,11 @@ class fulltext_mysql extends \phpbb\search\base
$alter[] = 'DROP INDEX post_content';
}
+ if (isset($this->stats['post_text']))
+ {
+ $alter[] = 'DROP INDEX post_text';
+ }
+
if (sizeof($alter))
{
$this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
@@ -1059,7 +1070,7 @@ class fulltext_mysql extends \phpbb\search\base
$this->get_stats();
}
- return isset($this->stats['post_subject']) && isset($this->stats['post_content']);
+ return isset($this->stats['post_subject']) && isset($this->stats['post_content']) && isset($this->stats['post_text']);
}
/**
@@ -1103,6 +1114,10 @@ class fulltext_mysql extends \phpbb\search\base
{
$this->stats['post_subject'] = $row;
}
+ else if ($row['Key_name'] == 'post_text')
+ {
+ $this->stats['post_text'] = $row;
+ }
else if ($row['Key_name'] == 'post_content')
{
$this->stats['post_content'] = $row;
diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php
index 59c3d55076..a20e3ad4b5 100644
--- a/phpBB/phpbb/search/fulltext_sphinx.php
+++ b/phpBB/phpbb/search/fulltext_sphinx.php
@@ -304,7 +304,7 @@ class fulltext_sphinx
array('sql_attr_string', 'post_subject'),
),
'source source_phpbb_' . $this->id . '_delta : source_phpbb_' . $this->id . '_main' => array(
- array('sql_query_pre', ''),
+ array('sql_query_pre', 'SET NAMES \'utf8\''),
array('sql_query_range', ''),
array('sql_range_step', ''),
array('sql_query', 'SELECT
@@ -324,6 +324,7 @@ class fulltext_sphinx
WHERE
p.topic_id = t.topic_id
AND p.post_id >= ( SELECT max_doc_id FROM ' . SPHINX_TABLE . ' WHERE counter_id=1 )'),
+ array('sql_query_post_index', ''),
),
'index index_phpbb_' . $this->id . '_main' => array(
array('path', $this->config['fulltext_sphinx_data_path'] . 'index_phpbb_' . $this->id . '_main'),
diff --git a/phpBB/phpbb/template/context.php b/phpBB/phpbb/template/context.php
index 392efd5933..c1e971c148 100644
--- a/phpBB/phpbb/template/context.php
+++ b/phpBB/phpbb/template/context.php
@@ -190,70 +190,50 @@ class context
public function assign_block_vars($blockname, array $vararray)
{
$this->num_rows_is_set = false;
- if (strpos($blockname, '.') !== false)
- {
- // Nested block.
- $blocks = explode('.', $blockname);
- $blockcount = sizeof($blocks) - 1;
- $str = &$this->tpldata;
- for ($i = 0; $i < $blockcount; $i++)
- {
- $str = &$str[$blocks[$i]];
- $str = &$str[sizeof($str) - 1];
- }
-
- $s_row_count = isset($str[$blocks[$blockcount]]) ? sizeof($str[$blocks[$blockcount]]) : 0;
- $vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
+ // For nested block, $blockcount > 0, for top-level block, $blockcount == 0
+ $blocks = explode('.', $blockname);
+ $blockcount = count($blocks) - 1;
- // Assign S_FIRST_ROW
- if (!$s_row_count)
- {
- $vararray['S_FIRST_ROW'] = true;
- }
+ $block = &$this->tpldata;
+ for ($i = 0; $i < $blockcount; $i++)
+ {
+ $pos = strpos($blocks[$i], '[');
+ $name = ($pos !== false) ? substr($blocks[$i], 0, $pos) : $blocks[$i];
+ $block = &$block[$name];
+ $index = (!$pos || strpos($blocks[$i], '[]') === $pos) ? (count($block) - 1) : (min((int) substr($blocks[$i], $pos + 1, -1), count($block) - 1));
+ $block = &$block[$index];
+ }
- // Assign S_BLOCK_NAME
- $vararray['S_BLOCK_NAME'] = $blocks[$blockcount];
+ // $block = &$block[$blocks[$i]]; // Do not traverse the last block as it might be empty
+ $name = $blocks[$i];
- // Now the tricky part, we always assign S_LAST_ROW and remove the entry before
- // This is much more clever than going through the complete template data on display (phew)
- $vararray['S_LAST_ROW'] = true;
- if ($s_row_count > 0)
- {
- unset($str[$blocks[$blockcount]][($s_row_count - 1)]['S_LAST_ROW']);
- }
+ // Assign S_ROW_COUNT and S_ROW_NUM
+ $s_row_count = isset($block[$name]) ? count($block[$name]) : 0;
+ $vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
- // Now we add the block that we're actually assigning to.
- // We're adding a new iteration to this block with the given
- // variable assignments.
- $str[$blocks[$blockcount]][] = $vararray;
- }
- else
+ // Assign S_FIRST_ROW
+ if (!$s_row_count)
{
- // Top-level block.
- $s_row_count = (isset($this->tpldata[$blockname])) ? sizeof($this->tpldata[$blockname]) : 0;
- $vararray['S_ROW_COUNT'] = $vararray['S_ROW_NUM'] = $s_row_count;
-
- // Assign S_FIRST_ROW
- if (!$s_row_count)
- {
- $vararray['S_FIRST_ROW'] = true;
- }
-
- // Assign S_BLOCK_NAME
- $vararray['S_BLOCK_NAME'] = $blockname;
+ $vararray['S_FIRST_ROW'] = true;
+ }
- // We always assign S_LAST_ROW and remove the entry before
- $vararray['S_LAST_ROW'] = true;
- if ($s_row_count > 0)
- {
- unset($this->tpldata[$blockname][($s_row_count - 1)]['S_LAST_ROW']);
- }
+ // Assign S_BLOCK_NAME
+ $vararray['S_BLOCK_NAME'] = $name;
- // Add a new iteration to this block with the variable assignments we were given.
- $this->tpldata[$blockname][] = $vararray;
+ // Now the tricky part, we always assign S_LAST_ROW and remove the entry before
+ // This is much more clever than going through the complete template data on display (phew)
+ $vararray['S_LAST_ROW'] = true;
+ if ($s_row_count > 0)
+ {
+ unset($block[$name][($s_row_count - 1)]['S_LAST_ROW']);
}
+ // Now we add the block that we're actually assigning to.
+ // We're adding a new iteration to this block with the given
+ // variable assignments.
+ $block[$name][] = $vararray;
+
return true;
}
diff --git a/phpBB/phpbb/textformatter/s9e/bbcode_merger.php b/phpBB/phpbb/textformatter/s9e/bbcode_merger.php
new file mode 100644
index 0000000000..72b1473751
--- /dev/null
+++ b/phpBB/phpbb/textformatter/s9e/bbcode_merger.php
@@ -0,0 +1,180 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+namespace phpbb\textformatter\s9e;
+
+use phpbb\textformatter\s9e\factory;
+use s9e\TextFormatter\Configurator\Helpers\TemplateHelper;
+use s9e\TextFormatter\Configurator\Items\UnsafeTemplate;
+
+class bbcode_merger
+{
+ /**
+ * @var \s9e\TextFormatter\Configurator $configurator Configurator instance used to inspect BBCodes
+ */
+ protected $configurator;
+
+ /**
+ * @param \phpbb\textformatter\s9e\factory $factory
+ */
+ public function __construct(factory $factory)
+ {
+ $this->configurator = $factory->get_configurator();
+ }
+
+ /**
+ * Merge two BBCode definitions
+ *
+ * All of the arrays contain a "usage" element and a "template" element
+ *
+ * @param array $without BBCode definition without an attribute
+ * @param array $with BBCode definition with an attribute
+ * @return array Merged definition
+ */
+ public function merge_bbcodes(array $without, array $with)
+ {
+ $without = $this->create_bbcode($without);
+ $with = $this->create_bbcode($with);
+
+ // Select the appropriate strategy for merging this BBCode
+ if ($this->is_content_bbcode($without, $with))
+ {
+ $merged = $this->merge_content_bbcode($without, $with);
+ }
+ else
+ {
+ $merged = $this->merge_optional_bbcode($without, $with);
+ }
+
+ $merged['template'] = $this->normalize_template($merged['template']);
+
+ return $merged;
+ }
+
+ /**
+ * Create a custom BBCode for inspection
+ *
+ * @param array $definition Original BBCode definition
+ * @return array Updated definition containing a BBCode object and a Tag
+ */
+ protected function create_bbcode(array $definition)
+ {
+ $bbcode = $this->configurator->BBCodes->addCustom(
+ $definition['usage'],
+ new UnsafeTemplate($definition['template'])
+ );
+
+ $definition['bbcode'] = $bbcode;
+ $definition['tag'] = $this->configurator->tags[$bbcode->tagName];
+
+ return $definition;
+ }
+
+ /**
+ * Indent given template for readability
+ *
+ * @param string $template
+ * @return string
+ */
+ protected function indent_template($template)
+ {
+ $dom = TemplateHelper::loadTemplate($template);
+ $dom->formatOutput = true;
+ $template = TemplateHelper::saveTemplate($dom);
+
+ // Remove the first level of indentation if the template starts with whitespace
+ if (preg_match('(^\\n +)', $template, $m))
+ {
+ $template = str_replace($m[0], "\n", $template);
+ }
+
+ return trim($template);
+ }
+
+ /**
+ * Test whether the two definitions form a "content"-style BBCode
+ *
+ * Such BBCodes include the [URL] BBCode, which uses its text content as
+ * attribute if none is provided
+ *
+ * @param array $without BBCode definition without an attribute
+ * @param array $with BBCode definition with an attribute
+ * @return array Merged definition
+ */
+ protected function is_content_bbcode(array $without, array $with)
+ {
+ // Test whether we find the same non-TEXT token between "]" and "[" in the usage
+ // as between ">" and "<" in the template
+ return (preg_match('(\\]\\s*(\\{(?!TEXT)[^}]+\\})\\s*\\[)', $without['usage'], $m)
+ && preg_match('(>[^<]*?' . preg_quote($m[1]) . '[^>]*?<)s', $without['template']));
+ }
+
+ /**
+ * Merge the two BBCode definitions of a "content"-style BBCode
+ *
+ * @param array $without BBCode definition without an attribute
+ * @param array $with BBCode definition with an attribute
+ * @return array Merged definition
+ */
+ protected function merge_content_bbcode(array $without, array $with)
+ {
+ // Convert [X={X}] into [X={X;useContent}]
+ $usage = preg_replace('(\\})', ';useContent}', $with['usage'], 1);
+
+ // Use the template from the definition that uses an attribute
+ $template = $with['tag']->template;
+
+ return ['usage' => $usage, 'template' => $template];
+ }
+
+ /**
+ * Merge the two BBCode definitions of a BBCode with an optional argument
+ *
+ * Such BBCodes include the [QUOTE] BBCode, which takes an optional argument
+ * but otherwise does not behave differently
+ *
+ * @param array $without BBCode definition without an attribute
+ * @param array $with BBCode definition with an attribute
+ * @return array Merged definition
+ */
+ protected function merge_optional_bbcode(array $without, array $with)
+ {
+ // Convert [X={X}] into [X={X?}]
+ $usage = preg_replace('(\\})', '?}', $with['usage'], 1);
+
+ // Build a template for both versions
+ $template = '<xsl:choose><xsl:when test="@' . $with['bbcode']->defaultAttribute . '">' . $with['tag']->template . '</xsl:when><xsl:otherwise>' . $without['tag']->template . '</xsl:otherwise></xsl:choose>';
+
+ return ['usage' => $usage, 'template' => $template];
+ }
+
+ /**
+ * Normalize a template
+ *
+ * @param string $template
+ * @return string
+ */
+ protected function normalize_template($template)
+ {
+ // Normalize the template to simplify it
+ $template = $this->configurator->templateNormalizer->normalizeTemplate($template);
+
+ // Convert xsl:value-of elements back to {L_} tokens where applicable
+ $template = preg_replace('(<xsl:value-of select="\\$(L_\\w+)"/>)', '{$1}', $template);
+
+ // Beautify the template
+ $template = $this->indent_template($template);
+
+ return $template;
+ }
+}
diff --git a/phpBB/phpbb/textformatter/s9e/factory.php b/phpBB/phpbb/textformatter/s9e/factory.php
index d5ad8283d9..1e85856898 100644
--- a/phpBB/phpbb/textformatter/s9e/factory.php
+++ b/phpBB/phpbb/textformatter/s9e/factory.php
@@ -78,7 +78,7 @@ class factory implements \phpbb\textformatter\cache_interface
'b' => '[B]{TEXT}[/B]',
'code' => '[CODE lang={IDENTIFIER;optional}]{TEXT}[/CODE]',
'color' => '[COLOR={COLOR}]{TEXT}[/COLOR]',
- 'email' => '[EMAIL={EMAIL;useContent} subject={TEXT;optional;postFilter=rawurlencode} body={TEXT;optional;postFilter=rawurlencode}]{TEXT}[/EMAIL]',
+ 'email' => '[EMAIL={EMAIL;useContent} subject={TEXT1;optional;postFilter=rawurlencode} body={TEXT2;optional;postFilter=rawurlencode}]{TEXT}[/EMAIL]',
'flash' => '[FLASH={NUMBER1},{NUMBER2} width={NUMBER1;postFilter=#flashwidth} height={NUMBER2;postFilter=#flashheight} url={URL;useContent} /]',
'i' => '[I]{TEXT}[/I]',
'img' => '[IMG src={IMAGEURL;useContent}]',
@@ -266,12 +266,13 @@ class factory implements \phpbb\textformatter\cache_interface
->addParameterByName('logger')
->addParameterByName('max_img_height')
->addParameterByName('max_img_width')
- ->markAsSafeAsURL();
+ ->markAsSafeAsURL()
+ ->setJS('UrlFilter.filter');
// Add default BBCodes
foreach ($this->get_default_bbcodes($configurator) as $bbcode)
{
- $configurator->BBCodes->addCustom($bbcode['usage'], $bbcode['template']);
+ $configurator->BBCodes->addCustom($bbcode['usage'], new UnsafeTemplate($bbcode['template']));
}
if (isset($configurator->tags['QUOTE']))
{
@@ -355,8 +356,6 @@ class factory implements \phpbb\textformatter\cache_interface
$configurator->registeredVars['max_img_width'] = 0;
// Load the Emoji plugin and modify its tag's template to obey viewsmilies
- $configurator->Emoji->omitImageSize();
- $configurator->Emoji->useSVG();
$tag = $configurator->Emoji->getTag();
$tag->template = '<xsl:choose><xsl:when test="$S_VIEWSMILIES">' . str_replace('class="emoji"', 'class="emoji smilies"', $tag->template) . '</xsl:when><xsl:otherwise><xsl:value-of select="."/></xsl:otherwise></xsl:choose>';
diff --git a/phpBB/phpbb/textformatter/s9e/parser.php b/phpBB/phpbb/textformatter/s9e/parser.php
index 05ddfffa11..3698dca224 100644
--- a/phpBB/phpbb/textformatter/s9e/parser.php
+++ b/phpBB/phpbb/textformatter/s9e/parser.php
@@ -13,7 +13,7 @@
namespace phpbb\textformatter\s9e;
-use s9e\TextFormatter\Parser\BuiltInFilters;
+use s9e\TextFormatter\Parser\AttributeFilters\UrlFilter;
use s9e\TextFormatter\Parser\Logger;
/**
@@ -196,7 +196,7 @@ class parser implements \phpbb\textformatter\parser_interface
public function get_errors()
{
$errors = array();
- foreach ($this->parser->getLogger()->get() as $entry)
+ foreach ($this->parser->getLogger()->getLogs() as $entry)
{
list(, $msg, $context) = $entry;
@@ -365,7 +365,7 @@ class parser implements \phpbb\textformatter\parser_interface
static public function filter_img_url($url, array $url_config, Logger $logger, $max_height, $max_width)
{
// Validate the URL
- $url = BuiltInFilters::filterUrl($url, $url_config, $logger);
+ $url = UrlFilter::filter($url, $url_config, $logger);
if ($url === false)
{
return false;
diff --git a/phpBB/phpbb/textreparser/base.php b/phpBB/phpbb/textreparser/base.php
index 27d7bc1f27..2ee6ea2cb3 100644
--- a/phpBB/phpbb/textreparser/base.php
+++ b/phpBB/phpbb/textreparser/base.php
@@ -153,8 +153,8 @@ abstract class base implements reparser_interface
{
// Look for the closing tag inside of a e element, in an element of the same name, e.g.
// <e>[/url]</e></URL>
- $match = '<e>[/' . $bbcode . ']</e></' . strtoupper($bbcode) . '>';
- if (strpos($record['text'], $match) !== false)
+ $match = '<e>[/' . $bbcode . ']</e></' . $bbcode . '>';
+ if (stripos($record['text'], $match) !== false)
{
return true;
}
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index d4097f53ee..5899dff2f5 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -278,24 +278,6 @@ class user extends \phpbb\session
$db->sql_freeresult($result);
}
- // User has wrong style
- if (!$this->style && $style_id == $this->data['user_style'])
- {
- $style_id = $this->data['user_style'] = $config['default_style'];
-
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_style = $style_id
- WHERE user_id = {$this->data['user_id']}";
- $db->sql_query($sql);
-
- $sql = 'SELECT *
- FROM ' . STYLES_TABLE . " s
- WHERE s.style_id = $style_id";
- $result = $db->sql_query($sql, 3600);
- $this->style = $db->sql_fetchrow($result);
- $db->sql_freeresult($result);
- }
-
if (!$this->style)
{
trigger_error('NO_STYLE_DATA', E_USER_ERROR);
diff --git a/phpBB/search.php b/phpBB/search.php
index 0d9b2bbfe8..eabb1fc96e 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -932,6 +932,26 @@ if ($keywords || $author || $author_id || $search_id || $submit)
while ($row = $db->sql_fetchrow($result))
{
+ /**
+ * Modify the row of a post result before the post_text is trimmed
+ *
+ * @event core.search_modify_post_row
+ * @var string hilit String to highlight
+ * @var array row Array with the post data
+ * @var string u_hilit Highlight string to be injected into URL
+ * @var string view Search results view mode
+ * @var array zebra Array with zebra data for the current user
+ * @since 3.2.2-RC1
+ */
+ $vars = array(
+ 'hilit',
+ 'row',
+ 'u_hilit',
+ 'view',
+ 'zebra',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.search_modify_post_row', compact($vars)));
+
// We pre-process some variables here for later usage
$row['post_text'] = censor_text($row['post_text']);
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index 2deceef788..ea4e899109 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -25,7 +25,7 @@ style_version = 3.2.1
phpbb_version = 3.2.1
# Defining a different template bitfield
-# template_bitfield = lNg=
+# template_bitfield = //g=
# Parent style
# Set value to empty or to this style's name if this style does not have a parent style
diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html
index 35b1ecca0a..b56ed188c1 100644
--- a/phpBB/styles/prosilver/template/mcp_topic.html
+++ b/phpBB/styles/prosilver/template/mcp_topic.html
@@ -94,6 +94,7 @@
<div id="topicreview" class="topicreview">
<!-- BEGIN postrow -->
+ <!-- EVENT mcp_topic_postrow_post_before -->
<div class="post <!-- IF postrow.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
<div class="inner">
@@ -143,6 +144,8 @@
<div class="content" id="message_{postrow.POST_ID}">{postrow.MESSAGE}</div>
+ <!-- EVENT mcp_topic_postrow_attachments_before -->
+
<!-- IF postrow.S_HAS_ATTACHMENTS -->
<dl class="attachbox">
<dt>{L_ATTACHMENTS}</dt>
@@ -152,6 +155,8 @@
</dl>
<!-- ENDIF -->
+ <!-- EVENT mcp_topic_postrow_attachments_after -->
+
</div>
</div>
diff --git a/phpBB/styles/prosilver/template/ucp_footer.html b/phpBB/styles/prosilver/template/ucp_footer.html
index f2f1a68db3..eb07f52e05 100644
--- a/phpBB/styles/prosilver/template/ucp_footer.html
+++ b/phpBB/styles/prosilver/template/ucp_footer.html
@@ -9,6 +9,4 @@
</form>
<!-- ENDIF -->
-<!-- INCLUDE jumpbox.html -->
-
<!-- INCLUDE overall_footer.html -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
index 9377eeb9f5..7a8849258a 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage_print.html
@@ -8,6 +8,7 @@
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet">
+<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet">
<!-- EVENT ucp_pm_viewmessage_print_head_append -->
</head>
<body id="phpbb">
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 16d972056d..994d75f244 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -165,10 +165,10 @@
<i class="icon fa-file fa-fw icon-red icon-md" aria-hidden="true"></i><span class="sr-only">{NEW_POST}</span>
</a>
<!-- ENDIF -->
- <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
+ <!-- IF topicrow.U_VIEW_TOPIC --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
- <a href="{topicrow.U_MCP_QUEUE}" title="{L_TOPIC_UNAPPROVED}">
- <i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only">{L_TOPIC_UNAPPROVED}</span>
+ <a href="{topicrow.U_MCP_QUEUE}" title="<!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF -->">
+ <i class="icon fa-question fa-fw icon-blue" aria-hidden="true"></i><span class="sr-only"><!-- IF topicrow.S_TOPIC_UNAPPROVED -->{L_TOPIC_UNAPPROVED}<!-- ELSE -->{L_POSTS_UNAPPROVED}<!-- ENDIF --></span>
</a>
<!-- ENDIF -->
<!-- IF topicrow.S_TOPIC_DELETED -->
@@ -224,7 +224,7 @@
<dd class="views">{topicrow.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost">
<span><dfn>{L_LAST_POST} </dfn>{L_POST_BY_AUTHOR} {topicrow.LAST_POST_AUTHOR_FULL}
- <!-- IF not S_IS_BOT -->
+ <!-- IF not S_IS_BOT and topicrow.U_LAST_POST -->
<a href="{topicrow.U_LAST_POST}" title="{L_GOTO_LAST_POST}">
<i class="icon fa-external-link-square fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">{VIEW_LATEST_POST}</span>
</a>
diff --git a/phpBB/styles/prosilver/template/viewtopic_print.html b/phpBB/styles/prosilver/template/viewtopic_print.html
index 3c1ed4c3f1..b504949053 100644
--- a/phpBB/styles/prosilver/template/viewtopic_print.html
+++ b/phpBB/styles/prosilver/template/viewtopic_print.html
@@ -8,9 +8,10 @@
<title>{SITENAME} &bull; {PAGE_TITLE}</title>
<link href="{T_THEME_PATH}/print.css" rel="stylesheet">
+<link href="{T_THEME_PATH}/bidi.css" rel="stylesheet">
<!-- EVENT viewtopic_print_head_append -->
</head>
-<body id="phpbb">
+<body id="phpbb" class="{S_CONTENT_DIRECTION}">
<div id="wrap" class="wrap">
<a id="top" class="top-anchor" accesskey="t"></a>
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 923ff3e792..79b769b1e7 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -239,6 +239,10 @@
/* Pagination
---------------------------------------- */
+.rtl .page-number {
+ float: left;
+}
+
.rtl .pagination {
text-align: left;
float: left;
@@ -451,6 +455,10 @@ li.breadcrumbs span:first-child > a {
/* Post body styles
----------------------------------------*/
+.rtl .date {
+ float: left;
+}
+
.rtl .postbody, .rtl .postbody h3 {
float: right;
}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index a071e63c69..807633864c 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -18,7 +18,7 @@ ul.topiclist dl {
}
ul.topiclist li.row dl {
- padding: 2px 0;
+ margin: 2px 0;
}
ul.topiclist dt, ul.topiclist dd {
@@ -70,6 +70,11 @@ ul.topiclist dd {
box-sizing: border-box;
}
+ul.topiclist li.row dd {
+ padding: 4px 0 999px 0;
+ margin-bottom: -995px;
+}
+
ul.topiclist dfn {
/* Labels for post/view counts */
position: absolute;
@@ -524,6 +529,7 @@ blockquote .codebox {
/* Attachments
----------------------------------------*/
.attachbox {
+ font-size: 13px;
float: left;
width: auto;
max-width: 100%;
diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css
index a83270b742..9445279773 100644
--- a/phpBB/styles/prosilver/theme/print.css
+++ b/phpBB/styles/prosilver/theme/print.css
@@ -133,6 +133,8 @@ ol, ul {
/* Misc page elements */
div.spacer { clear: both; }
+code { display: block; }
+
/* Accessibility tweaks: Mozilla.org */
.skip_link { display: none; }
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 9cc75988f7..e4cf08d548 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -87,7 +87,7 @@ if (isset($_GET['e']) && !$user->data['is_registered'])
}
// Permissions check
-if (!$auth->acl_gets('f_list', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id)))
+if (!$auth->acl_gets('f_list', 'f_list_topics', 'f_read', $forum_id) || ($forum_data['forum_type'] == FORUM_LINK && $forum_data['forum_link'] && !$auth->acl_get('f_read', $forum_id)))
{
if ($user->data['user_id'] != ANONYMOUS)
{
@@ -161,7 +161,22 @@ $phpbb_content_visibility = $phpbb_container->get('content.visibility');
$topics_count = $phpbb_content_visibility->get_count('forum_topics', $forum_data, $forum_id);
$start = $pagination->validate_start($start, $config['topics_per_page'], $topics_count);
-page_header($forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : ''), true, $forum_id);
+$page_title = $forum_data['forum_name'] . ($start ? ' - ' . $user->lang('PAGE_TITLE_NUMBER', $pagination->get_on_page($config['topics_per_page'], $start)) : '');
+
+/**
+* You can use this event to modify the page title of the viewforum page
+*
+* @event core.viewforum_modify_page_title
+* @var string page_title Title of the viewforum page
+* @var array forum_data Array with forum data
+* @var int forum_id The forum ID
+* @var int start Start offset used to calculate the page
+* @since 3.2.2-RC1
+*/
+$vars = array('page_title', 'forum_data', 'forum_id', 'start');
+extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_page_title', compact($vars)));
+
+page_header($page_title, true, $forum_id);
$template->set_filenames(array(
'body' => 'viewforum_body.html')
@@ -181,7 +196,7 @@ if (!($forum_data['forum_type'] == FORUM_POST || (($forum_data['forum_flags'] &
// Ok, if someone has only list-access, we only display the forum list.
// We also make this circumstance available to the template in case we want to display a notice. ;)
-if (!$auth->acl_get('f_read', $forum_id))
+if (!$auth->acl_gets('f_read', 'f_list_topics', $forum_id))
{
$template->assign_vars(array(
'S_NO_READ_ACCESS' => true,
@@ -523,7 +538,7 @@ if ($forum_data['forum_type'] == FORUM_POST)
while ($row = $db->sql_fetchrow($result))
{
- if ($row['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
+ if (!$phpbb_content_visibility->is_visible('topic', $row['forum_id'], $row))
{
// Do not display announcements that are waiting for approval or soft deleted.
continue;
@@ -732,7 +747,7 @@ if (sizeof($shadow_topic_list))
}
// Do not include those topics the user has no permission to access
- if (!$auth->acl_get('f_read', $row['forum_id']))
+ if (!$auth->acl_gets('f_read', 'f_list_topics', $row['forum_id']))
{
// We need to remove any trace regarding this topic. :)
unset($rowset[$orig_topic_id]);
@@ -875,7 +890,7 @@ if (sizeof($topic_list))
// Generate all the URIs ...
$view_topic_url_params = 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id;
- $view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
+ $view_topic_url = $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params) : false;
$topic_unapproved = (($row['topic_visibility'] == ITEM_UNAPPROVED || $row['topic_visibility'] == ITEM_REAPPROVE) && $auth->acl_get('m_approve', $row['forum_id']));
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id']));
@@ -929,8 +944,8 @@ if (sizeof($topic_list))
'S_TOPIC_LOCKED' => ($row['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,
- 'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread',
- 'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
+ 'U_NEWEST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;view=unread') . '#unread' : false,
+ 'U_LAST_POST' => $auth->acl_get('f_read', $forum_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'] : false,
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index c94675a741..9037918a20 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -263,8 +263,12 @@ if (!$topic_data)
$forum_id = (int) $topic_data['forum_id'];
+// If the request is missing the f parameter, the forum id in the user session data is 0 at the moment.
+// Let's fix that now so that the user can't hide from the forum's Who Is Online list.
+$user->page['forum'] = $forum_id;
+
// Now we know the forum_id and can check the permissions
-if ($topic_data['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $forum_id))
+if (!$phpbb_content_visibility->is_visible('topic', $forum_id, $topic_data))
{
trigger_error('NO_TOPIC');
}
diff --git a/tests/dbal/migration/revert_table.php b/tests/dbal/migration/revert_table.php
new file mode 100644
index 0000000000..162421be85
--- /dev/null
+++ b/tests/dbal/migration/revert_table.php
@@ -0,0 +1,39 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_revert_table extends \phpbb\db\migration\migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_tables' => array(
+ 'phpbb_foobar' => array(
+ 'COLUMNS' => array(
+ 'module_id' => array('UINT:3', NULL, 'auto_increment'),
+ 'bar_column' => array('UINT', 1),
+ ),
+ 'PRIMARY_KEY' => 'module_id',
+ ),
+ ),
+ );
+ }
+
+ function revert_schema()
+ {
+ return array(
+ 'drop_tables' => array(
+ 'phpbb_foobar',
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migration/revert_table_with_dependency.php b/tests/dbal/migration/revert_table_with_dependency.php
new file mode 100644
index 0000000000..f26ad076e6
--- /dev/null
+++ b/tests/dbal/migration/revert_table_with_dependency.php
@@ -0,0 +1,52 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_dbal_migration_revert_table_with_dependency extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array('phpbb_dbal_migration_revert_table');
+ }
+
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ 'phpbb_foobar' => array(
+ 'baz_column' => array('UINT', 1),
+ ),
+ ),
+ 'drop_columns' => array(
+ 'phpbb_foobar' => array(
+ 'bar_column',
+ ),
+ ),
+ );
+ }
+
+ function revert_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ 'phpbb_foobar' => array(
+ 'bar_column' => array('UINT', 1),
+ ),
+ ),
+ 'drop_columns' => array(
+ 'phpbb_foobar' => array(
+ 'baz_column',
+ ),
+ ),
+ );
+ }
+}
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php
index f7275a4bbe..372b2dbe1e 100644
--- a/tests/dbal/migrator_test.php
+++ b/tests/dbal/migrator_test.php
@@ -17,16 +17,26 @@ require_once dirname(__FILE__) . '/migration/if.php';
require_once dirname(__FILE__) . '/migration/recall.php';
require_once dirname(__FILE__) . '/migration/revert.php';
require_once dirname(__FILE__) . '/migration/revert_with_dependency.php';
+require_once dirname(__FILE__) . '/migration/revert_table.php';
+require_once dirname(__FILE__) . '/migration/revert_table_with_dependency.php';
require_once dirname(__FILE__) . '/migration/fail.php';
require_once dirname(__FILE__) . '/migration/installed.php';
require_once dirname(__FILE__) . '/migration/schema.php';
class phpbb_dbal_migrator_test extends phpbb_database_test_case
{
+ /** @var \phpbb\db\driver\driver_interface */
protected $db;
+
+ /** @var \phpbb\db\tools\tools_interface */
protected $db_tools;
+
+ /** @var \phpbb\db\migrator */
protected $migrator;
+ /** @var \phpbb\config\config */
+ protected $config;
+
public function getDataSet()
{
return $this->createXMLDataSet(dirname(__FILE__).'/fixtures/migrator.xml');
@@ -241,6 +251,41 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$this->assertEquals(1, $migrator_test_revert_counter, 'Revert did call custom function again');
}
+ public function test_revert_table()
+ {
+ // Make sure there are no other migrations in the db, this could cause issues
+ $this->db->sql_query("DELETE FROM phpbb_migrations");
+ $this->migrator->load_migration_state();
+
+ $this->migrator->set_migrations(array('phpbb_dbal_migration_revert_table', 'phpbb_dbal_migration_revert_table_with_dependency'));
+
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert_table'));
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert_table_with_dependency'));
+
+ // Install the migration first
+ while (!$this->migrator->finished())
+ {
+ $this->migrator->update();
+ }
+
+ $this->assertTrue($this->migrator->migration_state('phpbb_dbal_migration_revert_table') !== false);
+ $this->assertTrue($this->migrator->migration_state('phpbb_dbal_migration_revert_table_with_dependency') !== false);
+
+ $this->assertTrue($this->db_tools->sql_column_exists('phpbb_foobar', 'baz_column'));
+ $this->assertFalse($this->db_tools->sql_column_exists('phpbb_foobar', 'bar_column'));
+
+ // Revert migrations
+ while ($this->migrator->migration_state('phpbb_dbal_migration_revert_table') !== false)
+ {
+ $this->migrator->revert('phpbb_dbal_migration_revert_table');
+ }
+
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert_table'));
+ $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert_table_with_dependency'));
+
+ $this->assertFalse($this->db_tools->sql_table_exists('phpbb_foobar'));
+ }
+
public function test_fail()
{
$this->migrator->set_migrations(array('phpbb_dbal_migration_fail'));
diff --git a/tests/event/dispatcher_test.php b/tests/event/dispatcher_test.php
index 7bba5bf337..da28d24daa 100644
--- a/tests/event/dispatcher_test.php
+++ b/tests/event/dispatcher_test.php
@@ -29,5 +29,21 @@ class phpbb_event_dispatcher_test extends phpbb_test_case
$result = $dispatcher->trigger_event('core.test_event', compact($vars));
$this->assertSame(array('foo' => 'foo2', 'bar' => 'bar2'), $result);
+
+ // Test migrating events
+ $dispatcher->addListener('core.foo_br', function(\phpbb\event\data $event) {
+ $event['pi'] = '3.14159';
+ });
+ $dispatcher->addListener('core.foo_bar', function(\phpbb\event\data $event) {
+ $event['pi'] = '3.1';
+ });
+
+
+ $pi = '3';
+
+ $vars = array('pi');
+ $result = $dispatcher->trigger_event(['core.foo_bar', 'core.foo_br'], compact($vars));
+
+ $this->assertSame(array('pi' => '3.14159'), $result);
}
}
diff --git a/tests/event/fixtures/event_migration.test b/tests/event/fixtures/event_migration.test
new file mode 100644
index 0000000000..b2df9f95df
--- /dev/null
+++ b/tests/event/fixtures/event_migration.test
@@ -0,0 +1,30 @@
+<?php
+
+ /**
+ * Modify pm and sender data before it is assigned to the template
+ *
+ * @event core.ucp_pm_view_message
+ * @var mixed id Active module category (can be int or string)
+ * @var string mode Active module
+ * @var int folder_id ID of the folder the message is in
+ * @var int msg_id ID of the private message
+ * @var array folder Array with data of user's message folders
+ * @var array message_row Array with message data
+ * @var array cp_row Array with senders custom profile field data
+ * @var array msg_data Template array with message data
+ * @var array user_info User data of the sender
+ * @since 3.1.0-a1
+ * @changed 3.1.6-RC1 Added user_info into event
+ */
+ $vars = array(
+ 'id',
+ 'mode',
+ 'folder_id',
+ 'msg_id',
+ 'folder',
+ 'message_row',
+ 'cp_row',
+ 'msg_data',
+ 'user_info',
+ );
+ extract($phpbb_dispatcher->trigger_event(['core.ucp_pm_view_message', 'core.ucp_pm_view_messsage'], compact($vars)));
diff --git a/tests/event/php_exporter_test.php b/tests/event/php_exporter_test.php
index 692a57f93c..21dbb1e1d4 100644
--- a/tests/event/php_exporter_test.php
+++ b/tests/event/php_exporter_test.php
@@ -38,6 +38,18 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
),
),
array(
+ 'event_migration.test',
+ array(
+ 'core.ucp_pm_view_message' => array(
+ 'event' => 'core.ucp_pm_view_message',
+ 'file' => 'event_migration.test',
+ 'arguments' => array('cp_row', 'folder', 'folder_id', 'id', 'message_row', 'mode', 'msg_data', 'msg_id', 'user_info'),
+ 'since' => '3.1.0-a1',
+ 'description' => 'Modify pm and sender data before it is assigned to the template',
+ ),
+ ),
+ ),
+ array(
'extra_description.test',
array(
'extra_description.dispatch' => array(
@@ -240,6 +252,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
array("\t\$phpbb_dispatcher->dispatch('dispatch.one2.thr_ee4');", 'dispatch.one2.thr_ee4'),
array("\$this->dispatcher->dispatch('dispatch.one2');", 'dispatch.one2'),
array("\$phpbb_dispatcher->dispatch('dis_patch.one');", 'dis_patch.one'),
+ array("\$phpbb_dispatcher->dispatch(['dis_patch.one', 'dis_patch.one2']);", 'dis_patch.one'),
+ array("\$phpbb_dispatcher->dispatch(['dis_patch.one', 'dis_patch.one2', 'dis_patch.two3']);", 'dis_patch.one'),
);
}
@@ -259,6 +273,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
array("\$phpbb_dispatcher->dispatch('');"),
array("\$phpbb_dispatcher->dispatch('dispatch.2one');"),
array("\$phpbb_dispatcher->dispatch('dispatch');"),
+ array("\$phpbb_dispatcher->dispatch(['dispatch.one']);"),
+ array("\$phpbb_dispatcher->dispatch(array('dispatch.one', 'dispatch.one2'));"),
);
}
@@ -279,6 +295,8 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
array("\textract(\$phpbb_dispatcher->trigger_event('dispatch.one2.thr_ee4', compact(\$vars)));", 'dispatch.one2.thr_ee4'),
array("extract(\$this->dispatcher->trigger_event('dispatch.one2', compact(\$vars)));", 'dispatch.one2'),
array("extract(\$phpbb_dispatcher->trigger_event('dis_patch.one', compact(\$vars)));", 'dis_patch.one'),
+ array("extract(\$phpbb_dispatcher->trigger_event(['dis_patch.one', 'dis_patch.one2'], compact(\$vars)));", 'dis_patch.one'),
+ array("extract(\$phpbb_dispatcher->trigger_event(['dis_patch.one', 'dis_patch.one2', 'dis_patch.two3'], compact(\$vars)));", 'dis_patch.one'),
);
}
@@ -301,6 +319,7 @@ class phpbb_event_php_exporter_test extends phpbb_test_case
array("extract(\$phpbb_dispatcher->trigger_event('dispatch.one', \$vars));"),
array("extract(\$phpbb_dispatcher->trigger_event('dispatch.one', compact(\$var)));"),
array("extract(\$phpbb_dispatcher->trigger_event('dispatch.one', compact(\$array)));"),
+ array("extract(\$phpbb_dispatcher->trigger_event(['dispatch.one'], compact(\$vars)));"),
array("\$phpbb_dispatcher->trigger_event('dis_patch.one', compact(\$vars));", 'dis_patch.one'),
);
}
diff --git a/tests/feed/attachments_base_test.php b/tests/feed/attachments_base_test.php
index dd432d13f5..573218be42 100644
--- a/tests/feed/attachments_base_test.php
+++ b/tests/feed/attachments_base_test.php
@@ -31,13 +31,25 @@ class phpbb_feed_attachments_base_test extends phpbb_database_test_case
$this->filesystem = new \phpbb\filesystem();
$config = new \phpbb\config\config(array());
+ $path_helper = new \phpbb\path_helper(
+ new \phpbb\symfony_request(
+ new phpbb_mock_request()
+ ),
+ $this->filesystem,
+ $this->getMock('\phpbb\request\request'),
+ $phpbb_root_path,
+ 'php'
+ );
$user = new \phpbb\user(
new \phpbb\language\language(
new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
),
'\phpbb\datetime'
);
- $feed_helper = new \phpbb\feed\helper($config, $user, $phpbb_root_path, $phpEx);
+ $container = new phpbb_mock_container_builder();
+ $this->get_test_case_helpers()->set_s9e_services($container);
+ $container->set('feed.quote_helper', new \phpbb\feed\quote_helper($user, $phpbb_root_path, 'php'));
+ $feed_helper = new \phpbb\feed\helper($config, $container, $path_helper, $container->get('text_formatter.renderer'), $user);
$db = $this->new_dbal();
$cache = new \phpbb_mock_cache();
$auth = new \phpbb\auth\auth();
diff --git a/tests/functional/posting_test.php b/tests/functional/posting_test.php
index 8e6328d1d3..764376a945 100644
--- a/tests/functional/posting_test.php
+++ b/tests/functional/posting_test.php
@@ -235,7 +235,7 @@ class phpbb_functional_posting_test extends phpbb_functional_test_case
));
$crawler = self::submit($form);
$this->assertContains(
- '<span style="font-weight: bold">My signature</span>',
+ '<strong class="text-strong">My signature</strong>',
$crawler->filter('#preview .signature')->html()
);
}
diff --git a/tests/template/template_test.php b/tests/template/template_test.php
index 9f2124418d..0f761abc76 100644
--- a/tests/template/template_test.php
+++ b/tests/template/template_test.php
@@ -998,6 +998,46 @@ EOT
$this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Deleting by index out of bounds, ignored');
}
+ public function test_indexed_assign_block_vars()
+ {
+ $this->template->set_filenames(array('test' => 'loop_nested.html'));
+
+ $this->template->assign_var('TEST_MORE', true);
+
+ // @todo Change this
+ $this->template->assign_block_vars('outer', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer.middle', array());
+ $this->template->assign_block_vars('outer.middle', array());
+
+ $expect = 'outer - 0[outer|3]middle - 0[middle|1]outer - 1[outer|3]middle - 0[middle|2]middle - 1[middle|2]outer - 2[outer|3]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Ensuring template is built correctly before modification');
+
+ $this->template->assign_block_vars('outer[0].middle', array('VARIABLE' => 'test'));
+
+ $expect = 'outer - 0[outer|3]middle - 0[middle|2]middle - 1 - test[middle|2]outer - 1[outer|3]middle - 0[middle|2]middle - 1[middle|2]outer - 2[outer|3]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Inserting at the first outer block');
+
+ $this->template->assign_block_vars('outer[1].middle[0].inner', array());
+
+ $expect = 'outer - 0[outer|3]middle - 0[middle|2]middle - 1 - test[middle|2]outer - 1[outer|3]middle - 0[middle|2]inner - 0[inner|1]middle - 1[middle|2]outer - 2[outer|3]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Creating an inner block at the first middle block in the second outer block');
+
+ $this->template->assign_block_vars('outer[1].middle[0].inner', array());
+
+ $expect = 'outer - 0[outer|3]middle - 0[middle|2]middle - 1 - test[middle|2]outer - 1[outer|3]middle - 0[middle|2]inner - 0[inner|2]inner - 1[inner|2]middle - 1[middle|2]outer - 2[outer|3]middle - 0[middle|3]middle - 1[middle|3]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Inserting another inner block in the same place');
+
+ $this->template->assign_block_vars('outer.middle[1].inner', array('VARIABLE' => 'test'));
+
+ $expect = 'outer - 0[outer|3]middle - 0[middle|2]middle - 1 - test[middle|2]outer - 1[outer|3]middle - 0[middle|2]inner - 0[inner|2]inner - 1[inner|2]middle - 1[middle|2]outer - 2[outer|3]middle - 0[middle|3]middle - 1[middle|3]inner - 0 - test[inner|1]middle - 2[middle|3]';
+ $this->assertEquals($expect, str_replace(array("\n", "\r", "\t"), '', $this->display('test')), 'Inserting another inner block in the same place');
+ }
public function assign_block_vars_array_data()
{
diff --git a/tests/template/templates/loop_nested.html b/tests/template/templates/loop_nested.html
index cf099ecc15..5763262781 100644
--- a/tests/template/templates/loop_nested.html
+++ b/tests/template/templates/loop_nested.html
@@ -2,5 +2,8 @@
outer - {outer.S_ROW_COUNT}<!-- IF outer.VARIABLE --> - {outer.VARIABLE}<!-- ENDIF --><!-- IF TEST_MORE -->[{outer.S_BLOCK_NAME}|{outer.S_NUM_ROWS}]<!-- ENDIF -->
<!-- BEGIN middle -->
middle - {outer.middle.S_ROW_COUNT}<!-- IF outer.middle.VARIABLE --> - {outer.middle.VARIABLE}<!-- ENDIF --><!-- IF TEST_MORE -->[{outer.middle.S_BLOCK_NAME}|{outer.middle.S_NUM_ROWS}]<!-- ENDIF -->
+<!-- BEGIN inner -->
+inner - {outer.middle.inner.S_ROW_COUNT}<!-- IF outer.middle.inner.VARIABLE --> - {outer.middle.inner.VARIABLE}<!-- ENDIF --><!-- IF TEST_MORE -->[{outer.middle.inner.S_BLOCK_NAME}|{outer.middle.inner.S_NUM_ROWS}]<!-- ENDIF -->
+<!-- END inner -->
<!-- END middle -->
<!-- END outer -->
diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php
index eb56049515..c9943c4302 100644
--- a/tests/test_framework/phpbb_functional_test_case.php
+++ b/tests/test_framework/phpbb_functional_test_case.php
@@ -572,6 +572,9 @@ class phpbb_functional_test_case extends phpbb_test_case
$config['rand_seed'] = '';
$config['rand_seed_last_update'] = time() + 600;
+ // Prevent new user to have an invalid style
+ $config['default_style'] = 1;
+
// Required by user_add
global $db, $cache, $phpbb_dispatcher, $phpbb_container;
$db = $this->get_db();
diff --git a/tests/text_formatter/s9e/bbcode_merger_test.php b/tests/text_formatter/s9e/bbcode_merger_test.php
new file mode 100644
index 0000000000..815539056b
--- /dev/null
+++ b/tests/text_formatter/s9e/bbcode_merger_test.php
@@ -0,0 +1,280 @@
+<?php
+/**
+*
+* This file is part of the phpBB Forum Software package.
+*
+* @copyright (c) phpBB Limited <https://www.phpbb.com>
+* @license GNU General Public License, version 2 (GPL-2.0)
+*
+* For full copyright and license information, please see
+* the docs/CREDITS.txt file.
+*
+*/
+
+class phpbb_textformatter_s9e_bbcode_merger_test extends phpbb_test_case
+{
+ /**
+ * @dataProvider get_merge_bbcodes_tests
+ */
+ public function test_merge_bbcodes($usage_without, $template_without, $usage_with, $template_with, $expected_usage, $expected_template)
+ {
+ $container = $this->get_test_case_helpers()->set_s9e_services();
+ $factory = $container->get('text_formatter.s9e.factory');
+ $bbcode_merger = new \phpbb\textformatter\s9e\bbcode_merger($factory);
+
+ $without = ['usage' => $usage_without, 'template' => $template_without];
+ $with = ['usage' => $usage_with, 'template' => $template_with];
+ $merged = $bbcode_merger->merge_bbcodes($without, $with);
+
+ // Normalize the expected template's whitespace to match the default indentation
+ $expected_template = str_replace("\n\t\t\t\t", "\n", $expected_template);
+ $expected_template = str_replace("\t", ' ', $expected_template);
+
+ $this->assertSame($expected_usage, $merged['usage']);
+ $this->assertSame($expected_template, $merged['template']);
+ }
+
+ public function get_merge_bbcodes_tests()
+ {
+ return [
+ [
+ '[x]{TEXT}[/x]',
+ '<b>{TEXT}</b>',
+
+ '[x={TEXT1}]{TEXT}[/x]',
+ '<b title="{TEXT1}">{TEXT}</b>',
+
+ '[x={TEXT1?}]{TEXT}[/x]',
+ '<b>
+ <xsl:if test="@x">
+ <xsl:attribute name="title">
+ <xsl:value-of select="@x"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </b>'
+ ],
+ [
+ // The tokens' numbering differs between versions
+ '[x]{TEXT}[/x]',
+ '<b>{TEXT}</b>',
+
+ '[x={TEXT1}]{TEXT2}[/x]',
+ '<b title="{TEXT1}">{TEXT2}</b>',
+
+ '[x={TEXT1?}]{TEXT2}[/x]',
+ '<b>
+ <xsl:if test="@x">
+ <xsl:attribute name="title">
+ <xsl:value-of select="@x"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </b>'
+ ],
+ [
+ '[x]{URL}[/x]',
+ '<a href="{URL}">{URL}</a>',
+
+ '[x={URL}]{TEXT}[/x]',
+ '<a href="{URL}">{TEXT}</a>',
+
+ '[x={URL;useContent}]{TEXT}[/x]',
+ '<a href="{@x}">
+ <xsl:apply-templates/>
+ </a>'
+ ],
+ [
+ '[x]{URL}[/x]',
+ '<a href="{URL}">{L_GO_TO}: {URL}</a>',
+
+ '[x={URL}]{TEXT}[/x]',
+ '<a href="{URL}">{L_GO_TO}: {TEXT}</a>',
+
+ '[x={URL;useContent}]{TEXT}[/x]',
+ '<a href="{@x}">{L_GO_TO}: <xsl:apply-templates/></a>'
+ ],
+ [
+ // Test that unsafe BBCodes can still be merged
+ '[script]{TEXT}[/script]',
+ '<script>{TEXT}</script>',
+
+ '[script={TEXT1}]{TEXT2}[/script]',
+ '<script type="{TEXT1}">{TEXT2}</script>',
+
+ '[script={TEXT1?}]{TEXT2}[/script]',
+ '<script>
+ <xsl:if test="@script">
+ <xsl:attribute name="type">
+ <xsl:value-of select="@script"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates/>
+ </script>'
+ ],
+ [
+ // https://www.phpbb.com/community/viewtopic.php?p=14848281#p14848281
+ '[note]{TEXT}[/note]',
+ '<span class="prime_bbcode_note_spur" onmouseover="show_note(this);" onmouseout="hide_note(this);" onclick="lock_note(this);"></span><span class="prime_bbcode_note">{TEXT}</span>',
+
+ '[note={TEXT1}]{TEXT2}[/note]',
+ '<span class="prime_bbcode_note_text" onmouseover="show_note(this);" onmouseout="hide_note(this);" onclick="lock_note(this);">{TEXT1}</span><span class="prime_bbcode_note_spur" onmouseover="show_note(this);" onmouseout="hide_note(this);" onclick="lock_note(this);"></span><span class="prime_bbcode_note">{TEXT2}</span>',
+
+ '[note={TEXT1?}]{TEXT2}[/note]',
+ '<xsl:if test="@note">
+ <span class="prime_bbcode_note_text" onmouseover="show_note(this);" onmouseout="hide_note(this);" onclick="lock_note(this);">
+ <xsl:value-of select="@note"/>
+ </span>
+ </xsl:if>
+ <span class="prime_bbcode_note_spur" onmouseover="show_note(this);" onmouseout="hide_note(this);" onclick="lock_note(this);"/>
+ <span class="prime_bbcode_note">
+ <xsl:apply-templates/>
+ </span>'
+ ],
+ [
+ // https://www.phpbb.com/community/viewtopic.php?p=14768441#p14768441
+ '[MI]{TEXT}[/MI]',
+ '<span style="color:red">MI:</span> <span style="color:#f6efe2">{TEXT}</span>',
+
+ '[MI={TEXT2}]{TEXT1}[/MI]',
+ '<span style="color:red">MI for: "{TEXT2}":</span> <span style="color:#f6efe2">{TEXT1}</span>',
+
+ '[MI={TEXT2?}]{TEXT1}[/MI]',
+ '<span style="color:red">MI<xsl:if test="@mi"> for: "<xsl:value-of select="@mi"/>"</xsl:if>:</span>
+ <xsl:text> </xsl:text>
+ <span style="color:#f6efe2">
+ <xsl:apply-templates/>
+ </span>'
+ ],
+ [
+ // https://www.phpbb.com/community/viewtopic.php?p=14700506#p14700506
+ '[spoiler]{TEXT}[/spoiler]',
+ '<span class="spoiler"> {TEXT}</span>',
+
+ '[spoiler={TEXT1}]{TEXT2}[/spoiler]',
+ '<div class="spoiler"><small> {TEXT1}</small>{TEXT2}</div>',
+
+ '[spoiler={TEXT1?}]{TEXT2}[/spoiler]',
+ '<xsl:choose>
+ <xsl:when test="@spoiler">
+ <div class="spoiler">
+ <small>
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@spoiler"/>
+ </small>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="spoiler">
+ <xsl:text> </xsl:text>
+ <xsl:apply-templates/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>'
+ ],
+ [
+ // https://www.phpbb.com/community/viewtopic.php?p=14859676#p14859676
+ '[AE]{TEXT}[/AE]',
+ '<table width="100%" border="1">
+ <tr><td width="100%" align="center">
+ <table width="100%" border="0">
+ <tr>
+ <td width="100%" bgcolor="#E1E4F2">
+ <table width="100%" border="0" bgcolor="#F5F5FF">
+ <tr>
+ <td width="1%" bgcolor="#000000" nowrap align="left">
+ <font color="#FFFFFF" face="Arial"><font size="1"><b>&nbsp;ACTIVE EFFECTS & CONDITIONS&nbsp;</b></font></font></td>
+ <td width="99%">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="100%" bgcolor="#FFE5BA" colspan="2">
+ <table width="100%" cellpadding="2">
+ <tr>
+ <td width="100%" align="left" valign="top">
+ {TEXT}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+ <p>&nbsp;</p>',
+
+ '[AE={TEXT1}]{TEXT2}[/AE]',
+ '<table width="100%" border="1">
+ <tr><td width="100%" align="center">
+ <table width="100%" border="0">
+ <tr>
+ <td width="100%" bgcolor="#E1E4F2">
+ <table width="100%" border="0" bgcolor="#F5F5FF">
+ <tr>
+ <td width="1%" bgcolor="#000000" nowrap align="left">
+ <font color="#FFFFFF" face="Arial"><font size="1"><b>&nbsp; {TEXT1}&nbsp;</b></font></font></td>
+ <td width="99%">&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="100%" bgcolor="#FFE5BA" colspan="2">
+ <table width="100%" cellpadding="2">
+ <tr>
+ <td width="100%" align="left" valign="top">
+ {TEXT2}
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td></tr>
+ </table>
+ <p>&nbsp;</p>',
+
+ '[AE={TEXT1?}]{TEXT2}[/AE]',
+ '<table width="100%" border="1">
+ <tr>
+ <td width="100%" align="center">
+ <table width="100%" border="0">
+ <tr>
+ <td width="100%" bgcolor="#E1E4F2">
+ <table width="100%" border="0" bgcolor="#F5F5FF">
+ <tr>
+ <td width="1%" bgcolor="#000000" nowrap="nowrap" align="left">
+ <font color="#FFFFFF" face="Arial">
+ <font size="1">
+ <b> <xsl:choose><xsl:when test="@ae"><xsl:text> </xsl:text><xsl:value-of select="@ae"/></xsl:when><xsl:otherwise>ACTIVE EFFECTS &amp; CONDITIONS</xsl:otherwise></xsl:choose> </b>
+ </font>
+ </font>
+ </td>
+ <td width="99%"> </td>
+ </tr>
+ <tr>
+ <td width="100%" bgcolor="#FFE5BA" colspan="2">
+ <table width="100%" cellpadding="2">
+ <tr>
+ <td width="100%" align="left" valign="top">
+ <xsl:apply-templates/>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <p> </p>'
+ ],
+ ];
+ }
+}
diff --git a/tests/text_formatter/s9e/default_formatting_test.php b/tests/text_formatter/s9e/default_formatting_test.php
index a0c57214e4..8887b9daee 100644
--- a/tests/text_formatter/s9e/default_formatting_test.php
+++ b/tests/text_formatter/s9e/default_formatting_test.php
@@ -50,27 +50,27 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
return array(
array(
'[b]bold[/b]',
- '<span style="font-weight: bold">bold</span>'
+ '<span style="font-weight:bold">bold</span>'
),
array(
'[u]underlined[/u]',
- '<span style="text-decoration: underline">underlined</span>'
+ '<span style="text-decoration:underline">underlined</span>'
),
array(
'[i]italic[/i]',
- '<span style="font-style: italic">italic</span>'
+ '<span style="font-style:italic">italic</span>'
),
array(
'[color=#FF0000]colored[/color]',
- '<span style="color: #FF0000">colored</span>'
+ '<span style="color:#FF0000">colored</span>'
),
array(
'[color=red]colored[/color]',
- '<span style="color: red">colored</span>'
+ '<span style="color:red">colored</span>'
),
array(
'[size=75]smaller[/size]',
- '<span style="font-size: 75%; line-height: normal">smaller</span>'
+ '<span style="font-size:75%;line-height:normal">smaller</span>'
),
array(
'[quote]quoted[/quote]',
@@ -102,31 +102,31 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
),
array(
'[list=1][*]item[/list]',
- '<ol style="list-style-type: decimal"><li>item</li></ol>'
+ '<ol style="list-style-type:decimal"><li>item</li></ol>'
),
array(
'[list=a][*]item[/list]',
- '<ol style="list-style-type: lower-alpha"><li>item</li></ol>'
+ '<ol style="list-style-type:lower-alpha"><li>item</li></ol>'
),
array(
'[list=i][*]item[/list]',
- '<ol style="list-style-type: lower-roman"><li>item</li></ol>'
+ '<ol style="list-style-type:lower-roman"><li>item</li></ol>'
),
array(
'[list=I][*]item[/list]',
- '<ol style="list-style-type: upper-roman"><li>item</li></ol>'
+ '<ol style="list-style-type:upper-roman"><li>item</li></ol>'
),
array(
'[list=disc][*]item[/list]',
- '<ul style="list-style-type: disc"><li>item</li></ul>'
+ '<ul style="list-style-type:disc"><li>item</li></ul>'
),
array(
'[list=circle][*]item[/list]',
- '<ul style="list-style-type: circle"><li>item</li></ul>'
+ '<ul style="list-style-type:circle"><li>item</li></ul>'
),
array(
'[list=square][*]item[/list]',
- '<ul style="list-style-type: square"><li>item</li></ul>'
+ '<ul style="list-style-type:square"><li>item</li></ul>'
),
array(
'[img]https://area51.phpbb.com/images/area51.png[/img]',
@@ -180,17 +180,17 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
array(
// Allow textual bbcodes in textual bbcodes
'[b]bold [i]bold + italic[/i][/b]',
- '<span style="font-weight: bold">bold <span style="font-style: italic">bold + italic</span></span>'
+ '<span style="font-weight:bold">bold <span style="font-style:italic">bold + italic</span></span>'
),
array(
// Allow textual bbcodes in url with description
'[url=https://area51.phpbb.com/]Area51 [i]italic[/i][/url]',
- '<a href="https://area51.phpbb.com/" class="postlink">Area51 <span style="font-style: italic">italic</span></a>'
+ '<a href="https://area51.phpbb.com/" class="postlink">Area51 <span style="font-style:italic">italic</span></a>'
),
array(
// Allow url with description in textual bbcodes
'[i]italic [url=https://area51.phpbb.com/]Area51[/url][/i]',
- '<span style="font-style: italic">italic <a href="https://area51.phpbb.com/" class="postlink">Area51</a></span>'
+ '<span style="font-style:italic">italic <a href="https://area51.phpbb.com/" class="postlink">Area51</a></span>'
),
array(
// Do not parse textual bbcodes in code
@@ -205,7 +205,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
array(
// Textual bbcode nesting into textual bbcode
'[b]bold [i]bold + italic[/b] italic[/i]',
- '<span style="font-weight: bold">bold <span style="font-style: italic">bold + italic</span></span><span style="font-style: italic"> italic</span>'
+ '<span style="font-weight:bold">bold <span style="font-style:italic">bold + italic</span></span><span style="font-style:italic"> italic</span>'
),
array(
"[code]\tline1\n line2[/code]",
@@ -298,7 +298,7 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
),
array(
"Emoji: \xF0\x9F\x98\x80",
- 'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/emojione/assets/svg/1f600.svg">'
+ 'Emoji: <img alt="' . "\xF0\x9F\x98\x80" . '" class="emoji smilies" draggable="false" src="//cdn.jsdelivr.net/emojione/assets/3.1/png/64/1f600.png">'
),
array(
"Emoji: \xF0\x9F\x98\x80",
diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php
index fd9b4e4c09..d35330a975 100644
--- a/tests/text_formatter/s9e/factory_test.php
+++ b/tests/text_formatter/s9e/factory_test.php
@@ -248,6 +248,22 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
}
/**
+ * @testdox Accepts unsafe default BBCodes
+ */
+ public function test_unsafe_default_bbcodes()
+ {
+ $fixture = __DIR__ . '/fixtures/unsafe_default_bbcodes.xml';
+ $style_dir = __DIR__ . '/fixtures/styles/';
+ $container = $this->get_test_case_helpers()->set_s9e_services(null, $fixture, $style_dir);
+ $parser = $container->get('text_formatter.parser');
+ $renderer = $container->get('text_formatter.renderer');
+
+ $original = '[b]alert(1)[/b]';
+ $expected = '<script>alert(1)</script>';
+ $this->assertSame($expected, $renderer->render($parser->parse($original)));
+ }
+
+ /**
* @testdox get_configurator() triggers events before and after configuration
*/
public function test_configure_events()
diff --git a/tests/text_formatter/s9e/fixtures/styles/unsafe/template/bbcode.html b/tests/text_formatter/s9e/fixtures/styles/unsafe/template/bbcode.html
new file mode 100644
index 0000000000..f3932f9b78
--- /dev/null
+++ b/tests/text_formatter/s9e/fixtures/styles/unsafe/template/bbcode.html
@@ -0,0 +1,40 @@
+<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open -->
+<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default -->
+<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
+
+<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open -->
+<!-- BEGIN olist_close --></ol><!-- END olist_close -->
+
+<!-- BEGIN listitem --><li><!-- END listitem -->
+<!-- BEGIN listitem_close --></li><!-- END listitem_close -->
+
+<!-- BEGIN quote_username_open --><blockquote><div><cite>{USERNAME} {L_WROTE}{L_COLON}</cite><!-- END quote_username_open -->
+<!-- BEGIN quote_open --><blockquote class="uncited"><div><!-- END quote_open -->
+<!-- BEGIN quote_close --></div></blockquote><!-- END quote_close -->
+
+<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><code><!-- END code_open -->
+<!-- BEGIN code_close --></code></div><!-- END code_close -->
+
+<!-- BEGIN inline_attachment_open --><div class="inline-attachment"><!-- END inline_attachment_open -->
+<!-- BEGIN inline_attachment_close --></div><!-- END inline_attachment_close -->
+
+<!-- BEGIN b_open --><script><!-- END b_open -->
+<!-- BEGIN b_close --></script><!-- END b_close -->
+
+<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
+<!-- BEGIN u_close --></span><!-- END u_close -->
+
+<!-- BEGIN i_open --><em><!-- END i_open -->
+<!-- BEGIN i_close --></em><!-- END i_close -->
+
+<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color -->
+
+<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: 116%;">{TEXT}</span><!-- END size -->
+
+<!-- BEGIN img --><img src="{URL}" class="postimage" alt="{L_IMAGE}" /><!-- END img -->
+
+<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
+
+<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->
+
+<!-- BEGIN flash --><object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}"><param name="movie" value="{URL}" /><param name="play" value="false" /><param name="loop" value="false" /><param name="quality" value="high" /><param name="allowScriptAccess" value="never" /><param name="allowNetworking" value="internal" /><embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="false" loop="false" quality="high" allowscriptaccess="never" allownetworking="internal"></embed></object><!-- END flash -->
diff --git a/tests/text_formatter/s9e/fixtures/unsafe_default_bbcodes.xml b/tests/text_formatter/s9e/fixtures/unsafe_default_bbcodes.xml
new file mode 100644
index 0000000000..06524a13cc
--- /dev/null
+++ b/tests/text_formatter/s9e/fixtures/unsafe_default_bbcodes.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<dataset>
+ <table name="phpbb_styles">
+ <column>style_id</column>
+ <column>style_name</column>
+ <column>style_copyright</column>
+ <column>style_active</column>
+ <column>style_path</column>
+ <column>bbcode_bitfield</column>
+ <column>style_parent_id</column>
+ <column>style_parent_tree</column>
+
+ <row>
+ <value>1</value>
+ <value>unsafe</value>
+ <value></value>
+ <value>1</value>
+ <value>unsafe</value>
+ <value>QA==</value>
+ <value>0</value>
+ <value></value>
+ </row>
+ </table>
+</dataset>
diff --git a/tests/text_processing/tickets_data/PHPBB3-10122.html b/tests/text_processing/tickets_data/PHPBB3-10122.html
index f0fb6115b2..0803c895a8 100644
--- a/tests/text_processing/tickets_data/PHPBB3-10122.html
+++ b/tests/text_processing/tickets_data/PHPBB3-10122.html
@@ -1 +1 @@
-<ul style="list-style-type: none"><li>This is my indented text</li></ul> \ No newline at end of file
+<ul style="list-style-type:none"><li>This is my indented text</li></ul> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-10268.html b/tests/text_processing/tickets_data/PHPBB3-10268.html
index c89e63f9a3..13b71b4823 100644
--- a/tests/text_processing/tickets_data/PHPBB3-10268.html
+++ b/tests/text_processing/tickets_data/PHPBB3-10268.html
@@ -1,4 +1,4 @@
<blockquote><div><cite><a href="http://phpbb.com" class="postlink">http://phpbb.com</a> wrote:</cite>...</div></blockquote>
<blockquote><div><cite><a href="http://phpbb.com" class="postlink"> http://phpbb.com</a> wrote:</cite>...</div></blockquote>
-<span style="font-weight: bold"><a href="http://phpbb.com" class="postlink">http://phpbb.com</a></span><br>
-<span style="font-weight: bold"> <a href="http://phpbb.com" class="postlink">http://phpbb.com</a></span><br>
+<span style="font-weight:bold"><a href="http://phpbb.com" class="postlink">http://phpbb.com</a></span><br>
+<span style="font-weight:bold"> <a href="http://phpbb.com" class="postlink">http://phpbb.com</a></span><br>
diff --git a/tests/text_processing/tickets_data/PHPBB3-13641.html b/tests/text_processing/tickets_data/PHPBB3-13641.html
index 1bd1c06dbb..2646bc0ea5 100644
--- a/tests/text_processing/tickets_data/PHPBB3-13641.html
+++ b/tests/text_processing/tickets_data/PHPBB3-13641.html
@@ -1 +1 @@
-<code>[color=#FF0000]</code> - <span style="color: #FF0000">red</span> \ No newline at end of file
+<code>[color=#FF0000]</code> - <span style="color:#FF0000">red</span> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-13921.html b/tests/text_processing/tickets_data/PHPBB3-13921.html
index 6a9dc7f504..690668ef28 100644
--- a/tests/text_processing/tickets_data/PHPBB3-13921.html
+++ b/tests/text_processing/tickets_data/PHPBB3-13921.html
@@ -1 +1 @@
-<span style="font-size: 200%; line-height: normal"></span><div style="text-align:center"><span style="font-size: 200%; line-height: normal">xxx</span></div> \ No newline at end of file
+<span style="font-size:200%;line-height:normal"></span><div style="text-align:center"><span style="font-size:200%;line-height:normal">xxx</span></div> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-14706.html b/tests/text_processing/tickets_data/PHPBB3-14706.html
index b8f74c9e93..23b3304485 100644
--- a/tests/text_processing/tickets_data/PHPBB3-14706.html
+++ b/tests/text_processing/tickets_data/PHPBB3-14706.html
@@ -1 +1 @@
-<ul><li><ol style="list-style-type: lower-alpha"><li>a</li><li>b</li><li>c</li><li>d</li><li>e</li></ol></li><li>outer</li></ul> \ No newline at end of file
+<ul><li><ol style="list-style-type:lower-alpha"><li>a</li><li>b</li><li>c</li><li>d</li><li>e</li></ol></li><li>outer</li></ul> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-14790.html b/tests/text_processing/tickets_data/PHPBB3-14790.html
index 7624b2d36c..5384098e1b 100644
--- a/tests/text_processing/tickets_data/PHPBB3-14790.html
+++ b/tests/text_processing/tickets_data/PHPBB3-14790.html
@@ -1,4 +1,4 @@
-<span style="color: #0000FF"></span><ul><li><span style="color: #0000FF">text</span></li>
-<li><span style="color: #0000FF">text</span></li>
-<li><span style="color: #0000FF">text</span></li>
-<li><span style="color: #0000FF">text</span></li></ul> \ No newline at end of file
+<span style="color:#0000FF"></span><ul><li><span style="color:#0000FF">text</span></li>
+<li><span style="color:#0000FF">text</span></li>
+<li><span style="color:#0000FF">text</span></li>
+<li><span style="color:#0000FF">text</span></li></ul> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-14846.html b/tests/text_processing/tickets_data/PHPBB3-14846.html
index 461ca25bc6..bd4455781b 100644
--- a/tests/text_processing/tickets_data/PHPBB3-14846.html
+++ b/tests/text_processing/tickets_data/PHPBB3-14846.html
@@ -1 +1 @@
-<div style="padding: .2em .5em; font-size: .8em; width: 200px; background: #FFD;">moderator text<div style="font-weight: bold; text-align: right">- Mickroz</div></div> \ No newline at end of file
+<div style="padding:.2em .5em;font-size:.8em;width:200px;background:#ffd">moderator text<div style="font-weight:bold;text-align:right">- Mickroz</div></div> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-15348.html b/tests/text_processing/tickets_data/PHPBB3-15348.html
index e65925ec28..5d44c07899 100644
--- a/tests/text_processing/tickets_data/PHPBB3-15348.html
+++ b/tests/text_processing/tickets_data/PHPBB3-15348.html
@@ -1 +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
+<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/3.1/png/64/1f197.png"> \ No newline at end of file
diff --git a/tests/text_processing/tickets_data/PHPBB3-8419.html b/tests/text_processing/tickets_data/PHPBB3-8419.html
index 38df626a94..df91e9df50 100644
--- a/tests/text_processing/tickets_data/PHPBB3-8419.html
+++ b/tests/text_processing/tickets_data/PHPBB3-8419.html
@@ -1 +1 @@
-<span style="font-style: italic"><span style="font-weight: bold"><span style="color: #FF0000">tę </span></span></span>przykład \ No newline at end of file
+<span style="font-style:italic"><span style="font-weight:bold"><span style="color:red">tę </span></span></span>przykład \ No newline at end of file
diff --git a/tests/text_reparser/base_test.php b/tests/text_reparser/base_test.php
index af2d56ea51..2c6844b063 100644
--- a/tests/text_reparser/base_test.php
+++ b/tests/text_reparser/base_test.php
@@ -66,4 +66,19 @@ class phpbb_textreparser_base_test extends phpbb_database_test_case
$this->get_rows(array(1))
);
}
+
+ public function test_reparse_case_insensitive()
+ {
+ $this->get_reparser()->reparse_range(2, 2);
+
+ $this->assertEquals(
+ [
+ [
+ 'id' => '2',
+ 'text' => '<r><IMG src="img.png"><s>[IMG]</s>img.png<e>[/IMG]</e></IMG></r>'
+ ]
+ ],
+ $this->get_rows([2])
+ );
+ }
}
diff --git a/tests/text_reparser/fixtures/base.xml b/tests/text_reparser/fixtures/base.xml
index a4921a8823..532a19a8a9 100644
--- a/tests/text_reparser/fixtures/base.xml
+++ b/tests/text_reparser/fixtures/base.xml
@@ -15,5 +15,13 @@
<value></value>
<value>abcd1234</value>
</row>
+ <row>
+ <value>2</value>
+ <value>1</value>
+ <value>1</value>
+ <value>1</value>
+ <value><![CDATA[<r><IMG src="img.png"><s>[IMG]</s>img.png<e>[/IMG]</e></IMG></r>]]></value>
+ <value></value>
+ </row>
</table>
</dataset>