aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_logs.html2
-rw-r--r--phpBB/adm/style/admin.css9
-rw-r--r--phpBB/adm/style/timezone_option.html14
-rw-r--r--phpBB/assets/javascript/core.js6
-rw-r--r--phpBB/assets/javascript/editor.js4
-rw-r--r--phpBB/docs/CHANGELOG.html153
-rw-r--r--phpBB/docs/events.md32
-rw-r--r--phpBB/feed.php1
-rw-r--r--phpBB/includes/acp/acp_ban.php81
-rw-r--r--phpBB/includes/acp/acp_board.php7
-rw-r--r--phpBB/includes/acp/acp_database.php4
-rw-r--r--phpBB/includes/acp/acp_icons.php2
-rw-r--r--phpBB/includes/acp/acp_users.php4
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/functions.php78
-rw-r--r--phpBB/includes/functions_acp.php1
-rw-r--r--phpBB/includes/functions_compatibility.php32
-rw-r--r--phpBB/includes/functions_compress.php4
-rw-r--r--phpBB/includes/functions_display.php57
-rw-r--r--phpBB/includes/functions_download.php6
-rw-r--r--phpBB/includes/functions_privmsgs.php2
-rw-r--r--phpBB/includes/functions_user.php41
-rw-r--r--phpBB/includes/mcp/mcp_ban.php112
-rw-r--r--phpBB/includes/mcp/mcp_warn.php16
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php2
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewmessage.php7
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php4
-rw-r--r--phpBB/includes/ucp/ucp_register.php4
-rw-r--r--phpBB/install/convertors/convert_phpbb20.php2
-rw-r--r--phpBB/install/index.php1
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/acp/email.php2
-rw-r--r--phpBB/language/en/acp/profile.php6
-rw-r--r--phpBB/language/en/common.php54
-rw-r--r--phpBB/language/en/ucp.php5
-rw-r--r--phpBB/memberlist.php23
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php2
-rw-r--r--phpBB/phpbb/controller/helper.php14
-rw-r--r--phpBB/phpbb/datetime.php39
-rw-r--r--phpBB/phpbb/db/migration/data/v310/profilefield_field_validation_length.php90
-rw-r--r--phpBB/phpbb/db/migration/data/v310/rc4.php32
-rw-r--r--phpBB/phpbb/db/tools.php2
-rw-r--r--phpBB/phpbb/di/pass/kernel_pass.php67
-rw-r--r--phpBB/phpbb/profilefields/type/type_base.php2
-rw-r--r--phpBB/phpbb/profilefields/type/type_string_common.php9
-rw-r--r--phpBB/phpbb/session.php7
-rw-r--r--phpBB/phpbb/template/base.php6
-rw-r--r--phpBB/phpbb/user.php2
-rw-r--r--phpBB/phpbb/user_loader.php7
-rw-r--r--phpBB/search.php100
-rw-r--r--phpBB/styles/prosilver/style.cfg4
-rw-r--r--phpBB/styles/prosilver/template/forumlist_body.html4
-rw-r--r--phpBB/styles/prosilver/template/search_results.html8
-rw-r--r--phpBB/styles/prosilver/template/timezone_option.html14
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html2
-rw-r--r--phpBB/styles/prosilver/theme/cp.css2
-rw-r--r--phpBB/styles/prosilver/theme/forms.css6
-rw-r--r--phpBB/styles/prosilver/theme/responsive.css25
-rw-r--r--phpBB/styles/subsilver2/style.cfg4
-rw-r--r--phpBB/styles/subsilver2/template/forumlist_body.html4
-rw-r--r--phpBB/styles/subsilver2/template/timezone_option.html14
-rw-r--r--phpBB/viewtopic.php10
62 files changed, 868 insertions, 390 deletions
diff --git a/phpBB/adm/style/acp_logs.html b/phpBB/adm/style/acp_logs.html
index 4f67f46e24..76ea801de0 100644
--- a/phpBB/adm/style/acp_logs.html
+++ b/phpBB/adm/style/acp_logs.html
@@ -8,7 +8,7 @@
<form id="list" method="post" action="{U_ACTION}">
-<fieldset class="display-options" style="float: left">
+<fieldset class="display-options search-box">
{L_SEARCH_KEYWORDS}{L_COLON} <input type="text" name="keywords" value="{S_KEYWORDS}" />&nbsp;<input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
</fieldset>
diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css
index b83750875a..b03cb0ba24 100644
--- a/phpBB/adm/style/admin.css
+++ b/phpBB/adm/style/admin.css
@@ -109,6 +109,14 @@ hr {
text-align: center;
}
+.search-box {
+ float: left;
+}
+
+.rtl .search-box {
+ float: right;
+}
+
.small {
font-size: 0.85em;
}
@@ -1773,6 +1781,7 @@ li.pagination ul {
margin: 10px 0;
color: #FFFFFF;
text-align: center;
+ clear: both;
}
.success {
diff --git a/phpBB/adm/style/timezone_option.html b/phpBB/adm/style/timezone_option.html
index 7a799b69c6..acfff30184 100644
--- a/phpBB/adm/style/timezone_option.html
+++ b/phpBB/adm/style/timezone_option.html
@@ -1,17 +1,25 @@
<dl>
<dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
- <!-- IF S_TZ_DATE_OPTIONS -->
+ <!-- IF .timezone_date -->
<dd id="tz_select_date" style="display: none;">
<select name="tz_date" id="tz_date" class="autowidth tz_select">
<option value="">{L_SELECT_CURRENT_TIME}</option>
- {S_TZ_DATE_OPTIONS}
+ <!-- BEGIN timezone_date -->
+ <option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
+ <!-- END timezone_date -->
</select>
</dd>
<!-- ENDIF -->
<dd>
<select name="tz" id="timezone" class="autowidth tz_select">
<option value="">{L_SELECT_TIMEZONE}</option>
- {S_TZ_OPTIONS}
+ <!-- BEGIN timezone_select -->
+ <optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
+ <!-- BEGIN timezone_options -->
+ <option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
+ <!-- END timezone_options -->
+ </optgroup>
+ <!-- END timezone_select -->
</select>
<!-- INCLUDEJS timezone.js -->
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index b5187991f9..6ddbba7515 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -786,7 +786,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
}
if ($tzDate.val() !== '') {
- $timezone.children('optgroup').remove(':not([label="' + $('#tz_date').val() + '"])');
+ $timezone.children('optgroup').remove(':not([data-tz-value="' + $('#tz_date').val() + '"])');
}
if ($tzDate.val() === $tzSelectDateSuggest.attr('data-suggested-tz')) {
@@ -795,7 +795,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
$tzSelectDateSuggest.css('display', 'inline');
}
- var $tzOptions = $timezone.children('optgroup[label="' + $tzDate.val() + '"]').children('option');
+ var $tzOptions = $timezone.children('optgroup[data-tz-value="' + $tzDate.val() + '"]').children('option');
if ($tzOptions.length === 1) {
// If there is only one timezone for the selected date, we just select that automatically.
@@ -849,7 +849,7 @@ phpbb.timezonePreselectSelect = function(forceSelector) {
minutes = minutes.toString();
}
- var prefix = 'GMT' + sign + hours + ':' + minutes;
+ var prefix = 'UTC' + sign + hours + ':' + minutes;
var prefixLength = prefix.length;
var selectorOptions = $('option', '#tz_date');
var i;
diff --git a/phpBB/assets/javascript/editor.js b/phpBB/assets/javascript/editor.js
index dfc7dab525..5fd4f7eae3 100644
--- a/phpBB/assets/javascript/editor.js
+++ b/phpBB/assets/javascript/editor.js
@@ -266,10 +266,6 @@ function mozWrap(txtarea, open, close) {
var selEnd = txtarea.selectionEnd;
var scrollTop = txtarea.scrollTop;
- if (selEnd === 1 || selEnd === 2) {
- selEnd = selLength;
- }
-
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd);
var s3 = (txtarea.value).substring(selEnd, selLength);
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index d882d2e3f4..7b46129c6c 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -46,6 +46,7 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
+ <li><a href="#v310RC3">Changes since 3.1.0-RC3</a></li>
<li><a href="#v310RC2">Changes since 3.1.0-RC2</a></li>
<li><a href="#v310RC1">Changes since 3.1.0-RC1</a></li>
<li><a href="#v310b4">Changes since 3.1.0-b4</a></li>
@@ -96,7 +97,97 @@
<div class="content">
- <a name="v310RC2"></a><h3>1.i. Changes since 3.1.0-RC2</h3>
+ <a name="v310RC3"></a><h3>1.i. Changes since 3.1.0-RC3</h3>
+
+ <h4>Bug</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10472">PHPBB3-10472</a>] - ACP &quot;add multiple smilies&quot; page is unusable on 1024x768 resolution</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11909">PHPBB3-11909</a>] - phpbb/db/migrator::load_migrations is never called</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12258">PHPBB3-12258</a>] - Add attachment: error alert popup on &quot;empty.png&quot; does not show up</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12506">PHPBB3-12506</a>] - Long post titles bump the username down an extra row beneath the edit/quote/delete buttons</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12658">PHPBB3-12658</a>] - Add tests for config:* cli commands</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12661">PHPBB3-12661</a>] - Extensions templates not loaded from &quot;all&quot; by helper/render()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12734">PHPBB3-12734</a>] - Custom profile manager should not suppress errors when inserting user rows</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12765">PHPBB3-12765</a>] - acp_profile.php should use db/tools</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12852">PHPBB3-12852</a>] - \phpbb\path_helper get_url_parts does not handle get variable with no value</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12856">PHPBB3-12856</a>] - plupload images are not integrated into style-path</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12862">PHPBB3-12862</a>] - Smiley and Whos Onlike pop-up boxes are making styling difficult</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12949">PHPBB3-12949</a>] - Undefined function mime_content_type()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12966">PHPBB3-12966</a>] - Undefined sorting of posts with same post_time on postgres</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12975">PHPBB3-12975</a>] - Catchable fatal error after update to RC3</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12976">PHPBB3-12976</a>] - Pagination of UCP manage attachments page in prosilver does not support plural forms</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12983">PHPBB3-12983</a>] - UCP preferences, Display posts ordering by: input is not properly validated</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12984">PHPBB3-12984</a>] - Index page: blank line when no forum description shown</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12986">PHPBB3-12986</a>] - Wrong functions call order breaks detection of common words in search</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12990">PHPBB3-12990</a>] - The prefix for the notification's services is harcoded</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12996">PHPBB3-12996</a>] - tests/lock/flock_test.php should use microtime() instead of time()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12998">PHPBB3-12998</a>] - Undefined $lang in mcp_warn.php::add_warning()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13004">PHPBB3-13004</a>] - Topic tools button is displayed even if dropdown is empty</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13008">PHPBB3-13008</a>] - Importing a resource in routing.yml breaks download/file.php and ACP</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13009">PHPBB3-13009</a>] - Cleanup Tweaks CSS, Remove outdated browser support</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13018">PHPBB3-13018</a>] - Key binding on AJAX popups are not unbound upon close/cancel</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13019">PHPBB3-13019</a>] - Don't display &quot;Soft delete reason&quot; dialog when moderator cannot soft-delete</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13022">PHPBB3-13022</a>] - &quot;Return to advanced search&quot; wrong assumption </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13031">PHPBB3-13031</a>] - Impossible to properly upload image if no proper mimetype guessers enabled</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13035">PHPBB3-13035</a>] - Empty meta tags in header</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13040">PHPBB3-13040</a>] - W3C validator warning in overral_footer.html</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13042">PHPBB3-13042</a>] - Unused var in login_box()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13044">PHPBB3-13044</a>] - Expires header violates RFC 2616</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13046">PHPBB3-13046</a>] - In download/avatar we don't load the vendors added by the extensions</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13050">PHPBB3-13050</a>] - Allow topic/forum subscription when email and jabber are off</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13051">PHPBB3-13051</a>] - Fix broken viewonline core event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13052">PHPBB3-13052</a>] - Remove additional parameters from check_form_key()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13057">PHPBB3-13057</a>] - Fatal error on previous page link after closing a report</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13065">PHPBB3-13065</a>] - Unknown column 'user_pass_convert' in 'field list' [code] - =&gt; 1054 </li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13068">PHPBB3-13068</a>] - Language correction in FIELD_IS_CONTACT_EXPLAIN</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13069">PHPBB3-13069</a>] - Timezone selector does not filter locations on change</li>
+ </ul>
+ <h4>Improvement</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12416">PHPBB3-12416</a>] - WhoIs Pop Up Page Details</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12598">PHPBB3-12598</a>] - Improve action-bar search box styling</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12653">PHPBB3-12653</a>] - Caches the informations about the listeners to be able to not load them everytime</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12900">PHPBB3-12900</a>] - 3.1.0 avatar scaling</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12943">PHPBB3-12943</a>] - Add core.phpbb_generate_debug_output core event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12961">PHPBB3-12961</a>] - Add link in anti-spam ACP page which links directly to captchas in titania</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12969">PHPBB3-12969</a>] - Add template event around the find username link on composing pm</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12982">PHPBB3-12982</a>] - JS in 3.1 is nasty</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12989">PHPBB3-12989</a>] - Remove unused &quot;created_by.jpg&quot; from prosilver</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12991">PHPBB3-12991</a>] - Have events after/before &quot;add warning&quot; field - user and post</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12994">PHPBB3-12994</a>] - Add core event to viewtopic.php before sending vars to template</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13003">PHPBB3-13003</a>] - Missing language keys in command &quot;extension:show&quot;</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13005">PHPBB3-13005</a>] - Add core event to display_forums() to modify category template data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13006">PHPBB3-13006</a>] - Add variables to the 'core.modify_quickmod_actions' event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13010">PHPBB3-13010</a>] - phpbb_get_avatar() incorrectly refers to \phpbb\avatar\driver\driver::clean_row()</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13020">PHPBB3-13020</a>] - Add var to core.viewforum_get_topic_data event to allow modifying forum template data</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13024">PHPBB3-13024</a>] - Template event viewtopic_body_postrow_post_content_footer</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13026">PHPBB3-13026</a>] - Add template vars array to core.viewonline_overwrite_location to allow modifying/adding template vars</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13034">PHPBB3-13034</a>] - Add ability to access extensions outside the phpBB root</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13036">PHPBB3-13036</a>] - Controller helper route method should be able to generate absolute URL's</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13038">PHPBB3-13038</a>] - Link user post tally to their posts</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13047">PHPBB3-13047</a>] - Add $post_list array to core.viewtopic_modify_page_title core event</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13056">PHPBB3-13056</a>] - Move the arguments of the request class to the DI</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13058">PHPBB3-13058</a>] - The &quot;jump to page&quot; input does not have a min attribute.</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13061">PHPBB3-13061</a>] - Use a compiler pass to replace the service event.subscriber_loader</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13062">PHPBB3-13062</a>] - Add viewforum.php core event to allow modifying sql query to select topic ids</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13066">PHPBB3-13066</a>] - Add common search results core event to modify search title</li>
+ </ul>
+ <h4>New Feature</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12951">PHPBB3-12951</a>] - Add .editorconfig</li>
+ </ul>
+ <h4>Sub-task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12928">PHPBB3-12928</a>] - [Event] - core.mcp_reports_gather_query_before</li>
+ </ul>
+ <h4>Task</h4>
+ <ul>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12999">PHPBB3-12999</a>] - Remove @author tag from the doc block</li>
+ <li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13032">PHPBB3-13032</a>] - Update Symfony Components to 2.3.19</li>
+ </ul>
+
+
+ <a name="v310RC2"></a><h3>1.ii. Changes since 3.1.0-RC2</h3>
<h4>Bug</h4>
<ul>
@@ -220,7 +311,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12948">PHPBB3-12948</a>] - Remove Travis CI &quot;broken opcache on PHP 5.5.7 and 5.5.8&quot; workaround.</li>
</ul>
- <a name="v310RC1"></a><h3>1.ii. Changes since 3.1.0-RC1</h3>
+ <a name="v310RC1"></a><h3>1.iii. Changes since 3.1.0-RC1</h3>
<h4>Bug</h4>
<ul>
@@ -291,7 +382,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12829">PHPBB3-12829</a>] - Remove check for pgsql 8.3/8.2</li>
</ul>
- <a name="v310b4"></a><h3>1.iii. Changes since 3.1.0-b4</h3>
+ <a name="v310b4"></a><h3>1.iv. Changes since 3.1.0-b4</h3>
<h4>Bug</h4>
<ul>
@@ -411,7 +502,7 @@
</ul>
- <a name="v310b3"></a><h3>1.iv. Changes since 3.1.0-b3</h3>
+ <a name="v310b3"></a><h3>1.v. Changes since 3.1.0-b3</h3>
<h4>Bug</h4>
<ul>
@@ -518,7 +609,7 @@
</ul>
- <a name="v310b2"></a><h3>1.v. Changes since 3.1.0-b2</h3>
+ <a name="v310b2"></a><h3>1.vi. Changes since 3.1.0-b2</h3>
<h4>Bug</h4>
<ul>
@@ -683,7 +774,7 @@
</ul>
- <a name="v310b1"></a><h3>1.vi. Changes since 3.1.0-b1</h3>
+ <a name="v310b1"></a><h3>1.vii. Changes since 3.1.0-b1</h3>
<h4>Bug</h4>
<ul>
@@ -751,7 +842,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12302">PHPBB3-12302</a>] - Upgrade composer.phar to 1.0.0-alpha8</li>
</ul>
- <a name="v310a3"></a><h3>1.vii. Changes since 3.1.0-a3</h3>
+ <a name="v310a3"></a><h3>1.viii. Changes since 3.1.0-a3</h3>
<h4>Bug</h4>
<ul>
@@ -898,7 +989,7 @@
</ul>
- <a name="v310a2"></a><h3>1.viii. Changes since 3.1.0-a2</h3>
+ <a name="v310a2"></a><h3>1.ix. Changes since 3.1.0-a2</h3>
<h4>Bug</h4>
<ul>
@@ -1006,7 +1097,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12147">PHPBB3-12147</a>] - Remove Travis CI notification configuration</li>
</ul>
- <a name="v310a1"></a><h3>1.ix. Changes since 3.1.0-a1</h3>
+ <a name="v310a1"></a><h3>1.x. Changes since 3.1.0-a1</h3>
<h4>Bug</h4>
<ul>
@@ -1082,7 +1173,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11998">PHPBB3-11998</a>] - Add console / command line client environment </li>
</ul>
- <a name="v30x"></a><h3>1.x. Changes since 3.0.x</h3>
+ <a name="v30x"></a><h3>1.xi. Changes since 3.0.x</h3>
<h4>Bug</h4>
<ul>
@@ -1763,7 +1854,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li>
</ul>
- <a name="v3011"></a><h3>1.xi. Changes since 3.0.11</h3>
+ <a name="v3011"></a><h3>1.xii. Changes since 3.0.11</h3>
<h4>Bug</h4>
<ul>
@@ -1918,7 +2009,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11753">PHPBB3-11753</a>] - Upgrade mysql_upgrader.php schema data.</li>
</ul>
- <a name="v3010"></a><h3>1.xii. Changes since 3.0.10</h3>
+ <a name="v3010"></a><h3>1.xiii. Changes since 3.0.10</h3>
<h4>Bug</h4>
<ul>
@@ -2043,7 +2134,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
</ul>
- <a name="v309"></a><h3>1.xiii. Changes since 3.0.9</h3>
+ <a name="v309"></a><h3>1.xiv. Changes since 3.0.9</h3>
<h4>Bug</h4>
<ul>
@@ -2179,7 +2270,7 @@
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
</ul>
- <a name="v308"></a><h3>1.xiv. Changes since 3.0.8</h3>
+ <a name="v308"></a><h3>1.xv. Changes since 3.0.8</h3>
<h4> Bug
</h4>
@@ -2547,7 +2638,7 @@
</ul>
- <a name="v307-PL1"></a><h3>1.xv. Changes since 3.0.7-PL1</h3>
+ <a name="v307-PL1"></a><h3>1.xvi. Changes since 3.0.7-PL1</h3>
<h4> Security
</h4>
<ul>
@@ -3005,13 +3096,13 @@
</ul>
- <a name="v307"></a><h3>1.xvi. Changes since 3.0.7</h3>
+ <a name="v307"></a><h3>1.xvii. Changes since 3.0.7</h3>
<ul>
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
</ul>
- <a name="v306"></a><h3>1.xvii. Changes since 3.0.6</h3>
+ <a name="v306"></a><h3>1.xviii. Changes since 3.0.6</h3>
<ul>
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
@@ -3115,7 +3206,7 @@
</ul>
- <a name="v305"></a><h3>1.xviii. Changes since 3.0.5</h3>
+ <a name="v305"></a><h3>1.xix. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
@@ -3337,7 +3428,7 @@
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
- <a name="v304"></a><h3>1.xix. Changes since 3.0.4</h3>
+ <a name="v304"></a><h3>1.xx. Changes since 3.0.4</h3>
<ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
@@ -3426,7 +3517,7 @@
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul>
- <a name="v303"></a><h3>1.xx. Changes since 3.0.3</h3>
+ <a name="v303"></a><h3>1.xxi. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@@ -3458,7 +3549,7 @@
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
</ul>
- <a name="v302"></a><h3>1.xxi. Changes since 3.0.2</h3>
+ <a name="v302"></a><h3>1.xxii. Changes since 3.0.2</h3>
<ul>
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
@@ -3557,7 +3648,7 @@
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
</ul>
- <a name="v301"></a><h3>1.xxii. Changes since 3.0.1</h3>
+ <a name="v301"></a><h3>1.xxiii. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@@ -3605,7 +3696,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
- <a name="v300"></a><h3>1.xxiii. Changes since 3.0.0</h3>
+ <a name="v300"></a><h3>1.xxiv. Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@@ -3676,7 +3767,7 @@
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
</ul>
- <a name="v30rc8"></a><h3>1.xxiv. Changes since 3.0.RC8</h3>
+ <a name="v30rc8"></a><h3>1.xxv. Changes since 3.0.RC8</h3>
<ul>
<li>[Fix] Cleaned usernames contain only single spaces, so &quot;a_name&quot; and &quot;a__name&quot; are treated as the same name (Bug #15634)</li>
@@ -3685,7 +3776,7 @@
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul>
- <a name="v30rc7"></a><h3>1.xxv. Changes since 3.0.RC7</h3>
+ <a name="v30rc7"></a><h3>1.xxvi. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@@ -3720,7 +3811,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
- <a name="v30rc6"></a><h3>1.xxvi. Changes since 3.0.RC6</h3>
+ <a name="v30rc6"></a><h3>1.xxvii. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@@ -3730,7 +3821,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
- <a name="v30rc5"></a><h3>1.xxvii. Changes since 3.0.RC5</h3>
+ <a name="v30rc5"></a><h3>1.xxviii. Changes since 3.0.RC5</h3>
<ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
@@ -3793,7 +3884,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
- <a name="v30rc4"></a><h3>1.xxviii. Changes since 3.0.RC4</h3>
+ <a name="v30rc4"></a><h3>1.xxix. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@@ -3844,7 +3935,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
- <a name="v30rc3"></a><h3>1.xxix. Changes since 3.0.RC3</h3>
+ <a name="v30rc3"></a><h3>1.xxx. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@@ -3953,7 +4044,7 @@
</ul>
- <a name="v30rc2"></a><h3>1.xxx. Changes since 3.0.RC2</h3>
+ <a name="v30rc2"></a><h3>1.xxxi. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@@ -3999,7 +4090,7 @@
</ul>
- <a name="v30rc1"></a><h3>1.xxxi. Changes since 3.0.RC1</h3>
+ <a name="v30rc1"></a><h3>1.xxxii. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md
index e1308c71d1..dae3bce977 100644
--- a/phpBB/docs/events.md
+++ b/phpBB/docs/events.md
@@ -224,6 +224,38 @@ forumlist_body_category_header_before
* Since: 3.1.0-a4
* Purpose: Add content before the header of the category on the forum list.
+forumlist_body_forum_row_after
+===
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-RC5
+* Purpose: Add content after the forum list item.
+
+forumlist_body_forum_row_append
+===
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-RC5
+* Purpose: Add content at the start of the forum list item.
+
+forumlist_body_forum_row_before
+===
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-RC5
+* Purpose: Add content before the forum list item.
+
+forumlist_body_forum_row_prepend
+===
+* Locations:
+ + styles/prosilver/template/forumlist_body.html
+ + styles/subsilver2/template/forumlist_body.html
+* Since: 3.1.0-RC5
+* Purpose: Add content at the end of the forum list item.
+
forumlist_body_last_post_title_prepend
===
* Locations:
diff --git a/phpBB/feed.php b/phpBB/feed.php
index d4dfb15928..e0c0b01db6 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -165,7 +165,6 @@ if (defined('DEBUG') && request_var('explain', 0) && $auth->acl_get('a_'))
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
- header('Pragma: no-cache');
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
index 361ef2666c..b555f46a94 100644
--- a/phpBB/includes/acp/acp_ban.php
+++ b/phpBB/includes/acp/acp_ban.php
@@ -25,14 +25,13 @@ class acp_ban
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache;
- global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
+ global $user, $template, $request, $phpbb_dispatcher;
+ global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
- $bansubmit = (isset($_POST['bansubmit'])) ? true : false;
- $unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
- $current_time = time();
+ $bansubmit = $request->is_set_post('bansubmit');
+ $unbansubmit = $request->is_set_post('unbansubmit');
$user->add_lang(array('acp/ban', 'acp/users'));
$this->tpl_name = 'acp_ban';
@@ -48,23 +47,79 @@ class acp_ban
if ($bansubmit)
{
// Grab the list of entries
- $ban = utf8_normalize_nfc(request_var('ban', '', true));
- $ban_len = request_var('banlength', 0);
- $ban_len_other = request_var('banlengthother', '');
- $ban_exclude = request_var('banexclude', 0);
- $ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
- $ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
+ $ban = $request->variable('ban', '', true);
+ $ban_length = $request->variable('banlength', 0);
+ $ban_length_other = $request->variable('banlengthother', '');
+ $ban_exclude = $request->variable('banexclude', 0);
+ $ban_reason = $request->variable('banreason', '', true);
+ $ban_give_reason = $request->variable('bangivereason', '', true);
if ($ban)
{
- user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
+ $abort_ban = false;
+ /**
+ * Use this event to modify the ban details before the ban is performed
+ *
+ * @event core.acp_ban_before
+ * @var string mode One of the following: user, ip, email
+ * @var string ban Either string or array with usernames, ips or email addresses
+ * @var int ban_length Ban length in minutes
+ * @var string ban_length_other Ban length as a date (YYYY-MM-DD)
+ * @var bool ban_exclude Are we banning or excluding from another ban
+ * @var string ban_reason Ban reason displayed to moderators
+ * @var string ban_give_reason Ban reason displayed to the banned user
+ * @var mixed abort_ban Either false, or an error message that is displayed to the user.
+ * If a string is given the bans are not issued.
+ * @since 3.1.0-RC5
+ */
+ $vars = array(
+ 'mode',
+ 'ban',
+ 'ban_length',
+ 'ban_length_other',
+ 'ban_exclude',
+ 'ban_reason',
+ 'ban_give_reason',
+ 'abort_ban',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.acp_ban_before', compact($vars)));
+
+ if ($abort_ban)
+ {
+ trigger_error($abort_ban . adm_back_link($this->u_action));
+ }
+ user_ban($mode, $ban, $ban_length, $ban_length_other, $ban_exclude, $ban_reason, $ban_give_reason);
+
+ /**
+ * Use this event to perform actions after the ban has been performed
+ *
+ * @event core.acp_ban_after
+ * @var string mode One of the following: user, ip, email
+ * @var string ban Either string or array with usernames, ips or email addresses
+ * @var int ban_length Ban length in minutes
+ * @var string ban_length_other Ban length as a date (YYYY-MM-DD)
+ * @var bool ban_exclude Are we banning or excluding from another ban
+ * @var string ban_reason Ban reason displayed to moderators
+ * @var string ban_give_reason Ban reason displayed to the banned user
+ * @since 3.1.0-RC5
+ */
+ $vars = array(
+ 'mode',
+ 'ban',
+ 'ban_length',
+ 'ban_length_other',
+ 'ban_exclude',
+ 'ban_reason',
+ 'ban_give_reason',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.acp_ban_after', compact($vars)));
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
}
}
else if ($unbansubmit)
{
- $ban = request_var('unban', array(''));
+ $ban = $request->variable('unban', array(''));
if ($ban)
{
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index f2707f15ca..9c9e32b57c 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -904,12 +904,11 @@ class acp_board
*/
function timezone_select($value, $key)
{
- global $user;
+ global $template, $user;
- $timezone_select = phpbb_timezone_select($user, $value, true);
- $timezone_select['tz_select'];
+ $timezone_select = phpbb_timezone_select($template, $user, $value, true);
- return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select['tz_select'] . '</select>';
+ return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select . '</select>';
}
/**
diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php
index 8f9c155ffc..0c52f82459 100644
--- a/phpBB/includes/acp/acp_database.php
+++ b/phpBB/includes/acp/acp_database.php
@@ -269,7 +269,7 @@ class acp_database
break;
}
- header('Pragma: no-cache');
+ header('Cache-Control: private, no-cache');
header("Content-Type: $mimetype; name=\"$name\"");
header("Content-disposition: attachment; filename=$name");
@@ -510,7 +510,7 @@ class base_extractor
if ($download == true)
{
$name = $filename . $ext;
- header('Pragma: no-cache');
+ header('Cache-Control: private, no-cache');
header("Content-Type: $mimetype; name=\"$name\"");
header("Content-disposition: attachment; filename=$name");
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 028025b547..9265415dd1 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -737,7 +737,7 @@ class acp_icons
{
garbage_collection();
- header('Pragma: public');
+ header('Cache-Control: public');
// Send out the Headers
header('Content-Type: text/x-delimtext; name="' . $mode . '.pak"');
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 40d8218a07..31b033604d 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1661,7 +1661,7 @@ class acp_users
${'s_sort_' . $sort_option . '_dir'} .= '</select>';
}
- $timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
+ phpbb_timezone_select($template, $user, $data['tz'], true);
$user_prefs_data = array(
'S_PREFS' => true,
'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
@@ -1700,8 +1700,6 @@ class acp_users
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => style_select($data['style']),
- 'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
- 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
);
/**
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 0eac2e9417..b72e4ab6d4 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.1.0-RC4-dev');
+define('PHPBB_VERSION', '3.1.0-RC5-dev');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index a61518401c..a502314ded 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -31,7 +31,7 @@ function phpbb_load_extensions_autoloaders($phpbb_root_path)
new \phpbb\recursive_dot_prefix_filter_iterator(
new \RecursiveDirectoryIterator(
$phpbb_root_path . 'ext/',
- \FilesystemIterator::SKIP_DOTS
+ \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS
)
),
\RecursiveIteratorIterator::SELF_FIRST
@@ -937,14 +937,20 @@ function style_select($default = '', $all = false)
* Format the timezone offset with hours and minutes
*
* @param int $tz_offset Timezone offset in seconds
+* @param bool $show_null Whether null offsets should be shown
* @return string Normalized offset string: -7200 => -02:00
* 16200 => +04:30
*/
-function phpbb_format_timezone_offset($tz_offset)
+function phpbb_format_timezone_offset($tz_offset, $show_null = false)
{
$sign = ($tz_offset < 0) ? '-' : '+';
$time_offset = abs($tz_offset);
+ if ($time_offset == 0 && $show_null == false)
+ {
+ return '';
+ }
+
$offset_seconds = $time_offset % 3600;
$offset_minutes = $offset_seconds / 60;
$offset_hours = ($time_offset - $offset_seconds) / 3600;
@@ -1040,13 +1046,14 @@ function phpbb_get_timezone_identifiers($selected_timezone)
/**
* Options to pick a timezone and date/time
*
+* @param \phpbb\template\template $template phpBB template object
* @param \phpbb\user $user Object of the current user
* @param string $default A timezone to select
* @param boolean $truncate Shall we truncate the options text
*
-* @return array Returns an array, also containing the options for the time selector.
+* @return array Returns an array containing the options for the time selector.
*/
-function phpbb_timezone_select($user, $default = '', $truncate = false)
+function phpbb_timezone_select($template, $user, $default = '', $truncate = false)
{
static $timezones;
@@ -1062,15 +1069,15 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
$dt = $user->create_datetime('now', $tz);
$offset = $dt->getOffset();
$current_time = $dt->format($user->lang['DATETIME_FORMAT'], true);
- $offset_string = phpbb_format_timezone_offset($offset);
- $timezones['GMT' . $offset_string . ' - ' . $timezone] = array(
+ $offset_string = phpbb_format_timezone_offset($offset, true);
+ $timezones['UTC' . $offset_string . ' - ' . $timezone] = array(
'tz' => $timezone,
- 'offset' => 'GMT' . $offset_string,
+ 'offset' => $offset_string,
'current' => $current_time,
);
if ($timezone === $default)
{
- $default_offset = 'GMT' . $offset_string;
+ $default_offset = 'UTC' . $offset_string;
}
}
unset($unsorted_timezones);
@@ -1078,18 +1085,27 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
uksort($timezones, 'phpbb_tz_select_compare');
}
- $tz_select = $tz_dates = $opt_group = '';
+ $tz_select = $opt_group = '';
- foreach ($timezones as $timezone)
+ foreach ($timezones as $key => $timezone)
{
if ($opt_group != $timezone['offset'])
{
+ // Generate tz_select for backwards compatibility
$tz_select .= ($opt_group) ? '</optgroup>' : '';
- $tz_select .= '<optgroup label="' . $timezone['offset'] . ' - ' . $timezone['current'] . '">';
+ $tz_select .= '<optgroup label="' . $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']) . '">';
$opt_group = $timezone['offset'];
+ $template->assign_block_vars('timezone_select', array(
+ 'LABEL' => $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']),
+ 'VALUE' => $key . ' - ' . $timezone['current'],
+ ));
- $selected = ($default_offset == $timezone['offset']) ? ' selected="selected"' : '';
- $tz_dates .= '<option value="' . $timezone['offset'] . ' - ' . $timezone['current'] . '"' . $selected . '>' . $timezone['offset'] . ' - ' . $timezone['current'] . '</option>';
+ $selected = (!empty($default_offset) && strpos($key, $default_offset) !== false) ? ' selected="selected"' : '';
+ $template->assign_block_vars('timezone_date', array(
+ 'VALUE' => $key . ' - ' . $timezone['current'],
+ 'SELECTED' => !empty($selected),
+ 'TITLE' => $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']),
+ ));
}
$label = $timezone['tz'];
@@ -1097,22 +1113,26 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
{
$label = $user->lang['timezones'][$label];
}
- $title = $timezone['offset'] . ' - ' . $label;
+ $title = $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $label);
if ($truncate)
{
$label = truncate_string($label, 50, 255, false, '...');
}
+ // Also generate timezone_select for backwards compatibility
$selected = ($timezone['tz'] === $default) ? ' selected="selected"' : '';
$tz_select .= '<option title="' . $title . '" value="' . $timezone['tz'] . '"' . $selected . '>' . $label . '</option>';
+ $template->assign_block_vars('timezone_select.timezone_options', array(
+ 'TITLE' => $title,
+ 'VALUE' => $timezone['tz'],
+ 'SELECTED' => !empty($selected),
+ 'LABEL' => $label,
+ ));
}
$tz_select .= '</optgroup>';
- return array(
- 'tz_select' => $tz_select,
- 'tz_dates' => $tz_dates,
- );
+ return $tz_select;
}
// Functions handling topic/post tracking/marking
@@ -2748,7 +2768,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
{
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
- global $request, $phpbb_container;
+ global $request, $phpbb_container, $phpbb_dispatcher;
$err = '';
@@ -2834,6 +2854,18 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
{
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
+ /**
+ * This event allows an extension to modify the redirection when a user successfully logs in
+ *
+ * @event core.login_box_redirect
+ * @var string redirect Redirect string
+ * @var boolean admin Is admin?
+ * @var bool return If true, do not redirect but return the sanitized URL.
+ * @since 3.1.0-RC5
+ */
+ $vars = array('redirect', 'admin', 'return');
+ extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
+
// append/replace SID (may change during the session for AOL users)
$redirect = reapply_sid($redirect);
@@ -3317,6 +3349,11 @@ function get_preg_expression($mode)
case 'table_prefix':
return '#^[a-zA-Z][a-zA-Z0-9_]*$#';
break;
+
+ // Matches the predecing dot
+ case 'path_remove_dot_trailing_slash':
+ return '#^(?:(\.)?)+(?:(.+)?)+(?:([\\/\\\])$)#';
+ break;
}
return '';
@@ -4898,7 +4935,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
}
$dt = $user->create_datetime();
- $timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
+ $timezone_offset = $user->lang(array('timezones', 'UTC_OFFSET'), phpbb_format_timezone_offset($dt->getOffset()));
$timezone_name = $user->timezone->getName();
if (isset($user->lang['timezones'][$timezone_name]))
{
@@ -5063,7 +5100,6 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
'Content-type' => 'text/html; charset=UTF-8',
'Cache-Control' => 'private, no-cache="set-cookie"',
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
- 'Pragma' => 'no-cache',
);
if (!empty($user->data['is_bot']))
{
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index da8d756db9..e30c6da505 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -113,7 +113,6 @@ function adm_page_header($page_title)
'Content-type' => 'text/html; charset=UTF-8',
'Cache-Control' => 'private, no-cache="set-cookie"',
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
- 'Pragma' => 'no-cache',
);
/**
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php
index 093cb19538..fbb1f0e03d 100644
--- a/phpBB/includes/functions_compatibility.php
+++ b/phpBB/includes/functions_compatibility.php
@@ -133,10 +133,9 @@ function phpbb_clean_path($path)
*/
function tz_select($default = '', $truncate = false)
{
- global $user;
+ global $template, $user;
- $timezone_select = phpbb_timezone_select($user, $default, $truncate);
- return $timezone_select['tz_select'];
+ return phpbb_timezone_select($template, $user, $default, $truncate);
}
/**
@@ -166,3 +165,30 @@ function update_foes($group_id = false, $user_id = false)
global $db, $auth;
return phpbb_update_foes($db, $auth, $group_id, $user_id);
}
+
+/**
+* Get user rank title and image
+*
+* @param int $user_rank the current stored users rank id
+* @param int $user_posts the users number of posts
+* @param string &$rank_title the rank title will be stored here after execution
+* @param string &$rank_img the rank image as full img tag is stored here after execution
+* @param string &$rank_img_src the rank image source is stored here after execution
+*
+* @deprecated 3.1.0-RC5 (To be removed: 3.3.0)
+*
+* Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false
+*/
+function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
+{
+ global $phpbb_root_path, $phpEx;
+ if (!function_exists('phpbb_get_user_rank'))
+ {
+ include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
+ }
+
+ $rank_data = phpbb_get_user_rank(array('user_rank' => $user_rank), $user_posts);
+ $rank_title = $rank_data['title'];
+ $rank_img = $rank_data['img'];
+ $rank_img_src = $rank_data['img_src'];
+}
diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php
index 6ed69d6928..a7ee29dd91 100644
--- a/phpBB/includes/functions_compress.php
+++ b/phpBB/includes/functions_compress.php
@@ -509,7 +509,7 @@ class compress_zip extends compress
$mimetype = 'application/zip';
- header('Pragma: no-cache');
+ header('Cache-Control: private, no-cache');
header("Content-Type: $mimetype; name=\"$download_name.zip\"");
header("Content-disposition: attachment; filename=$download_name.zip");
@@ -757,7 +757,7 @@ class compress_tar extends compress
break;
}
- header('Pragma: no-cache');
+ header('Cache-Control: private, no-cache');
header("Content-Type: $mimetype; name=\"$download_name$this->type\"");
header("Content-disposition: attachment; filename=$download_name$this->type");
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 85d9496061..77447c62f6 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1402,17 +1402,34 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
/**
* Get user rank title and image
*
-* @param int $user_rank the current stored users rank id
+* @param array $user_data the current stored users data
* @param int $user_posts the users number of posts
-* @param string &$rank_title the rank title will be stored here after execution
-* @param string &$rank_img the rank image as full img tag is stored here after execution
-* @param string &$rank_img_src the rank image source is stored here after execution
+*
+* @return array An associative array containing the rank title (title), the rank image source (img) and the rank image as full img tag (img)
*
* Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false
*/
-function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
+function phpbb_get_user_rank($user_data, $user_posts)
{
- global $ranks, $config, $phpbb_root_path, $phpbb_path_helper;
+ global $ranks, $config, $phpbb_root_path, $phpbb_path_helper, $phpbb_dispatcher;
+
+ $user_rank_data = array(
+ 'title' => null,
+ 'img' => null,
+ 'img_src' => null,
+ );
+
+ /**
+ * Preparing a user's rank before displaying
+ *
+ * @event core.modify_user_rank
+ * @var array user_data Array with user's data
+ * @var int user_posts User_posts to change
+ * @since 3.1.0-RC4
+ */
+
+ $vars = array('user_data', 'user_posts');
+ extract($phpbb_dispatcher->trigger_event('core.modify_user_rank', compact($vars)));
if (empty($ranks))
{
@@ -1420,11 +1437,14 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
$ranks = $cache->obtain_ranks();
}
- if (!empty($user_rank))
+ if (!empty($user_data['user_rank']))
{
- $rank_title = (isset($ranks['special'][$user_rank]['rank_title'])) ? $ranks['special'][$user_rank]['rank_title'] : '';
- $rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image']) : '';
- $rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $rank_img_src . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
+
+ $user_rank_data['title'] = (isset($ranks['special'][$user_data['user_rank']]['rank_title'])) ? $ranks['special'][$user_data['user_rank']]['rank_title'] : '';
+
+ $user_rank_data['img_src'] = (!empty($ranks['special'][$user_data['user_rank']]['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_data['user_rank']]['rank_image']) : '';
+
+ $user_rank_data['img'] = (!empty($ranks['special'][$user_data['user_rank']]['rank_image'])) ? '<img src="' . $user_rank_data['img_src'] . '" alt="' . $ranks['special'][$user_data['user_rank']]['rank_title'] . '" title="' . $ranks['special'][$user_data['user_rank']]['rank_title'] . '" />' : '';
}
else if ($user_posts !== false)
{
@@ -1434,14 +1454,16 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
{
if ($user_posts >= $rank['rank_min'])
{
- $rank_title = $rank['rank_title'];
- $rank_img_src = (!empty($rank['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image']) : '';
- $rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $rank_img_src . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
+ $user_rank_data['title'] = $rank['rank_title'];
+ $user_rank_data['img_src'] = (!empty($rank['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image']) : '';
+ $user_rank_data['img'] = (!empty($rank['rank_image'])) ? '<img src="' . $user_rank_data['img_src'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
break;
}
}
}
}
+
+ return $user_rank_data;
}
/**
@@ -1454,8 +1476,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
$username = $data['username'];
$user_id = $data['user_id'];
- $rank_title = $rank_img = $rank_img_src = '';
- get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
+ $user_rank_data = phpbb_get_user_rank($data, (($user_id == ANONYMOUS) ? false : $data['user_posts']));
if ((!empty($data['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_user'))
{
@@ -1536,7 +1557,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
// Dump it out to the template
$template_data = array(
'AGE' => $age,
- 'RANK_TITLE' => $rank_title,
+ 'RANK_TITLE' => $user_rank_data['title'],
'JOINED' => $user->format_date($data['user_regdate']),
'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
@@ -1552,8 +1573,8 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
'AVATAR_IMG' => phpbb_get_user_avatar($data),
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
- 'RANK_IMG' => $rank_img,
- 'RANK_IMG_SRC' => $rank_img_src,
+ 'RANK_IMG' => $user_rank_data['img'],
+ 'RANK_IMG_SRC' => $user_rank_data['img_src'],
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
diff --git a/phpBB/includes/functions_download.php b/phpBB/includes/functions_download.php
index 3be84299f0..704939b176 100644
--- a/phpBB/includes/functions_download.php
+++ b/phpBB/includes/functions_download.php
@@ -45,7 +45,7 @@ function send_avatar_to_browser($file, $browser)
if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
{
- header('Pragma: public');
+ header('Cache-Control: public');
$image_data = @getimagesize($file_path);
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
@@ -175,7 +175,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
}
// Now the tricky part... let's dance
- header('Pragma: public');
+ header('Cache-Control: public');
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
header('Content-Type: ' . $attachment['mimetype']);
@@ -420,7 +420,7 @@ function set_modified_headers($stamp, $browser)
{
send_status_line(304, 'Not Modified');
// seems that we need those too ... browsers
- header('Pragma: public');
+ header('Cache-Control: public');
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
return true;
}
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 29cea477e4..ad142b1cca 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1573,7 +1573,7 @@ function get_folder_status($folder_id, $folder)
'cur' => $folder['num_messages'],
'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0,
'max' => $user->data['message_limit'],
- 'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
+ 'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
);
$return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']);
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 38ae34c66c..e4479f07b0 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -363,12 +363,16 @@ function user_add($user_row, $cp_data = false)
}
/**
-* Remove User
-* @param $mode Either 'retain' or 'remove'
-*/
+ * Remove User
+ *
+ * @param string $mode Either 'retain' or 'remove'
+ * @param mixed $user_ids Either an array of integers or an integer
+ * @param bool $retain_username
+ * @return bool
+ */
function user_delete($mode, $user_ids, $retain_username = true)
{
- global $cache, $config, $db, $user, $auth, $phpbb_dispatcher;
+ global $cache, $config, $db, $user, $phpbb_dispatcher;
global $phpbb_root_path, $phpEx;
$db->sql_transaction('begin');
@@ -555,11 +559,6 @@ function user_delete($mode, $user_ids, $retain_username = true)
WHERE ' . $db->sql_in_set('poster_id', $user_ids);
$db->sql_query($sql);
- $sql = 'UPDATE ' . POSTS_TABLE . '
- SET post_edit_user = ' . ANONYMOUS . '
- WHERE ' . $db->sql_in_set('post_edit_user', $user_ids);
- $db->sql_query($sql);
-
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_posts = user_posts + ' . $added_guest_posts . '
WHERE user_id = ' . ANONYMOUS;
@@ -589,6 +588,30 @@ function user_delete($mode, $user_ids, $retain_username = true)
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
+ // Change user_id to anonymous for posts edited by this user
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_edit_user = ' . ANONYMOUS . '
+ WHERE ' . $db->sql_in_set('post_edit_user', $user_ids);
+ $db->sql_query($sql);
+
+ // Change user_id to anonymous for pms edited by this user
+ $sql = 'UPDATE ' . PRIVMSGS_TABLE . '
+ SET message_edit_user = ' . ANONYMOUS . '
+ WHERE ' . $db->sql_in_set('message_edit_user', $user_ids);
+ $db->sql_query($sql);
+
+ // Change user_id to anonymous for posts deleted by this user
+ $sql = 'UPDATE ' . POSTS_TABLE . '
+ SET post_delete_user = ' . ANONYMOUS . '
+ WHERE ' . $db->sql_in_set('post_delete_user', $user_ids);
+ $db->sql_query($sql);
+
+ // Change user_id to anonymous for topics deleted by this user
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_delete_user = ' . ANONYMOUS . '
+ WHERE ' . $db->sql_in_set('topic_delete_user', $user_ids);
+ $db->sql_query($sql);
+
// Delete user log entries about this user
$sql = 'DELETE FROM ' . LOG_TABLE . '
WHERE ' . $db->sql_in_set('reportee_id', $user_ids);
diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php
index e6fac3b80c..1eb79ea29e 100644
--- a/phpBB/includes/mcp/mcp_ban.php
+++ b/phpBB/includes/mcp/mcp_ban.php
@@ -25,7 +25,7 @@ class mcp_ban
function main($id, $mode)
{
- global $config, $db, $user, $auth, $template, $cache;
+ global $db, $user, $auth, $template, $request, $phpbb_dispatcher;
global $phpbb_root_path, $phpEx;
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
@@ -33,9 +33,8 @@ class mcp_ban
// Include the admin banning interface...
include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
- $bansubmit = (isset($_POST['bansubmit'])) ? true : false;
- $unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
- $current_time = time();
+ $bansubmit = $request->is_set_post('bansubmit');
+ $unbansubmit = $request->is_set_post('unbansubmit');
$user->add_lang(array('acp/ban', 'acp/users'));
$this->tpl_name = 'mcp_ban';
@@ -44,44 +43,107 @@ class mcp_ban
if ($bansubmit)
{
// Grab the list of entries
- $ban = request_var('ban', '', ($mode === 'user') ? true : false);
-
- if ($mode === 'user')
- {
- $ban = utf8_normalize_nfc($ban);
- }
-
- $ban_len = request_var('banlength', 0);
- $ban_len_other = request_var('banlengthother', '');
- $ban_exclude = request_var('banexclude', 0);
- $ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
- $ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
+ $ban = $request->variable('ban', '', $mode === 'user');
+ $ban_length = $request->variable('banlength', 0);
+ $ban_length_other = $request->variable('banlengthother', '');
+ $ban_exclude = $request->variable('banexclude', 0);
+ $ban_reason = $request->variable('banreason', '', true);
+ $ban_give_reason = $request->variable('bangivereason', '', true);
if ($ban)
{
if (confirm_box(true))
{
- user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
+ $abort_ban = false;
+ /**
+ * Use this event to modify the ban details before the ban is performed
+ *
+ * @event core.mcp_ban_before
+ * @var string mode One of the following: user, ip, email
+ * @var string ban Either string or array with usernames, ips or email addresses
+ * @var int ban_length Ban length in minutes
+ * @var string ban_length_other Ban length as a date (YYYY-MM-DD)
+ * @var bool ban_exclude Are we banning or excluding from another ban
+ * @var string ban_reason Ban reason displayed to moderators
+ * @var string ban_give_reason Ban reason displayed to the banned user
+ * @var mixed abort_ban Either false, or an error message that is displayed to the user.
+ * If a string is given the bans are not issued.
+ * @since 3.1.0-RC5
+ */
+ $vars = array(
+ 'mode',
+ 'ban',
+ 'ban_length',
+ 'ban_length_other',
+ 'ban_exclude',
+ 'ban_reason',
+ 'ban_give_reason',
+ 'abort_ban',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_ban_before', compact($vars)));
+
+ if ($abort_ban)
+ {
+ trigger_error($abort_ban);
+ }
+ user_ban($mode, $ban, $ban_length, $ban_length_other, $ban_exclude, $ban_reason, $ban_give_reason);
+
+ /**
+ * Use this event to perform actions after the ban has been performed
+ *
+ * @event core.mcp_ban_after
+ * @var string mode One of the following: user, ip, email
+ * @var string ban Either string or array with usernames, ips or email addresses
+ * @var int ban_length Ban length in minutes
+ * @var string ban_length_other Ban length as a date (YYYY-MM-DD)
+ * @var bool ban_exclude Are we banning or excluding from another ban
+ * @var string ban_reason Ban reason displayed to moderators
+ * @var string ban_give_reason Ban reason displayed to the banned user
+ * @since 3.1.0-RC5
+ */
+ $vars = array(
+ 'mode',
+ 'ban',
+ 'ban_length',
+ 'ban_length_other',
+ 'ban_exclude',
+ 'ban_reason',
+ 'ban_give_reason',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_ban_after', compact($vars)));
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">&laquo; ' . $user->lang['BACK_TO_PREV'] . '</a>');
}
else
{
- confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ $hidden_fields = array(
'mode' => $mode,
'ban' => $ban,
'bansubmit' => true,
- 'banlength' => $ban_len,
- 'banlengthother' => $ban_len_other,
+ 'banlength' => $ban_length,
+ 'banlengthother' => $ban_length_other,
'banexclude' => $ban_exclude,
'banreason' => $ban_reason,
- 'bangivereason' => $ban_give_reason)));
+ 'bangivereason' => $ban_give_reason,
+ );
+
+ /**
+ * Use this event to pass data from the ban form to the confirmation screen
+ *
+ * @event core.mcp_ban_confirm
+ * @var array hidden_fields Hidden fields that are passed through the confirm screen
+ * @since 3.1.0-RC5
+ */
+ $vars = array('hidden_fields');
+ extract($phpbb_dispatcher->trigger_event('core.mcp_ban_confirm', compact($vars)));
+
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($hidden_fields));
}
}
}
else if ($unbansubmit)
{
- $ban = request_var('unban', array(''));
+ $ban = $request->variable('unban', array(''));
if ($ban)
{
@@ -157,9 +219,9 @@ class mcp_ban
}
// As a "service" we will check if any post id is specified and populate the username of the poster id if given
- $post_id = request_var('p', 0);
- $user_id = request_var('u', 0);
- $username = $pre_fill = false;
+ $post_id = $request->variable('p', 0);
+ $user_id = $request->variable('u', 0);
+ $pre_fill = false;
if ($user_id && $user_id <> ANONYMOUS)
{
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 106b025757..425c3ac235 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -336,12 +336,12 @@ class mcp_warn
$message = generate_text_for_display($user_row['post_text'], $user_row['bbcode_uid'], $user_row['bbcode_bitfield'], $parse_flags, true);
// Generate the appropriate user information for the user we are looking at
- if (!function_exists('get_user_rank'))
+ if (!function_exists('phpbb_get_user_rank'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
- get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
+ $user_rank_data = phpbb_get_user_rank($user_row, $user_row['user_posts']);
$avatar_img = phpbb_get_user_avatar($user_row);
$template->assign_vars(array(
@@ -350,13 +350,13 @@ class mcp_warn
'POST' => $message,
'USERNAME' => $user_row['username'],
'USER_COLOR' => (!empty($user_row['user_colour'])) ? $user_row['user_colour'] : '',
- 'RANK_TITLE' => $rank_title,
+ 'RANK_TITLE' => $user_rank_data['title'],
'JOINED' => $user->format_date($user_row['user_regdate']),
'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,
'AVATAR_IMG' => $avatar_img,
- 'RANK_IMG' => $rank_img,
+ 'RANK_IMG' => $user_rank_data['img'],
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&amp;p=$post_id#p$post_id"),
@@ -486,18 +486,18 @@ class mcp_warn
}
// Generate the appropriate user information for the user we are looking at
- if (!function_exists('get_user_rank'))
+ if (!function_exists('phpbb_get_user_rank'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
- get_user_rank($user_row['user_rank'], $user_row['user_posts'], $rank_title, $rank_img, $rank_img_src);
+ $user_rank_data = phpbb_get_user_rank($user_row, $user_row['user_posts']);
$avatar_img = phpbb_get_user_avatar($user_row);
// OK, they didn't submit a warning so lets build the page for them to do so
$template->assign_vars(array(
'U_POST_ACTION' => $this->u_action,
- 'RANK_TITLE' => $rank_title,
+ 'RANK_TITLE' => $user_rank_data['title'],
'JOINED' => $user->format_date($user_row['user_regdate']),
'POSTS' => ($user_row['user_posts']) ? $user_row['user_posts'] : 0,
'WARNINGS' => ($user_row['user_warnings']) ? $user_row['user_warnings'] : 0,
@@ -508,7 +508,7 @@ class mcp_warn
'U_PROFILE' => get_username_string('profile', $user_row['user_id'], $user_row['username'], $user_row['user_colour']),
'AVATAR_IMG' => $avatar_img,
- 'RANK_IMG' => $rank_img,
+ 'RANK_IMG' => $user_rank_data['img'],
'S_CAN_NOTIFY' => $s_can_notify,
));
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 72921270f4..19acd9ecb9 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -383,7 +383,7 @@ function view_folder($id, $mode, $folder_id, $folder)
break;
}
- header('Pragma: no-cache');
+ header('Cache-Control: private, no-cache');
header("Content-Type: $mimetype; name=\"data.$filetype\"");
header("Content-disposition: attachment; filename=data.$filetype");
echo $string;
diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php
index d5a1dbae87..2f34fd64a5 100644
--- a/phpBB/includes/ucp/ucp_pm_viewmessage.php
+++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php
@@ -403,12 +403,15 @@ function get_user_information($user_id, $user_row)
$user_row['avatar'] = ($user->optionget('viewavatars')) ? phpbb_get_user_avatar($user_row) : '';
- if (!function_exists('get_user_rank'))
+ if (!function_exists('phpbb_get_user_rank'))
{
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
}
- get_user_rank($user_row['user_rank'], $user_row['user_posts'], $user_row['rank_title'], $user_row['rank_image'], $user_row['rank_image_src']);
+ $user_rank_data = phpbb_get_user_rank($user_row, $user_row['user_posts']);
+ $user_row['rank_title'] = $user_rank_data['title'];
+ $user_row['rank_image'] = $user_rank_data['img'];
+ $user_row['rank_image_src'] = $user_rank_data['img_src'];
if ((!empty($user_row['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_email'))
{
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 3ff8fe9ada..2195500b57 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -154,7 +154,7 @@ class ucp_prefs
}
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
- $timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
+ phpbb_timezone_select($template, $user, $data['tz'], true);
// check if there are any user-selectable languages
$sql = 'SELECT COUNT(lang_id) as languages_count
@@ -208,8 +208,6 @@ class ucp_prefs
'S_LANG_OPTIONS' => language_select($data['lang']),
'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['user_style']),
- 'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
- 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
'S_CAN_HIDE_ONLINE' => ($auth->acl_get('u_hideonline')) ? true : false,
'S_SELECT_NOTIFY' => ($config['jab_enable'] && $user->data['user_jabber'] && @extension_loaded('xml')) ? true : false)
);
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 06baf7e5f2..9a15967bae 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -452,7 +452,7 @@ class ucp_register
break;
}
- $timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
+ $timezone_selects = phpbb_timezone_select($template, $user, $data['tz'], true);
$template->assign_vars(array(
'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
'USERNAME' => $data['username'],
@@ -465,8 +465,6 @@ class ucp_register
'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])),
'S_LANG_OPTIONS' => language_select($data['lang']),
- 'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
- 'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
'S_TZ_PRESELECT' => !$submit,
'S_CONFIRM_REFRESH' => ($config['enable_confirm'] && $config['confirm_refresh']) ? true : false,
'S_REGISTRATION' => true,
diff --git a/phpBB/install/convertors/convert_phpbb20.php b/phpBB/install/convertors/convert_phpbb20.php
index d09f71ae22..4ec408a670 100644
--- a/phpBB/install/convertors/convert_phpbb20.php
+++ b/phpBB/install/convertors/convert_phpbb20.php
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
$convertor_data = array(
'forum_name' => 'phpBB 2.0.x',
'version' => '1.0.3',
- 'phpbb_version' => '3.1.0-RC3',
+ 'phpbb_version' => '3.1.0-RC4',
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
'dbms' => $dbms,
'dbhost' => $dbhost,
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 5531a98c09..5c16421499 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -446,7 +446,6 @@ class module
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
- header('Pragma: no-cache');
return;
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 90b1ac8f92..baabe90f2a 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -273,7 +273,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC4-dev');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.1.0-RC5-dev');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
index ddacb9df25..0d47e37d09 100644
--- a/phpBB/language/en/acp/email.php
+++ b/phpBB/language/en/acp/email.php
@@ -38,7 +38,7 @@ if (empty($lang) || !is_array($lang))
// Email settings
$lang = array_merge($lang, array(
- 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group <strong>having the option to receive mass emails enabled</strong>. To achieve this an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 50 recipients in such an email, for more recipients more emails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.',
+ 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group <strong>having the option to receive mass emails enabled</strong>. To achieve this an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. The default setting is to only include 20 recipients in such an email, for more recipients more emails will be sent. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed.',
'ALL_USERS' => 'All users',
'COMPOSE' => 'Compose',
diff --git a/phpBB/language/en/acp/profile.php b/phpBB/language/en/acp/profile.php
index d27deed602..5972f8a18e 100644
--- a/phpBB/language/en/acp/profile.php
+++ b/phpBB/language/en/acp/profile.php
@@ -119,6 +119,12 @@ $lang = array_merge($lang, array(
'LANG_SPECIFIC_OPTIONS' => 'Language specific options [<strong>%s</strong>]',
+ 'LETTER_NUM_DOTS' => 'Any letters, numbers and dots (periods)',
+ 'LETTER_NUM_ONLY' => 'Any letters and numbers',
+ 'LETTER_NUM_PUNCTUATION' => 'Any letters, numbers, comma, dots, underscores and dashes beginning with any letter',
+ 'LETTER_NUM_SPACERS' => 'Any letters, numbers and spacers',
+ 'LETTER_NUM_UNDERSCORE' => 'Any letters, numbers and underscores',
+
'MAX_FIELD_CHARS' => 'Maximum number of characters',
'MAX_FIELD_NUMBER' => 'Highest allowed number',
'MIN_FIELD_CHARS' => 'Minimum number of characters',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 83e1f4eaa1..79d504a67d 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -937,32 +937,34 @@ $lang = array_merge($lang, array(
// Timezones can be translated. We use this for the Etc/GMT timezones here,
// because they are named invers to their offset.
'timezones' => array(
- 'UTC' => 'UTC',
-
- 'Etc/GMT-12' => 'GMT+12',
- 'Etc/GMT-11' => 'GMT+11',
- 'Etc/GMT-10' => 'GMT+10',
- 'Etc/GMT-9' => 'GMT+9',
- 'Etc/GMT-8' => 'GMT+8',
- 'Etc/GMT-7' => 'GMT+7',
- 'Etc/GMT-6' => 'GMT+6',
- 'Etc/GMT-5' => 'GMT+5',
- 'Etc/GMT-4' => 'GMT+4',
- 'Etc/GMT-3' => 'GMT+3',
- 'Etc/GMT-2' => 'GMT+2',
- 'Etc/GMT-1' => 'GMT+1',
- 'Etc/GMT+1' => 'GMT-1',
- 'Etc/GMT+2' => 'GMT-2',
- 'Etc/GMT+3' => 'GMT-3',
- 'Etc/GMT+4' => 'GMT-4',
- 'Etc/GMT+5' => 'GMT-5',
- 'Etc/GMT+6' => 'GMT-6',
- 'Etc/GMT+7' => 'GMT-7',
- 'Etc/GMT+8' => 'GMT-8',
- 'Etc/GMT+9' => 'GMT-9',
- 'Etc/GMT+10' => 'GMT-10',
- 'Etc/GMT+11' => 'GMT-11',
- 'Etc/GMT+12' => 'GMT-12',
+ 'UTC' => 'UTC',
+ 'UTC_OFFSET' => 'UTC%1$s',
+ 'UTC_OFFSET_CURRENT' => 'UTC%1$s - %2$s',
+
+ 'Etc/GMT-12' => 'UTC+12',
+ 'Etc/GMT-11' => 'UTC+11',
+ 'Etc/GMT-10' => 'UTC+10',
+ 'Etc/GMT-9' => 'UTC+9',
+ 'Etc/GMT-8' => 'UTC+8',
+ 'Etc/GMT-7' => 'UTC+7',
+ 'Etc/GMT-6' => 'UTC+6',
+ 'Etc/GMT-5' => 'UTC+5',
+ 'Etc/GMT-4' => 'UTC+4',
+ 'Etc/GMT-3' => 'UTC+3',
+ 'Etc/GMT-2' => 'UTC+2',
+ 'Etc/GMT-1' => 'UTC+1',
+ 'Etc/GMT+1' => 'UTC-1',
+ 'Etc/GMT+2' => 'UTC-2',
+ 'Etc/GMT+3' => 'UTC-3',
+ 'Etc/GMT+4' => 'UTC-4',
+ 'Etc/GMT+5' => 'UTC-5',
+ 'Etc/GMT+6' => 'UTC-6',
+ 'Etc/GMT+7' => 'UTC-7',
+ 'Etc/GMT+8' => 'UTC-8',
+ 'Etc/GMT+9' => 'UTC-9',
+ 'Etc/GMT+10' => 'UTC-10',
+ 'Etc/GMT+11' => 'UTC-11',
+ 'Etc/GMT+12' => 'UTC-12',
'Africa/Abidjan' => 'Africa/Abidjan',
'Africa/Accra' => 'Africa/Accra',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index d692828bd7..101292e171 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -214,6 +214,11 @@ $lang = array_merge($lang, array(
'FIELD_INVALID_CHARS_ALPHA_PUNCTUATION' => 'The field “%s” has invalid characters, only alphanumeric or _,-. characters are allowed and the first character must be alphabetic.',
'FIELD_INVALID_CHARS_ALPHA_SPACERS' => 'The field “%s” has invalid characters, only alphanumeric, space or -+_[] characters are allowed.',
'FIELD_INVALID_CHARS_ALPHA_UNDERSCORE' => 'The field “%s” has invalid characters, only alphanumeric or _ characters are allowed.',
+ 'FIELD_INVALID_CHARS_LETTER_NUM_DOTS' => 'The field “%s” has invalid characters, only letter, number or . characters are allowed.',
+ 'FIELD_INVALID_CHARS_LETTER_NUM_ONLY' => 'The field “%s” has invalid characters, only letter and number characters are allowed.',
+ 'FIELD_INVALID_CHARS_LETTER_NUM_PUNCTUATION' => 'The field “%s” has invalid characters, only letter, number or _,-. characters are allowed and the first character must be alphabetic.',
+ 'FIELD_INVALID_CHARS_LETTER_NUM_SPACERS' => 'The field “%s” has invalid characters, only letter, number, space or -+_[] characters are allowed.',
+ 'FIELD_INVALID_CHARS_LETTER_NUM_UNDERSCORE' => 'The field “%s” has invalid characters, only letter, number or _ characters are allowed.',
'FIELD_INVALID_DATE' => 'The field “%s” has an invalid date.',
'FIELD_INVALID_URL' => 'The field “%s” has an invalid url.',
'FIELD_INVALID_VALUE' => 'The field “%s” has an invalid value.',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 4f4dcb1b41..919036a85c 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -283,21 +283,20 @@ switch ($mode)
continue;
}
- $rank_title = $rank_img = $rank_img_src = '';
- get_user_rank($row['user_rank'], (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']), $rank_title, $rank_img, $rank_img_src);
+ $user_rank_data = phpbb_get_user_rank($row, (($row['user_id'] == ANONYMOUS) ? false : $row['user_posts']));
$template->assign_block_vars('group.user', array(
'USER_ID' => $row['user_id'],
'FORUMS' => $row['forums'],
'FORUM_OPTIONS' => (isset($row['forums_options'])) ? true : false,
- 'RANK_TITLE' => $rank_title,
+ 'RANK_TITLE' => $user_rank_data['title'],
'GROUP_NAME' => $groups_ary[$row['default_group']]['group_name'],
'GROUP_COLOR' => $groups_ary[$row['default_group']]['group_colour'],
'U_GROUP' => $groups_ary[$row['default_group']]['u_group'],
- 'RANK_IMG' => $rank_img,
- 'RANK_IMG_SRC' => $rank_img_src,
+ 'RANK_IMG' => $user_rank_data['img'],
+ 'RANK_IMG_SRC' => $user_rank_data['img_src'],
'U_PM' => ($config['allow_privmsg'] && $auth->acl_get('u_sendpm') && ($row['user_allow_pm'] || $auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_'))) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;u=' . $row['user_id']) : '',
@@ -1080,10 +1079,14 @@ switch ($mode)
$avatar_img = phpbb_get_group_avatar($group_row);
// ... same for group rank
- $rank_title = $rank_img = $rank_img_src = '';
+ $user_rank_data = array(
+ 'title' => null,
+ 'img' => null,
+ 'img_src' => null,
+ );
if ($group_row['group_rank'])
{
- get_user_rank($group_row['group_rank'], false, $rank_title, $rank_img, $rank_img_src);
+ $user_rank_data = phpbb_get_user_rank($group_row, false);
if ($rank_img)
{
@@ -1096,11 +1099,11 @@ switch ($mode)
'GROUP_NAME' => ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'],
'GROUP_COLOR' => $group_row['group_colour'],
'GROUP_TYPE' => $user->lang['GROUP_IS_' . $group_row['l_group_type']],
- 'GROUP_RANK' => $rank_title,
+ 'GROUP_RANK' => $user_rank_data['title'],
'AVATAR_IMG' => $avatar_img,
- 'RANK_IMG' => $rank_img,
- 'RANK_IMG_SRC' => $rank_img_src,
+ 'RANK_IMG' => $user_rank_data['img'],
+ 'RANK_IMG_SRC' => $user_rank_data['img_src'],
'U_PM' => ($auth->acl_get('u_sendpm') && $auth->acl_get('u_masspm_group') && $group_row['group_receive_pm'] && $config['allow_privmsg'] && $config['allow_mass_pm']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&amp;mode=compose&amp;g=' . $group_id) : '',)
);
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index 902c6ae84c..c0ce3f1fba 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -105,7 +105,7 @@ class oauth extends \phpbb\auth\provider\base
protected $phpbb_root_path;
/**
- * PHP extenstion
+ * PHP file extension
*
* @var string
*/
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php
index e2932086db..187e455d48 100644
--- a/phpBB/phpbb/controller/helper.php
+++ b/phpBB/phpbb/controller/helper.php
@@ -140,8 +140,18 @@ class helper
// If enable_mod_rewrite is false we need to replace the current front-end by app.php, otherwise we need to remove it.
$base_url = str_replace('/' . $page_name, empty($this->config['enable_mod_rewrite']) ? '/app.' . $this->php_ext : '', $base_url);
- // We need to update the base url to move to the directory of the app.php file.
- $base_url = str_replace('/app.' . $this->php_ext, '/' . $this->phpbb_root_path . 'app.' . $this->php_ext, $base_url);
+ // We need to update the base url to move to the directory of the app.php file if the current script is not app.php
+ if ($page_name !== 'app.php')
+ {
+ if (empty($this->config['enable_mod_rewrite']))
+ {
+ $base_url = str_replace('/app.' . $this->php_ext, '/' . $this->phpbb_root_path . 'app.' . $this->php_ext, $base_url);
+ }
+ else
+ {
+ $base_url .= preg_replace(get_preg_expression('path_remove_dot_trailing_slash'), '$2', $this->phpbb_root_path);
+ }
+ }
$base_url = $this->filesystem->clean_path($base_url);
diff --git a/phpBB/phpbb/datetime.php b/phpBB/phpbb/datetime.php
index e674707883..63cdba90fd 100644
--- a/phpBB/phpbb/datetime.php
+++ b/phpBB/phpbb/datetime.php
@@ -91,25 +91,28 @@ class datetime extends \DateTime
$midnight = $midnight->getTimestamp();
- $day = false;
-
- if ($timestamp > $midnight + 86400)
- {
- $day = 'TOMORROW';
- }
- else if ($timestamp > $midnight)
- {
- $day = 'TODAY';
- }
- else if ($timestamp > $midnight - 86400)
- {
- $day = 'YESTERDAY';
- }
-
- if ($day !== false)
+ if ($timestamp <= $midnight + 2 * 86400)
{
- // Format using the short formatting and finally swap out the relative token placeholder with the correct value
- return str_replace(self::RELATIVE_WRAPPER . self::RELATIVE_WRAPPER, $this->user->lang['datetime'][$day], strtr(parent::format($format['format_short']), $format['lang']));
+ $day = false;
+
+ if ($timestamp > $midnight + 86400)
+ {
+ $day = 'TOMORROW';
+ }
+ else if ($timestamp > $midnight)
+ {
+ $day = 'TODAY';
+ }
+ else if ($timestamp > $midnight - 86400)
+ {
+ $day = 'YESTERDAY';
+ }
+
+ if ($day !== false)
+ {
+ // Format using the short formatting and finally swap out the relative token placeholder with the correct value
+ return str_replace(self::RELATIVE_WRAPPER . self::RELATIVE_WRAPPER, $this->user->lang['datetime'][$day], strtr(parent::format($format['format_short']), $format['lang']));
+ }
}
}
}
diff --git a/phpBB/phpbb/db/migration/data/v310/profilefield_field_validation_length.php b/phpBB/phpbb/db/migration/data/v310/profilefield_field_validation_length.php
new file mode 100644
index 0000000000..c7d8b2dc91
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/profilefield_field_validation_length.php
@@ -0,0 +1,90 @@
+<?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\v310;
+
+class profilefield_field_validation_length extends \phpbb\db\migration\migration
+{
+ protected $validation_options_old = array(
+ 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+',
+ );
+
+ protected $validation_options_new = array(
+ 'ALPHA_SPACERS' => '[\w\x20_+\-\[\]]+',
+ );
+
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\rc3',
+ );
+ }
+
+ public function update_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_validation' => array('VCHAR_UNI:64', ''),
+ ),
+ ),
+ );
+ }
+
+ public function revert_schema()
+ {
+ return array(
+ 'change_columns' => array(
+ $this->table_prefix . 'profile_fields' => array(
+ 'field_validation' => array('VCHAR_UNI:20', ''),
+ ),
+ ),
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('custom', array(array($this, 'update_profile_fields_validation'))),
+ );
+ }
+
+ public function revert_data()
+ {
+ return array(
+ array('custom', array(array($this, 'revert_profile_fields_validation'))),
+ );
+ }
+
+ public function update_profile_fields_validation()
+ {
+ foreach ($this->validation_options_new as $validation_type => $regex)
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "profile_fields
+ SET field_validation = '" . $this->db->sql_escape($this->validation_options_new[$validation_type]) . "'
+ WHERE field_validation = '" . $this->db->sql_escape($this->validation_options_old[$validation_type]) . "'";
+ $this->sql_query($sql);
+ }
+ }
+
+ public function revert_profile_fields_validation()
+ {
+ foreach ($this->validation_options_new as $validation_type => $regex)
+ {
+ $sql = 'UPDATE ' . $this->table_prefix . "profile_fields
+ SET field_validation = '" . $this->db->sql_escape($this->validation_options_old[$validation_type]) . "'
+ WHERE field_validation = '" . $this->db->sql_escape($this->validation_options_new[$validation_type]) . "'";
+ $this->sql_query($sql);
+ }
+ }
+}
diff --git a/phpBB/phpbb/db/migration/data/v310/rc4.php b/phpBB/phpbb/db/migration/data/v310/rc4.php
new file mode 100644
index 0000000000..47de8291c1
--- /dev/null
+++ b/phpBB/phpbb/db/migration/data/v310/rc4.php
@@ -0,0 +1,32 @@
+<?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\v310;
+
+class rc4 extends \phpbb\db\migration\migration
+{
+ static public function depends_on()
+ {
+ return array(
+ '\phpbb\db\migration\data\v310\rc3',
+ '\phpbb\db\migration\data\v310\notifications_use_full_name',
+ );
+ }
+
+ public function update_data()
+ {
+ return array(
+ array('config.update', array('version', '3.1.0-RC4')),
+ );
+ }
+}
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index 3567570137..0781d7425e 100644
--- a/phpBB/phpbb/db/tools.php
+++ b/phpBB/phpbb/db/tools.php
@@ -1512,7 +1512,7 @@ class tools
$sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
}
- if (!is_null($column_data[1]))
+ if (!is_null($column_data[1]) || (isset($column_data[2]) && $column_data[2] == 'auto_increment'))
{
$sql .= 'NOT NULL';
}
diff --git a/phpBB/phpbb/di/pass/kernel_pass.php b/phpBB/phpbb/di/pass/kernel_pass.php
deleted file mode 100644
index c154c7532d..0000000000
--- a/phpBB/phpbb/di/pass/kernel_pass.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?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\di\pass;
-
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
-
-class kernel_pass implements CompilerPassInterface
-{
- /**
- * Modify the container before it is passed to the rest of the code
- *
- * @param ContainerBuilder $container ContainerBuilder object
- * @return null
- * @throws \InvalidArgumentException
- */
- public function process(ContainerBuilder $container)
- {
- $definition = $container->getDefinition('dispatcher');
-
- foreach ($container->findTaggedServiceIds('kernel.event_listener') as $id => $events)
- {
- foreach ($events as $event)
- {
- $priority = isset($event['priority']) ? $event['priority'] : 0;
-
- if (!isset($event['event']))
- {
- throw new \InvalidArgumentException(sprintf('Service "%1$s" must define the "event" attribute on "kernel.event_listener" tags.', $id));
- }
-
- if (!isset($event['method']))
- {
- throw new \InvalidArgumentException(sprintf('Service "%1$s" must define the "method" attribute on "kernel.event_listener" tags.', $id));
- }
-
- $definition->addMethodCall('addListenerService', array($event['event'], array($id, $event['method']), $priority));
- }
- }
-
- foreach ($container->findTaggedServiceIds('kernel.event_subscriber') as $id => $attributes)
- {
- // We must assume that the class value has been correctly filled, even if the service is created by a factory
- $class = $container->getDefinition($id)->getClass();
-
- $refClass = new \ReflectionClass($class);
- $interface = 'Symfony\Component\EventDispatcher\EventSubscriberInterface';
- if (!$refClass->implementsInterface($interface))
- {
- throw new \InvalidArgumentException(sprintf('Service "%1$s" must implement interface "%2$s".', $id, $interface));
- }
-
- $definition->addMethodCall('addSubscriberService', array($id, $class));
- }
- }
-}
diff --git a/phpBB/phpbb/profilefields/type/type_base.php b/phpBB/phpbb/profilefields/type/type_base.php
index c770a0d93c..52f5d15511 100644
--- a/phpBB/phpbb/profilefields/type/type_base.php
+++ b/phpBB/phpbb/profilefields/type/type_base.php
@@ -133,7 +133,7 @@ abstract class type_base implements type_interface
{
foreach ($field_data[$key] as $lang_id => $options)
{
- $field_data[$key][$lang_id] = explode("\n", $options);
+ $field_data[$key][$lang_id] = is_array($options) ? $options : explode("\n", $options);
}
return $current_value;
diff --git a/phpBB/phpbb/profilefields/type/type_string_common.php b/phpBB/phpbb/profilefields/type/type_string_common.php
index 0eaf7e527d..ff33a7b49c 100644
--- a/phpBB/phpbb/profilefields/type/type_string_common.php
+++ b/phpBB/phpbb/profilefields/type/type_string_common.php
@@ -21,8 +21,13 @@ abstract class type_string_common extends type_base
'ALPHA_ONLY' => '[\w]+',
'ALPHA_UNDERSCORE' => '[\w_]+',
'ALPHA_DOTS' => '[\w.]+',
- 'ALPHA_SPACERS' => '[\w_\+\. \-\[\]]+',
+ 'ALPHA_SPACERS' => '[\w\x20_+\-\[\]]+',
'ALPHA_PUNCTUATION' => '[a-zA-Z][\w\.,\-_]+',
+ 'LETTER_NUM_ONLY' => '[\p{Lu}\p{Ll}0-9]+',
+ 'LETTER_NUM_UNDERSCORE' => '[\p{Lu}\p{Ll}0-9_]+',
+ 'LETTER_NUM_DOTS' => '[\p{Lu}\p{Ll}0-9.]+',
+ 'LETTER_NUM_SPACERS' => '[\p{Lu}\p{Ll}0-9\x20_+\-\[\]]+',
+ 'LETTER_NUM_PUNCTUATION' => '[\p{Lu}\p{Ll}][\p{Lu}\p{Ll}0-9.,\-_]+',
);
/**
@@ -79,7 +84,7 @@ abstract class type_string_common extends type_base
if (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')
{
$field_validate = ($field_type != 'text') ? $field_value : bbcode_nl2br($field_value);
- if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#i', $field_validate))
+ if (!preg_match('#^' . str_replace('\\\\', '\\', $field_data['field_validation']) . '$#iu', $field_validate))
{
$validation = array_search($field_data['field_validation'], $this->validation_options);
if ($validation)
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php
index 30b364821d..da8b848fa5 100644
--- a/phpBB/phpbb/session.php
+++ b/phpBB/phpbb/session.php
@@ -441,12 +441,13 @@ class session
if (!$session_expired)
{
- // Only update session DB a minute or so after last update or if page changes and is not ajax request
- if (($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page'])) && !$request->is_ajax())
+ // Only update session DB a minute or so after last update or if page changes
+ if ($this->time_now - $this->data['session_time'] > 60 || ($this->update_session_page && $this->data['session_page'] != $this->page['page']))
{
$sql_ary = array('session_time' => $this->time_now);
- if ($this->update_session_page)
+ // Do not update the session page for ajax requests, so the view online still works as intended
+ if ($this->update_session_page && !$request->is_ajax())
{
$sql_ary['session_page'] = substr($this->page['page'], 0, 199);
$sql_ary['session_forum_id'] = $this->page['forum'];
diff --git a/phpBB/phpbb/template/base.php b/phpBB/phpbb/template/base.php
index ab0e1f281d..9a40702ba8 100644
--- a/phpBB/phpbb/template/base.php
+++ b/phpBB/phpbb/template/base.php
@@ -142,11 +142,11 @@ abstract class base implements template
{
global $phpbb_hook;
- if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, $method), $handle, $this))
+ if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array('template', $method), $handle, $this))
{
- if ($phpbb_hook->hook_return(array(__CLASS__, $method)))
+ if ($phpbb_hook->hook_return(array('template', $method)))
{
- $result = $phpbb_hook->hook_return_result(array(__CLASS__, $method));
+ $result = $phpbb_hook->hook_return_result(array('template', $method));
return array($result);
}
}
diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php
index ea98034434..882e9cef26 100644
--- a/phpBB/phpbb/user.php
+++ b/phpBB/phpbb/user.php
@@ -717,7 +717,7 @@ class user extends \phpbb\session
$utc = new \DateTimeZone('UTC');
}
- $time = new \phpbb\datetime($this, "@$gmepoch", $utc);
+ $time = new $this->datetime($this, "@$gmepoch", $utc);
$time->setTimezone($this->timezone);
return $time->format($format, $forcedate);
diff --git a/phpBB/phpbb/user_loader.php b/phpBB/phpbb/user_loader.php
index c9707ee432..24e663b150 100644
--- a/phpBB/phpbb/user_loader.php
+++ b/phpBB/phpbb/user_loader.php
@@ -212,7 +212,7 @@ class user_loader
return '';
}
- if (!function_exists('get_user_rank'))
+ if (!function_exists('phpbb_get_user_rank'))
{
include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext);
}
@@ -223,7 +223,10 @@ class user_loader
'rank_img_src',
);
- get_user_rank($user['user_rank'], (($user['user_id'] == ANONYMOUS) ? false : $user['user_posts']), $rank['rank_title'], $rank['rank_img'], $rank['rank_img_src']);
+ $user_rank_data = phpbb_get_user_rank($user, (($user['user_id'] == ANONYMOUS) ? false : $user['user_posts']));
+ $rank['rank_title'] = $user_rank_data['title'];
+ $rank['rank_img'] = $user_rank_data['img'];
+ $rank['rank_img_src'] = $user_rank_data['img_src'];
return $rank;
}
diff --git a/phpBB/search.php b/phpBB/search.php
index 93f12f4310..0d269c5606 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -553,16 +553,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// Grab icons
$icons = $cache->obtain_icons();
- // Output header
- if ($found_more_search_matches)
- {
- $l_search_matches = $user->lang('FOUND_MORE_SEARCH_MATCHES', (int) $total_match_count);
- }
- else
- {
- $l_search_matches = $user->lang('FOUND_SEARCH_MATCHES', (int) $total_match_count);
- }
-
// define some vars for urls
// A single wildcard will make the search results look ugly
$hilit = phpbb_clean_search_string(str_replace(array('+', '-', '|', '(', ')', '&quot;'), ' ', $keywords));
@@ -584,44 +574,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_search .= ($search_fields != 'all') ? '&amp;sf=' . $search_fields : '';
$u_search .= ($return_chars != 300) ? '&amp;ch=' . $return_chars : '';
- // Check if search backend supports phrase search or not
- $phrase_search_disabled = '';
- if (strpos(html_entity_decode($keywords), '"') !== false && method_exists($search, 'supports_phrase_search'))
- {
- $phrase_search_disabled = $search->supports_phrase_search() ? false : true;
- }
-
- $pagination->generate_template_pagination($u_search, 'pagination', 'start', $total_match_count, $per_page, $start);
-
- $template->assign_vars(array(
- 'SEARCH_TITLE' => $l_search_title,
- 'SEARCH_MATCHES' => $l_search_matches,
- 'SEARCH_WORDS' => $keywords,
- 'SEARCHED_QUERY' => $search->get_search_query(),
- 'IGNORED_WORDS' => (!empty($common_words)) ? implode(' ', $common_words) : '',
-
- 'PHRASE_SEARCH_DISABLED' => $phrase_search_disabled,
-
- 'TOTAL_MATCHES' => $total_match_count,
- 'SEARCH_IN_RESULTS' => ($search_id) ? false : true,
-
- 'S_SELECT_SORT_DIR' => $s_sort_dir,
- 'S_SELECT_SORT_KEY' => $s_sort_key,
- 'S_SELECT_SORT_DAYS' => $s_limit_days,
- 'S_SEARCH_ACTION' => $u_search,
- 'S_SHOW_TOPICS' => ($show_results == 'posts') ? false : true,
-
- 'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
- 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
- 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
- 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
- 'DELETED_IMG' => $user->img('icon_topic_deleted', 'TOPIC_DELETED'),
- 'POLL_IMG' => $user->img('icon_topic_poll', 'TOPIC_POLL'),
- 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
-
- 'U_SEARCH_WORDS' => $u_search,
- ));
-
if ($sql_where)
{
if ($show_results == 'posts')
@@ -739,9 +691,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
* @var string sql_select The SQL SELECT string used by search to get topic data
* @var string sql_from The SQL FROM string used by search to get topic data
* @var string sql_where The SQL WHERE string used by search to get topic data
+ * @var int total_match_count The total number of search matches
* @since 3.1.0-a1
+ * @changed 3.1.0-RC5 Added total_match_count
*/
- $vars = array('sql_select', 'sql_from', 'sql_where');
+ $vars = array('sql_select', 'sql_from', 'sql_where', 'total_match_count');
extract($phpbb_dispatcher->trigger_event('core.search_get_topic_data', compact($vars)));
$sql = "SELECT $sql_select
@@ -1149,6 +1103,54 @@ if ($keywords || $author || $author_id || $search_id || $submit)
}
unset($rowset);
+ // Output header
+ if ($found_more_search_matches)
+ {
+ $l_search_matches = $user->lang('FOUND_MORE_SEARCH_MATCHES', (int) $total_match_count);
+ }
+ else
+ {
+ $l_search_matches = $user->lang('FOUND_SEARCH_MATCHES', (int) $total_match_count);
+ }
+
+ // Check if search backend supports phrase search or not
+ $phrase_search_disabled = '';
+ if (strpos(html_entity_decode($keywords), '"') !== false && method_exists($search, 'supports_phrase_search'))
+ {
+ $phrase_search_disabled = $search->supports_phrase_search() ? false : true;
+ }
+
+ $pagination->generate_template_pagination($u_search, 'pagination', 'start', $total_match_count, $per_page, $start);
+
+ $template->assign_vars(array(
+ 'SEARCH_TITLE' => $l_search_title,
+ 'SEARCH_MATCHES' => $l_search_matches,
+ 'SEARCH_WORDS' => $keywords,
+ 'SEARCHED_QUERY' => $search->get_search_query(),
+ 'IGNORED_WORDS' => (!empty($common_words)) ? implode(' ', $common_words) : '',
+
+ 'PHRASE_SEARCH_DISABLED' => $phrase_search_disabled,
+
+ 'TOTAL_MATCHES' => $total_match_count,
+ 'SEARCH_IN_RESULTS' => ($search_id) ? false : true,
+
+ 'S_SELECT_SORT_DIR' => $s_sort_dir,
+ 'S_SELECT_SORT_KEY' => $s_sort_key,
+ 'S_SELECT_SORT_DAYS' => $s_limit_days,
+ 'S_SEARCH_ACTION' => $u_search,
+ 'S_SHOW_TOPICS' => ($show_results == 'posts') ? false : true,
+
+ 'GOTO_PAGE_IMG' => $user->img('icon_post_target', 'GOTO_PAGE'),
+ 'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
+ 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
+ 'DELETED_IMG' => $user->img('icon_topic_deleted', 'TOPIC_DELETED'),
+ 'POLL_IMG' => $user->img('icon_topic_poll', 'TOPIC_POLL'),
+ 'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
+
+ 'U_SEARCH_WORDS' => $u_search,
+ ));
+
/**
* Modify the title and/or load data for the search results page
*
diff --git a/phpBB/styles/prosilver/style.cfg b/phpBB/styles/prosilver/style.cfg
index aea59021d6..1c4315f937 100644
--- a/phpBB/styles/prosilver/style.cfg
+++ b/phpBB/styles/prosilver/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = prosilver
copyright = © phpBB Limited, 2007
-style_version = 3.1.0-RC3
-phpbb_version = 3.1.0-RC3
+style_version = 3.1.0-RC4
+phpbb_version = 3.1.0-RC4
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/prosilver/template/forumlist_body.html b/phpBB/styles/prosilver/template/forumlist_body.html
index 22859b2452..c90f5b0639 100644
--- a/phpBB/styles/prosilver/template/forumlist_body.html
+++ b/phpBB/styles/prosilver/template/forumlist_body.html
@@ -26,7 +26,9 @@
<!-- EVENT forumlist_body_category_header_after -->
<!-- IF not forumrow.S_IS_CAT -->
+ <!-- EVENT forumlist_body_forum_row_before -->
<li class="row">
+ <!-- EVENT forumlist_body_forum_row_prepend -->
<dl class="icon {forumrow.FORUM_IMG_STYLE}">
<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}">
<!-- IF forumrow.S_UNREAD_FORUM --><a href="{forumrow.U_VIEWFORUM}" class="icon-link"></a><!-- ENDIF -->
@@ -80,7 +82,9 @@
</dd>
<!-- ENDIF -->
</dl>
+ <!-- EVENT forumlist_body_forum_row_append -->
</li>
+ <!-- EVENT forumlist_body_forum_row_after -->
<!-- ENDIF -->
<!-- IF forumrow.S_LAST_ROW -->
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index b31e7b7b5d..970a7bcdd1 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -11,10 +11,10 @@
<p><a class="arrow-{S_CONTENT_FLOW_BEGIN}" href="{U_SEARCH}" title="{L_SEARCH_ADV}">{L_GO_TO_SEARCH_ADV}</a></p>
<!-- ENDIF -->
-<!-- IF .pagination or SEARCH_MATCHES or PAGE_NUMBER -->
+<!-- IF .pagination or SEARCH_MATCHES or TOTAL_MATCHES or PAGE_NUMBER -->
<div class="action-bar top">
- <!-- IF SEARCH_MATCHES -->
+ <!-- IF TOTAL_MATCHES > 0 -->
<div class="search-box">
<form method="post" action="{S_SEARCH_ACTION}">
<fieldset>
@@ -178,9 +178,9 @@
<div class="action-bar bottom">
<div class="pagination">
{SEARCH_MATCHES}
- <!-- IF .pagination -->
+ <!-- IF .pagination -->
<!-- INCLUDE pagination.html -->
- <!-- ELSE -->
+ <!-- ELSE -->
&bull; {PAGE_NUMBER}
<!-- ENDIF -->
</div>
diff --git a/phpBB/styles/prosilver/template/timezone_option.html b/phpBB/styles/prosilver/template/timezone_option.html
index fc0579bffd..b8be456489 100644
--- a/phpBB/styles/prosilver/template/timezone_option.html
+++ b/phpBB/styles/prosilver/template/timezone_option.html
@@ -1,10 +1,12 @@
<dl>
<dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
- <!-- IF S_TZ_DATE_OPTIONS -->
+ <!-- IF .timezone_date -->
<dd id="tz_select_date" style="display: none;">
<select name="tz_date" id="tz_date" class="autowidth tz_select">
<option value="">{L_SELECT_CURRENT_TIME}</option>
- {S_TZ_DATE_OPTIONS}
+ <!-- BEGIN timezone_date -->
+ <option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
+ <!-- END timezone_date -->
</select>
<input type="button" id="tz_select_date_suggest" class="button2" style="display: none;" timezone-preselect="<!-- IF S_TZ_PRESELECT -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" />
</dd>
@@ -12,7 +14,13 @@
<dd>
<select name="tz" id="timezone" class="autowidth tz_select">
<option value="">{L_SELECT_TIMEZONE}</option>
- {S_TZ_OPTIONS}
+ <!-- BEGIN timezone_select -->
+ <optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
+ <!-- BEGIN timezone_options -->
+ <option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
+ <!-- END timezone_options -->
+ </optgroup>
+ <!-- END timezone_select -->
</select>
<!-- INCLUDEJS timezone.js -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 4463f6dfc0..127a3ca1aa 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -170,7 +170,7 @@
<!-- IF REMAINDER eq 0 -->
<div>
<!-- ENDIF -->
- <a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.contact.U_PROFILE_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
+ <a href="<!-- IF postrow.contact.U_CONTACT -->{postrow.contact.U_CONTACT}<!-- ELSE -->{postrow.U_POST_AUTHOR}<!-- ENDIF -->" title="{postrow.contact.NAME}"<!-- IF $S_LAST_CELL --> class="last-cell"<!-- ENDIF --><!-- IF postrow.contact.ID eq 'jabber' --> onclick="popup(this.href, 750, 320); return false;"<!-- ENDIF -->>
<span class="contact-icon {postrow.contact.ID}-icon">{postrow.contact.NAME}</span>
</a>
<!-- IF REMAINDER eq 3 or postrow.contact.S_LAST_ROW -->
diff --git a/phpBB/styles/prosilver/theme/cp.css b/phpBB/styles/prosilver/theme/cp.css
index d3699c3012..014bb91e7a 100644
--- a/phpBB/styles/prosilver/theme/cp.css
+++ b/phpBB/styles/prosilver/theme/cp.css
@@ -110,7 +110,7 @@ ul.cplist {
}
#tabs .tab, #minitabs .tab {
- display: inline-block;
+ display: block;
float: left;
font-size: 1em;
font-weight: bold;
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
index cbdeab11f9..f08a8a9691 100644
--- a/phpBB/styles/prosilver/theme/forms.css
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -129,6 +129,10 @@ dd select {
width: auto;
}
+dd select[multiple] {
+ width: 100%;
+}
+
dd textarea {
width: 85%;
}
@@ -410,7 +414,7 @@ input.button1:focus, input.button2:focus, input.button3:focus {
.search-header a.button {
border: 0;
- border-left: 1;
+ border-left: 1px;
padding: 3px 5px 3px 4px;
}
diff --git a/phpBB/styles/prosilver/theme/responsive.css b/phpBB/styles/prosilver/theme/responsive.css
index 698b9efd75..ed3ba61334 100644
--- a/phpBB/styles/prosilver/theme/responsive.css
+++ b/phpBB/styles/prosilver/theme/responsive.css
@@ -161,8 +161,7 @@ ul.topiclist.forums dd.topics dfn, ul.topiclist.topics dd.posts dfn {
font-weight: normal;
}
-@media only screen and (max-width: 550px), only screen and (max-device-width: 550px)
-{
+@media only screen and (max-width: 550px), only screen and (max-device-width: 550px) {
ul.topiclist.forums dt {
margin-right: 0;
}
@@ -191,8 +190,7 @@ ul.topiclist li.row dt a.subforum {
/* Notifications list
----------------------------------------*/
-@media only screen and (max-width: 350px), only screen and (max-device-width: 350px)
-{
+@media only screen and (max-width: 350px), only screen and (max-device-width: 350px) {
.dropdown-extended .dropdown-contents {
width: auto;
}
@@ -344,22 +342,23 @@ fieldset.quick-login label[for="autologin"] {
min-width: 50%;
}
-@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
-{
+@media only screen and (max-width: 500px), only screen and (max-device-width: 500px) {
+ dd label {
+ white-space: normal;
+ }
+
select, .inputbox {
max-width: 260px;
}
}
-@media only screen and (max-width: 430px), only screen and (max-device-width: 430px)
-{
+@media only screen and (max-width: 430px), only screen and (max-device-width: 430px) {
.section-viewtopic .search-box .inputbox {
width: 110px;
}
}
-@media only screen and (max-width: 320px), only screen and (max-device-width: 320px)
-{
+@media only screen and (max-width: 320px), only screen and (max-device-width: 320px) {
select, .inputbox {
max-width: 240px;
}
@@ -372,8 +371,7 @@ fieldset.quick-login label[for="autologin"] {
width: auto;
}
-@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
-{
+@media only screen and (max-width: 500px), only screen and (max-device-width: 500px) {
dl.details dt, dl.details dd {
width: auto;
float: none;
@@ -513,8 +511,7 @@ fieldset.display-actions {
width: 100%;
}
-@media only screen and (max-width: 500px), only screen and (max-device-width: 500px)
-{
+@media only screen and (max-width: 500px), only screen and (max-device-width: 500px) {
p.responsive-center {
float: none;
text-align: center;
diff --git a/phpBB/styles/subsilver2/style.cfg b/phpBB/styles/subsilver2/style.cfg
index 3ef3154742..0c0bd04456 100644
--- a/phpBB/styles/subsilver2/style.cfg
+++ b/phpBB/styles/subsilver2/style.cfg
@@ -21,8 +21,8 @@
# General Information about this style
name = subsilver2
copyright = © 2005 phpBB Limited
-style_version = 3.1.0-RC3
-phpbb_version = 3.1.0-RC3
+style_version = 3.1.0-RC4
+phpbb_version = 3.1.0-RC4
# Defining a different template bitfield
# template_bitfield = lNg=
diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html
index 0d522a6959..c1609f0979 100644
--- a/phpBB/styles/subsilver2/template/forumlist_body.html
+++ b/phpBB/styles/subsilver2/template/forumlist_body.html
@@ -39,7 +39,9 @@
<td class="catdiv" colspan="3">&nbsp;</td>
</tr>
<!-- ENDIF -->
+ <!-- EVENT forumlist_body_forum_row_before -->
<tr>
+ <!-- EVENT forumlist_body_forum_row_prepend -->
<td class="row1" width="50" align="center">{forumrow.FORUM_FOLDER_IMG}</td>
<td class="row1" width="100%">
<!-- IF forumrow.FORUM_IMAGE -->
@@ -83,7 +85,9 @@
<p class="topicdetails">{L_NO_POSTS}</p>
<!-- ENDIF -->
</td>
+ <!-- EVENT forumlist_body_forum_row_append -->
</tr>
+ <!-- EVENT forumlist_body_forum_row_after -->
<!-- ENDIF -->
<!-- EVENT forumlist_body_last_row_after -->
<!-- BEGINELSE -->
diff --git a/phpBB/styles/subsilver2/template/timezone_option.html b/phpBB/styles/subsilver2/template/timezone_option.html
index 0f27719f86..3fc7467d16 100644
--- a/phpBB/styles/subsilver2/template/timezone_option.html
+++ b/phpBB/styles/subsilver2/template/timezone_option.html
@@ -1,18 +1,26 @@
<tr>
<td class="row1" width="50%"><b class="genmed">{L_BOARD_TIMEZONE}{L_COLON}</b></td>
<td class="row2">
- <!-- IF S_TZ_DATE_OPTIONS -->
+ <!-- IF .timezone_date -->
<div id="tz_select_date" style="display: none;">
<select name="tz_date" id="tz_date" class="autowidth tz_select">
<option value="">{L_SELECT_CURRENT_TIME}</option>
- {S_TZ_DATE_OPTIONS}
+ <!-- BEGIN timezone_date -->
+ <option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
+ <!-- END timezone_date -->
</select><br />
<input type="button" id="tz_select_date_suggest" class="btnlite" style="display: none;" timezone-preselect="<!-- IF S_TZ_PRESELECT -->true<!-- ELSE -->false<!-- ENDIF -->" data-l-suggestion="{L_TIMEZONE_DATE_SUGGESTION}" value="{L_TIMEZONE_DATE_SUGGESTION}" />
</div>
<!-- ENDIF -->
<select name="tz" id="timezone" class="autowidth tz_select">
<option value="">{L_SELECT_TIMEZONE}</option>
- {S_TZ_OPTIONS}
+ <!-- BEGIN timezone_select -->
+ <optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
+ <!-- BEGIN timezone_options -->
+ <option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
+ <!-- END timezone_options -->
+ </optgroup>
+ <!-- END timezone_select -->
</select>
<!-- INCLUDEJS timezone.js -->
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index f8b4a54f05..a340dbe5ad 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1203,7 +1203,10 @@ while ($row = $db->sql_fetchrow($result))
$user_cache[$poster_id] = $user_cache_data;
- get_user_rank($row['user_rank'], false, $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
+ $user_rank_data = phpbb_get_user_rank($row, false);
+ $user_cache[$poster_id]['rank_title'] = $user_rank_data['title'];
+ $user_cache[$poster_id]['rank_image'] = $user_rank_data['img'];
+ $user_cache[$poster_id]['rank_image_src'] = $user_rank_data['img_src'];
}
else
{
@@ -1267,7 +1270,10 @@ while ($row = $db->sql_fetchrow($result))
$user_cache[$poster_id] = $user_cache_data;
- get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
+ $user_rank_data = phpbb_get_user_rank($row, false);
+ $user_cache[$poster_id]['rank_title'] = $user_rank_data['title'];
+ $user_cache[$poster_id]['rank_image'] = $user_rank_data['img'];
+ $user_cache[$poster_id]['rank_image_src'] = $user_rank_data['img_src'];
if ((!empty($row['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_email'))
{