aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_ban.html6
-rw-r--r--phpBB/adm/style/acp_users_overview.html23
-rw-r--r--phpBB/adm/style/captcha_recaptcha.html2
-rw-r--r--phpBB/common.php11
-rw-r--r--phpBB/develop/mysql_upgrader.php1
-rw-r--r--phpBB/docs/CHANGELOG.html308
-rw-r--r--phpBB/download/file.php2
-rw-r--r--phpBB/feed.php583
-rw-r--r--phpBB/includes/acm/acm_eaccelerator.php1
-rw-r--r--phpBB/includes/acm/acm_memcache.php6
-rw-r--r--phpBB/includes/acm/acm_memory.php5
-rw-r--r--phpBB/includes/acp/acp_forums.php14
-rw-r--r--phpBB/includes/acp/acp_icons.php47
-rw-r--r--phpBB/includes/acp/acp_inactive.php34
-rw-r--r--phpBB/includes/acp/acp_jabber.php16
-rw-r--r--phpBB/includes/acp/acp_profile.php8
-rw-r--r--phpBB/includes/acp/acp_users.php2
-rw-r--r--phpBB/includes/cache.php2
-rw-r--r--phpBB/includes/captcha/captcha_factory.php2
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php12
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/db/db_tools.php8
-rw-r--r--phpBB/includes/db/oracle.php2
-rw-r--r--phpBB/includes/functions.php13
-rw-r--r--phpBB/includes/functions_admin.php13
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_jabber.php3
-rw-r--r--phpBB/includes/functions_privmsgs.php7
-rw-r--r--phpBB/includes/functions_profile_fields.php6
-rw-r--r--phpBB/includes/mcp/mcp_queue.php1
-rw-r--r--phpBB/includes/mcp/mcp_reports.php9
-rw-r--r--phpBB/includes/message_parser.php17
-rw-r--r--phpBB/includes/questionnaire/questionnaire.php1
-rw-r--r--phpBB/includes/search/fulltext_mysql.php2
-rw-r--r--phpBB/includes/session.php6
-rw-r--r--phpBB/includes/template.php1
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php36
-rw-r--r--phpBB/install/database_update.php93
-rw-r--r--phpBB/install/index.php8
-rw-r--r--phpBB/install/install_install.php2
-rw-r--r--phpBB/install/install_update.php12
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/email/admin_welcome_activated.txt4
-rw-r--r--phpBB/language/en/email/admin_welcome_inactive.txt2
-rw-r--r--phpBB/language/en/help_faq.php2
-rw-r--r--phpBB/language/en/mcp.php2
-rw-r--r--phpBB/language/en/search_synonyms.php2
-rw-r--r--phpBB/language/en/ucp.php1
-rw-r--r--phpBB/memberlist.php8
-rw-r--r--phpBB/posting.php27
-rw-r--r--phpBB/report.php4
-rw-r--r--phpBB/search.php3
-rw-r--r--phpBB/style.php10
-rw-r--r--phpBB/styles/prosilver/template/captcha_recaptcha.html2
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js39
-rw-r--r--phpBB/styles/prosilver/template/index_body.html1
-rw-r--r--phpBB/styles/prosilver/template/login_body.html2
-rw-r--r--phpBB/styles/prosilver/template/login_forum.html1
-rw-r--r--phpBB/styles/prosilver/template/quickreply_editor.html16
-rw-r--r--phpBB/styles/prosilver/template/search_results.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html1
-rw-r--r--phpBB/styles/subsilver2/template/captcha_default.html2
-rw-r--r--phpBB/styles/subsilver2/template/captcha_qa.html4
-rw-r--r--phpBB/styles/subsilver2/template/captcha_recaptcha.html2
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html1
-rw-r--r--phpBB/styles/subsilver2/template/login_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/login_forum.html1
-rw-r--r--phpBB/styles/subsilver2/template/mcp_ban.html6
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html2
-rw-r--r--phpBB/viewtopic.php6
71 files changed, 915 insertions, 575 deletions
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index bc326345b0..539e8032dd 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -93,15 +93,15 @@
</dl>
<dl>
<dt><label for="unbanlength">{L_BAN_LENGTH}:</label></dt>
- <dd><input style="border: 0;" type="text" class="text full" disabled="disabled" name="unbanlength" id="unbanlength" /></dd>
+ <dd><input style="border: 0;" type="text" class="text full" readonly="readonly" name="unbanlength" id="unbanlength" /></dd>
</dl>
<dl>
<dt><label for="unbanreason">{L_BAN_REASON}:</label></dt>
- <dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbanreason" id="unbanreason" rows="5" cols="80">&nbsp;</textarea></dd>
+ <dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbanreason" id="unbanreason" rows="5" cols="80">&nbsp;</textarea></dd>
</dl>
<dl>
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt>
- <dd><textarea style="border: 0;" class="text full" disabled="disabled" name="unbangivereason" id="unbangivereason" rows="5" cols="80">&nbsp;</textarea></dd>
+ <dd><textarea style="border: 0;" class="text full" readonly="readonly" name="unbangivereason" id="unbangivereason" rows="5" cols="80">&nbsp;</textarea></dd>
</dl>
<p class="submit-buttons">
diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html
index e3eff369cc..d48cfa57be 100644
--- a/phpBB/adm/style/acp_users_overview.html
+++ b/phpBB/adm/style/acp_users_overview.html
@@ -124,13 +124,6 @@
<dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd>
</dl>
</div>
- <!-- IF not S_OWN_ACCOUNT -->
- <dl>
- <dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
- <dd><input type="checkbox" class="radio" name="delete" value="1" /></dd>
- <dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
- </dl>
- <!-- ENDIF -->
<p class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
@@ -141,4 +134,20 @@
</form>
+ <!-- IF not S_OWN_ACCOUNT -->
+ <form id="user_delete" method="post" action="{U_ACTION}">
+ <fieldset>
+ <legend>{L_DELETE_USER}</legend>
+ <dl>
+ <dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
+ <dd><select id="delete_type" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
+ </dl>
+ <p class="quick">
+ <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
+ <input type="hidden" name="delete" value="1" />
+ {S_FORM_TOKEN}
+ </p>
+ </fieldset>
+ <!-- ENDIF -->
+ </form>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/captcha_recaptcha.html b/phpBB/adm/style/captcha_recaptcha.html
index e4fa5dd426..702a4a1099 100644
--- a/phpBB/adm/style/captcha_recaptcha.html
+++ b/phpBB/adm/style/captcha_recaptcha.html
@@ -4,7 +4,7 @@
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
- lang : '{L_RECAPTCHA_LANG}',
+ lang : '{LA_RECAPTCHA_LANG}'
};
// ]]>
</script>
diff --git a/phpBB/common.php b/phpBB/common.php
index c4a3160102..9b6913e95f 100644
--- a/phpBB/common.php
+++ b/phpBB/common.php
@@ -19,8 +19,12 @@ if (!defined('IN_PHPBB'))
$starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0];
-// Report all errors, except notices
-error_reporting(E_ALL ^ E_NOTICE);
+// Report all errors, except notices and deprecation messages
+if (!defined('E_DEPRECATED'))
+{
+ define('E_DEPRECATED', 8192);
+}
+error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
/*
* Remove variables created by register_globals from the global scope
@@ -172,7 +176,8 @@ if (defined('DEBUG_EXTRA'))
}
// Load Extensions
-if (!empty($load_extensions))
+// dl() is deprecated and disabled by default as of PHP 5.3.
+if (!empty($load_extensions) && function_exists('dl'))
{
$load_extensions = explode(',', $load_extensions);
diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php
index 034c1c0c20..a677f4464b 100644
--- a/phpBB/develop/mysql_upgrader.php
+++ b/phpBB/develop/mysql_upgrader.php
@@ -796,6 +796,7 @@ function get_schema_struct()
'poster_ip' => array('INDEX', 'poster_ip'),
'poster_id' => array('INDEX', 'poster_id'),
'post_approved' => array('INDEX', 'post_approved'),
+ 'post_username' => array('INDEX', 'post_username'),
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
),
);
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 756754ddeb..3e4bb9c6c7 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -53,6 +53,7 @@
<ol>
<li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;">
+ <li><a href="#v306">Changes since 3.0.6</a></li>
<li><a href="#v305">Changes since 3.0.5</a></li>
<li><a href="#v304">Changes since 3.0.4</a></li>
<li><a href="#v303">Changes since 3.0.3</a></li>
@@ -85,119 +86,160 @@
<div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
- <a name="v305"></a><h3>1.i. Changes since 3.0.5</h3>
+ <a name="v306"></a><h3>1.i. 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>
+ <li>[Fix] Force full date for board online record date.</li>
+ <li>[Fix] Correctly reset login keys if passed value is the current user. (Bug #54125)</li>
+ <li>[Fix] Correctly set last modified headers. (Bug #54245, thanks Paul.J.Murphy)</li>
+ <li>[Fix] Show correct HTML title when reporting private messages. (Bug #54375)</li>
+ <li>[Fix] Correctly exclude subforums from ATOM Feeds. (Bug #54285)</li>
+ <li>[Fix] Do not link to user profile in ATOM feed entry if post has been made by the guest user. (Bug #54275)</li>
+ <li>[Fix] Make word censoring case insensitive. (Bug #54265)</li>
+ <li>[Fix] Fulltext-MySQL search for keywords and username at the same time. (Bug #54325)</li>
+ <li>[Fix] Various XHTML mistakes in prosilver. (Bug #54705)</li>
+ <li>[Fix] Correctly show topic ATOM feed link when only post id is specified. (Bug #53025)</li>
+ <li>[Fix] Cleanly handle forum/topic not found in ATOM Feeds. (Bug #54295)</li>
+ <li>[Fix] PHP 5.3 compatibility: Check if function dl() exists before calling it. (Bug #54665)</li>
+ <li>[Fix] PHP 5.3 compatibility: Disable E_DEPRECATED on startup to keep set_magic_quotes_runtime(0) quiet. (Bug #54495)</li>
+ <li>[Fix] Correctly replace table prefix before inserting schema data into the database. (Bug #54815)</li>
+ <li>[Fix] Correctly take post time instead of topic time for the overall forum feed statistics row. (Bug #55005)</li>
+ <li>[Fix] Posting errors with CAPTCHAs using user::add_lang(). (Bug #55245)</li>
+ <li>[Fix] Use memcache::replace() instead of memcache::set() for existing keys to prevent problems.</li>
+ <li>[Fix] Check for required functions in eAccelerator. (Bug #54465)</li>
+ <li>[Fix] Use correct RFC 3339 date format in ATOM feed. (Bug #55005)</li>
+ <li>[Fix] Do not deliver topics from unreadable or passworded forums in the news feed. (Bug #54345)</li>
+ <li>[Fix] Restore user language choice to compiled stylesheets. (Bug #54035)</li>
+ <li>[Fix] Add missing language entries. (Bug #55095)</li>
+ <li>[Fix] Do not permit unauthorised users to delete private messages from folder listing. (Bug #54355)</li>
+ <li>[Fix] Correctly check for empty strings in custom profile fields. (Bug #55335)</li>
+ <li>[Fix] Use correct options to parse BBCodes in signatures when previewing PMs.</li>
+ <li>[Fix] Correct rendering of prosilver quick reply under IE6. (Bug #54115 - Patch by Raimon)</li>
+ <li>[Fix] Correct wording for &quot;How do I show an image below my username&quot; question answer in FAQ. (Bug #23935)</li>
+ <li>[Fix] Handle export of private messages where all recipients were deleted. (Bug #50985)</li>
+ <li>[Fix] Correctly get unread status information for global announcements in search results.</li>
+ <li>[Change] Move redirect into a hidden field to avoid issues with mod_security. (Bug #54145)</li>
+ <li>[Change] Log activation through inactive users ACP. (Bug #30145)</li>
+ <li>[Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)</li>
+ <li>[Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)</li>
+ <li>[Change] Cache overall, forums, topics and news feeds for anonymous users and bots.</li>
+ <li>[Change] Alter ACP user quick tools interface to reduce confusion with the delete operation.</li>
+ </ul>
+
+ <a name="v305"></a><h3>1.ii. Changes since 3.0.5</h3>
<ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
<li>[Fix] Sorting by author or subject on viewtopic now preserves the order. (Bug #44875)</li>
- <li>[Fix] Correctly determine writable status of files on Windows operating system. (Bug #39035)</li>
- <li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695 - Patch by bantu)</li>
- <li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)</li>
- <li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545 - Patch by bantu, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
- <li>[Fix] Fix some ACP style issues (Bug #16109 - Patch by prototech)</li>
- <li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li>
- <li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li>
- <li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li>
- <li>[Fix] Correctly apply the can change vote permission again. Regression introduced in r9470. (Bug #45895)</li>
- <li>[Fix] Also remove data from friend/foe table when deleting user. (Bug #45345 - Patch by nickvergessen)</li>
+ <li>[Fix] Correctly determine writable status of files on Windows operating systems. (Bug #39035)</li>
+ <li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695)</li>
+ <li>[Fix] Correctly show private message history. (Bug #46065)</li>
+ <li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li>
+ <li>[Fix] Fix some ACP style issues. (Bug #16109 - Patch by prototech)</li>
+ <li>[Fix] Move post bump information markup to the template. (Bug #34295)</li>
+ <li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705)</li>
+ <li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215)</li>
+ <li>[Fix] Correctly apply the &quot;can change vote&quot; permission again. Regression introduced in r9470. (Bug #45895)</li>
+ <li>[Fix] Remove data from friend/foe table when deleting user. (Bug #45345)</li>
<li>[Fix] Correctly hide skiplink in prosilver right-to-left mode. (Bug #45765 - Patch by prototech and bantu)</li>
- <li>[Fix] Fix dynamic config update routine error if firebird is used (Bug #46315)</li>
- <li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255 - Patch by bantu)</li>
- <li>[Fix] Only change topic/post icon if icons are enabled and user is allowed to. (Bug #46355 - Patch by bantu)</li>
+ <li>[Fix] Fix dynamic config update routine error if firebird is used. (Bug #46315)</li>
+ <li>[Fix] Allow friends/foes to be added and removed at the same time. (Bug #46255)</li>
+ <li>[Fix] Only change topic/post icon on edit if icons are enabled and user is allowed to use icons. (Bug #46355)</li>
<li>[Fix] Fix saving custom profile fields in ACP if Oracle is used. (Bug #46015)</li>
<li>[Fix] Make view_log() more resilient to corrupt serialized data. (Bug #46545)</li>
- <li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585 - Patch by bantu)</li>
+ <li>[Fix] Show error if hostname lookup doesn't return a valid IP address when banning. (Bug #45585)</li>
<li>[Fix] Fix incorrect layout when loading private message draft. (Bug #38435 - Patch by nickvergessen)</li>
- <li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205 - Patch by nickvergessen)</li>
- <li>[Fix] Fix Oracle database backup (Bug #46715)</li>
- <li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245 - Patch by rxu)</li>
- <li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145 - Patch by nickvergessen)</li>
- <li>[Fix] Display user's Jabber address in popup when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</li>
- <li>[Fix] Correctly exclude forums from active topics list. (Bug #19135 - Patch by nickvergessen)</li>
- <li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</li>
- <li>[Fix] Fix function to recalculate Nested Sets (Bug #41555 - Patch by EXreaction)</li>
- <li>[Fix] Display but also highlight already used rank images when creating new ranks. (Bug #22665 - Patch by nickvergessen)</li>
- <li>[Fix] Correctly orientate quoted text image on RTL languages (Bug #33745 - Patch by nickvergessen)</li>
- <li>[Fix] Do not display &quot;View user notes&quot; and &quot;Warn user&quot; links in user profile if corresponding MCP modules are disabled. (Bug #10519 - Patch by rxu)</li>
- <li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875 - Patch by nickvergessen)</li>
- <li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945 - Patch by nickvergessen)</li>
+ <li>[Fix] Show proper error message when trying to add bots to friends/foes list. (Bug #40205)</li>
+ <li>[Fix] Fixed database backup and restore with Oracle DBMS. (Bug #46715)</li>
+ <li>[Fix] Update attachments table when deleting user and retaining his posts. (Bug #40245)</li>
+ <li>[Fix] Correctly detect files in subfolders when viewing cached template files. (Bug #46145)</li>
+ <li>[Fix] Display user's jabber address in popup if jabber functionality is disabled. (Bug #20775)</li>
+ <li>[Fix] Correctly exclude forums from active topics list. (Bug #19135)</li>
+ <li>[Fix] Do not display banned users in birthday list. (Bug #20625)</li>
+ <li>[Fix] Fix function to recalculate nested sets. (Bug #41555 - Patch by EXreaction)</li>
+ <li>[Fix] Display but also highlight already used rank images while assigning new ranks. (Bug #22665)</li>
+ <li>[Fix] Correctly orientate quoted text image on RTL languages. (Bug #33745)</li>
+ <li>[Fix] Do not display &quot;View user notes&quot; and &quot;Warn user&quot; links in user profile if corresponding MCP modules are disabled. (Bug #10519)</li>
+ <li>[Fix] Show proper error message when trying to create a private messages folder with an empty name. (Bug #39875)</li>
+ <li>[Fix] No longer state that it is possible to manage group leaders from the UCP. (Bug #19945)</li>
<li>[Fix] Do not throw an error when PDO is a shared module and not loaded preventing SQLite from being loaded.</li>
- <li>[Fix] Fix censoring of unicode words. (Bug #16555 - Patches by rxu)</li>
- <li>[Fix] Display coloured usernames in ACP groups management screens</li>
- <li>[Fix] Correctly describe founder permissions on trace-information (Bug #37235 - Patch by nickvergessen)</li>
- <li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005 - Patch by rxu)</li>
- <li>[Fix] Correctly load complex language variable using acp_language (Bug #45735 - Patch by leviatan21)</li>
- <li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances (Bug #43125 - Patch by leviatan21)</li>
- <li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565 - Patch by bantu)</li>
- <li>[Fix] Correctly check if install directory is still present. (Bug #46965 - Patch by rxu)</li>
- <li>[Fix] Correct banned user behaviour when &quot;force password change&quot; is enabled (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
+ <li>[Fix] Fix censoring of unicode words. (Bug #16555)</li>
+ <li>[Fix] Display coloured usernames in ACP groups management screens.</li>
+ <li>[Fix] Correctly describe founder permissions on trace-information. (Bug #37235)</li>
+ <li>[Fix] Correct the width value for poll_center.gif omitted in imageset.cfg for subsilver2. (Bug #43005)</li>
+ <li>[Fix] Correctly load complex language variable using acp_language. (Bug #45735 - Patch by leviatan21)</li>
+ <li>[Fix] Fix reapply_sid() to correctly strip session id in certain circumstances. (Bug #43125 - Patch by leviatan21)</li>
+ <li>[Fix] Correctly state why one language pack is marked with an asterisk in the ACP. (Bug #37565)</li>
+ <li>[Fix] Correctly check if install directory is still present. (Bug #46965)</li>
+ <li>[Fix] Correct banned user behaviour when &quot;force password change&quot; is enabled. (Bug #47145 - Patch by nickvergessen and leviatan21)</li>
<li>[Fix] Correctly display ACP logs options, without permission to clear logs. (Bug #24155 - Patch by leviatan21)</li>
<li>[Fix] Display topic icons in MCP forum view again (only prosilver).</li>
<li>[Fix] Properly display post status messages in topic when post is reported and unapproved (Bug #44455 - Patch by leviatan21)</li>
- <li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395 - Patch by nickvergessen)</li>
- <li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225 - Patch by nickvergessen)</li>
- <li>[Fix] Fix broken &quot;Report details&quot; link in the MCP. (Bug #46975 - Patch by nickvergessen)</li>
- <li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685 - Patch by bantu)</li>
- <li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345 - Patch by bantu)</li>
- <li>[Fix] Correct descriptions of the permissions to use BBCode, smilies, images and flash to be more relevant. (Bug #36065 - Patch by rxu)</li>
+ <li>[Fix] Do not remove recipients when loading private message draft. (Bug #38395)</li>
+ <li>[Fix] Add author name to moderator log when deleting post/topic. (Bug #46225)</li>
+ <li>[Fix] Fix broken &quot;Report details&quot; link in the MCP. (Bug #46975)</li>
+ <li>[Fix] Resolve accesskey conflicts in prosilver. (Bug #44685)</li>
+ <li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345)</li>
+ <li>[Fix] More descriptive descriptions for permissions to use BBCode, smilies, images and flash. (Bug #36065)</li>
<li>[Fix] Fix style issues in print mode. (Bug #26375 - Patch by leviatan21)</li>
- <li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625 - Patch by rxu)</li>
- <li>[Fix] Also fetch posts of guests and deleted or deactivated users when searching for author names. (Bug #36565, #47765 - Patch by nickvergessen)</li>
+ <li>[Fix] Fix minor issue with L_QUOTE language string missing in several PM composing modes. (Bug #39625)</li>
+ <li>[Fix] Also fetch posts of guests and deleted or deactivated users while searching for author names. (Bug #36565, #47765)</li>
<li>[Fix] Show end of ban in MCP and ACP when user is banned by duration. (Bug #47815 - Patch by Pyramide)</li>
- <li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685 - Patch by nickvergessen)</li>
- <li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155 - Patch by rxu)</li>
+ <li>[Fix] Correctly count posts awaiting approval in the MCP. (Bug #47685)</li>
+ <li>[Fix] Display user's posts count in private message when it is equal to 0 (prosilver). (Bug #40155)</li>
<li>[Fix] Only allow users to disable word censor if globally allowed. (Bug #47575 - Patch by 00mohgta7)</li>
- <li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite</li>
- <li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075 - Patch by rxu)</li>
- <li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</li>
- <li>[Fix] Properly convert and show filesize information. (Bug #47775 - Patch by bantu)</li>
- <li>[Fix] Add ability to prune users who never logged in. (Bug #44295 - Patch by rxu)</li>
- <li>[Fix] Show smilies and images in topic print view. (Bug #47265 - Patch by nickvergessen)</li>
- <li>[Fix] Force full date in private message print view. (Patch by nickvergessen)</li>
- <li>[Fix] Fix &quot;Always show a scrollbar for short pages&quot; for IE8 and Firefox 3.5 (Bug #47865 - Patch by stokerpiller)</li>
- <li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675 - Patch by nickvergessen)</li>
+ <li>[Fix] Fix database updater and db tools to support multiple column changes/additions/removals with SQLite.</li>
+ <li>[Fix] Correctly detect GZIP status in debug mode. (Bug #24075)</li>
+ <li>[Fix] Posting smilies in view more smilies screen now works again in IE. (Bug #46025 - Patch by leviatan21)</li>
+ <li>[Fix] Properly convert and show filesize information. (Bug #47775)</li>
+ <li>[Fix] Add ability to prune users who never logged in. (Bug #44295)</li>
+ <li>[Fix] Show smilies and images in topic print view. (Bug #47265)</li>
+ <li>[Fix] Force full date in private message print view.</li>
+ <li>[Fix] Fix &quot;Always show a scrollbar for short pages&quot; for IE8 and Firefox 3.5. (Bug #47865 - Patch by stokerpiller)</li>
+ <li>[Fix] Do not allow setting group as default group for pending users. (Bug #45675)</li>
<li>[Fix] Fail gracefully if store folder is not writable during update. (Bugs #46615, #46945)</li>
- <li>[Fix] Hide profile-icon from viewtopic-page if user has no permissions (subsilver2 only) (Bug #37635 - Patch by leviatan21)</li>
+ <li>[Fix] Hide profile-icon from viewtopic page if user has no permissions (subsilver2 only). (Bug #37635 - Patch by leviatan21)</li>
<li>[Fix] Correct escaping/unescaping in the LDAP authentication plugin. (Bug #48175)</li>
<li>[Fix] Add hard limit for smilies.</li>
<li>[Fix] Remove redundant SQL query from ucp.php. (Bug #40305)</li>
- <li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animation is disabled. (Bug #29385 - Patch by prototech)</li>
+ <li>[Fix] Reorder frame order of animated subsilver2 topic icons to be useful when animations are disabled. (Bug #29385 - Patch by prototech)</li>
<li>[Fix] Ensure user errors are displayed regardless of PHP settings. (Bug #47505)</li>
<li>[Fix] Permit null values for non-required integer custom profile fields and ensure zero complies with the range limits. (Bug #40925)</li>
<li>[Fix] Allow changing forum from select box under certain circumstances. (Bug #37525)</li>
<li>[Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)</li>
<li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li>
- <li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705 - Patch by rxu)</li>
- <li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li>
- <li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li>
- <li>[Fix] Fix set_custom_template for database-stored styles (Bug #40515 - Patch by nickvergessen)</li>
- <li>[Fix] Banning an already banned user states to be successful, but has no effect (Bug #47825 - Patch by Pyramide)</li>
- <li>[Fix] Do not add style-parameter to URL again, after admin re-authentification (Bug #18005 - Patch by leviatan21)</li>
- <li>[Fix] Do not cut post-message in between HTML-Entities on search.php (Bug #31505 - Patch by leviatan21)</li>
- <li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
+ <li>[Fix] Fix error with disapproval of topics having several queued posts only. (Bug #47705)</li>
+ <li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags).</li>
+ <li>[Fix] Be less strict with FTP daemons for getting directory filelists. (Bug #46295)</li>
+ <li>[Fix] Fix set_custom_template for database-stored styles. (Bug #40515)</li>
+ <li>[Fix] Banning an already banned user states to be successful, but has no effect. (Bug #47825 - Patch by Pyramide)</li>
+ <li>[Fix] Do not add style parameter again to URL after admin re-authentification. (Bug #18005 - Patch by leviatan21)</li>
+ <li>[Fix] Do not cut post-message in between HTML-Entities on search.php. (Bug #31505 - Patch by leviatan21)</li>
+ <li>[Fix] Correctly set attachment flag for topics, posts and pms after deleting attachments. (Bug #48265 - Patch by MarcoDM and nickvergessen)</li>
<li>[Fix] Display &quot;Locked&quot; button instead of &quot;Reply&quot; one for locked forum in viewtopic (prosilver). (Bug #38055 - Patch by Raimon)</li>
- <li>[Fix] Correctly propagate umlauts over search result pages (Bug #33755)</li>
+ <li>[Fix] Correctly propagate umlauts over search result pages. (Bug #33755)</li>
<li>[Fix] Preserve post options when refusing to save the post as a draft. (Bug #39115)</li>
<li>[Fix] Do not send private message back to sender if sender is in the same group the private message was sent to.</li>
- <li>[Fix] Correctly add user to a group making it a default one. (Bug #48345 - Patch by rxu)</li>
+ <li>[Fix] Correctly add user to a group making it a default one. (Bug #48345)</li>
<li>[Fix] Add log entry when copying forum permissions.</li>
- <li>[Fix] Min/max characters per posts no longer affects poll options (Bug #47295 - Patch by nickvergessen)</li>
- <li>[Fix] Correctly log action when users request to join a group (Bug #37585 - Patch by nickvergessen)</li>
+ <li>[Fix] Min/max characters per posts no longer affects poll options. (Bug #47295)</li>
+ <li>[Fix] Correctly log action when users request to join a group. (Bug #37585)</li>
<li>[Fix] Do not try to create thumbnails for images we cannot open properly. (Bug #48695)</li>
<li>[Fix] Apply locale-independent basename() to attachment filenames. New function added: utf8_basename(). (Bug #43335 - Patch by ocean=Yohsuke)</li>
<li>[Fix] Adjust build_url() to not prepend $phpbb_root_path if path returned from redirect() is an URL. This fixes redirect issues with some installations and bridges. (Bug #47535)</li>
<li>[Fix] Do not mark global announcements as read if all topics in a forum become read (Bug #15729).</li>
- <li>[Fix] Fix general error while registration, through undefined variable $config in validate_referer (Bug #49035 - Patch by wjvriend)</li>
+ <li>[Fix] Fix general error in registration, caused by an undefined $config variable in validate_referer(). (Bug #49035 - Patch by wjvriend)</li>
<li>[Fix] Correctly extract column default value when exporting PostgreSQL tables. (Bug #48955)</li>
<li>[Fix] Allow updater to work correctly with PHP filename extensions other than &quot;.php&quot;. (Bugs #15809, #49215)</li>
<li>[Fix] Update search index if only post subject changed. (Bug #49435)</li>
<li>[Fix] Fix who is online displaying incorrect data. (Bug #49485, thanks Brainy)</li>
- <li>[Fix] Fixed incorrect &quot;topic does not exist&quot; when unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
+ <li>[Fix] Fixed incorrect &quot;topic does not exist&quot; if unapproved posts were visited without global moderator permissions. (Bug #47795)</li>
<li>[Fix] Prevent style switcher from blocking the tab key. (Bug #49335)</li>
- <li>[Fix] Correctly redirect on MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
+ <li>[Fix] Correctly redirect back to MCP main page after posts approval/disapproval from it. (Bug #49625)</li>
<li>[Fix] Do not display topic approval status image for shadow topic if a user is not a moderator in the forum the topic has been moved to. (Bug #43295)</li>
- <li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)</li>
- <li>[Fix] Correctly orientate Control-Panel-Navigation background-image on RTL languages. (Bug #49945)</li>
+ <li>[Fix] Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the mail()-function. (Bug #46725)</li>
+ <li>[Fix] Correctly orientate control panel navigation background-image on RTL languages. (Bug #49945)</li>
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</li>
<li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
<li>[Fix] Only show &quot;Add friend&quot; and &quot;Add foe&quot; links if the specific module is enabled. (Bug #50475)</li>
@@ -210,45 +252,46 @@
<li>[Fix] Fix icon alignment for forums with large descriptions in subsilver2. (Bug #50445)</li>
<li>[Fix] Correctly display underlined links placed in last line in viewtopic. (Bug #14811 - Patch by primehalo)</li>
<li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
- <li>[Fix] Fixed database backup and restore with Oracle DBMS.</li>
- <li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints)</li>
+ <li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints).</li>
+ <li>[Fix] Jabber SASL PLAIN authentication failures. (Bug #52995)</li>
+ <li>[Fix] Check sort options on memberlist to avoid a general error. (Bug #53655)</li>
+ <li>[Fix] Fix sql error in cache_moderators() if using postgresql. (Bug #53765)</li>
<li>[Change] Database updater now supports checking for existing/missing indexes.</li>
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>
- <li>[Change] Template engine now permits to a limited extent variable includes.</li>
+ <li>[Change] Template engine now permits variable includes to a limited extent.</li>
<li>[Change] Quote BBCode no longer requires the f_reply permission. (Bug #16079)</li>
- <li>[Change] Banning/unbanning users now generates an entry in their user notes (Bug #21825 - Patch by nickvergessen)</li>
+ <li>[Change] Banning/unbanning users now generates an entry in their user notes. (Bug #21825)</li>
<li>[Change] Smilies no longer require the f_bbcode permission. (Bug #26545)</li>
- <li>[Change] Ability to define column split in FAQ/BBCode help (Bug #31405)</li>
- <li>[Change] Changed behaviour of group_create() function to support specifying additional group columns</li>
- <li>[Change] Hide avatar when avatar-type is not allowed (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
- <li>[Change] INCLUDEPHP not depending on phpbb_root_path (Bug #45805 - Patch by nickvergessen)</li>
+ <li>[Change] Ability to define column split in FAQ/BBCode help. (Bug #31405)</li>
+ <li>[Change] Changed behaviour of group_create() function to support specifying additional group columns.</li>
+ <li>[Change] Hide avatar when avatar-type is not allowed. (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
+ <li>[Change] INCLUDEPHP paths are now relative to $phpbb_root_path. (Bug #45805)</li>
<li>[Change] Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955)</li>
<li>[Change] &quot;Post details&quot; links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
- <li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505 - Patch by nickvergessen)</li>
- <li>[Change] Show quote button for own PMs in PM history. (Bug #37285 - Patch by nickvergessen)</li>
+ <li>[Change] PM history now only shows PMs of users you currently reply to. (Bug #39505)</li>
+ <li>[Change] Show quote button for own PMs in PM history. (Bug #37285)</li>
<li>[Change] Fetch requested cookie variables directly from cookie super global. (Bug #47785)</li>
- <li>[Change] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
- <li>[Change] Add confirmation for deactivating language packs (Patch by leviatan21)</li>
- <li>[Change] Add confirm-box when deleting permissions (Bug #13673 - Patch by nickvergessen)</li>
- <li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup</li>
+ <li>[Change] Add confirmation for deactivating styles. (Bug #14304 - Patch by leviatan21)</li>
+ <li>[Change] Add confirmation for deactivating language packs. (Patch by leviatan21)</li>
+ <li>[Change] Add confirmation for deleting permissions. (Bug #13673)</li>
+ <li>[Change] Add pagination for icons and smilies in the ACP and smilies in the smiley popup.</li>
<li>[Change] Cache get_username_string() function calls on viewtopic.</li>
<li>[Change] Cache version check.</li>
<li>[Change] When creating a new forum without copying permissions, ask again.</li>
- <li>[Change] Parse multiline url title for [url] BBCode tag. (Bug #1309)</li>
<li>[Change] Introduce new parameter to page_header() for forum specific who is online listings.</li>
- <li>[Change] Lifted minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
- <li>[Change] Unapproved topics can no longer be replied to (Bug #44005, #47675, #23605)</li>
- <li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
- <li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
+ <li>[Change] Changed minimum requirement for Firebird DBMS from 2.0+ to 2.1+.</li>
+ <li>[Change] Unapproved topics can no longer be replied to. (Bug #44005, #47675, #23605)</li>
+ <li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests. (Bug #49525)</li>
+ <li>[Change] Allow three-digit hex notation in color BBcode. (Bug #39965 - Patch by m0rpha)</li>
<li>[Change] Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285)</li>
<li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li>
- <li>[Change] Resize oversized Topic icons (Bug #44415)</li>
- <li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</li>
+ <li>[Change] Resize oversized topic icons. (Bug #44415)</li>
+ <li>[Change] Banned IPs are now sorted. (Bug #43045 - Patch by DavidIQ)</li>
<li>[Change] phpBB updater now skips sole whitespace/tab changes while computing differences. This reduces the chance of conflicts tremendously.</li>
- <li>[Change] phpBB updater now solves common conflicts on it's own. This further reduces the chance of conflicts.</li>
- <li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
- <li>[Feature] Backported 3.2 captcha plugins.
+ <li>[Change] phpBB updater now solves common conflicts on its own. This further reduces the chance of conflicts.</li>
+ <li>[Feature] Add language selection to the registration terms page. (Bug #15085 - Patch by leviatan21)</li>
+ <li>[Feature] Backported 3.2 captcha plugins:
<ul>
<li>Classic and GD CAPTCHA</li>
<li>reCaptcha (based on API from recaptcha.net by Mike Crawford and Ben Maurer)</li>
@@ -256,32 +299,32 @@
<li>3D Wave (by Robert &quot;Xore&quot; Hetzler)</li>
</ul>
</li>
- <li>[Feature] Introduced new ACM plugins:
+ <li>[Feature] Introduced new ACM (Cache) plugins:
<ul>
- <li>null</li>
+ <li>null (to disable caching completely)</li>
<li><a href="http://pecl.php.net/package/memcache">memcache</a></li>
<li><a href="http://pecl.php.net/package/APC">APC</a></li>
<li><a href="http://xcache.lighttpd.net/">XCache</a></li>
<li><a href="http://eaccelerator.net/">eAccelerator</a></li>
</ul>
</li>
- <li>[Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
- <li>[Feature] New groups option to excempt group leaders from group permissions</li>
+ <li>[Feature] ATOM Feeds (Idea from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</li>
+ <li>[Feature] New groups option to excempt group leaders from group permissions.</li>
<li>[Feature] New &quot;Newly Registered Users&quot; group for assigning permissions to newly registered users. They will be removed from this group once they reach a defineable amount of posts.</li>
<li>[Feature] Ability to define if the &quot;Newly Registered Users&quot; group will be assigned as the default group to newly registered users.</li>
- <li>[Feature] Add new option to disable avatars board-wide (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
- <li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session-items (Bug #31975 - Patch by nickvergessen)</li>
- <li>[Feature] Add unapproved topic icon for moderators on forum list (Bug #46865 - Patch by nickvergessen)</li>
- <li>[Feature] Ability to define minimum number of characters for posts/pms</li>
- <li>[Feature] Store signature configuration options in database (Bug #45115 - Patch by rxu)</li>
+ <li>[Feature] Add new option to disable avatars board-wide. (Bug #46785 - Patch by cYbercOsmOnauT and nickvergessen)</li>
+ <li>[Feature] Enhance obtain_users_online_string to be able to return user-lists for other session items. (Bug #31975)</li>
+ <li>[Feature] Add unapproved topic icon for moderators on forum list. (Bug #46865)</li>
+ <li>[Feature] Ability to define minimum number of characters for posts/pms.</li>
+ <li>[Feature] Store signature configuration options in database. (Bug #45115)</li>
<li>[Feature] Add bare-bones quick-reply editor to viewtopic.</li>
- <li>[Feature] Detect when a post has been altered by someone else while editing. (Patch by bantu)</li>
- <li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</li>
- <li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375 - Patch by nickvergessen)</li>
- <li>[Feature] Ability to delete warnings and keep warnings permanently (Bug #43375 - Patch by nickvergessen)</li>
+ <li>[Feature] Detect if a post has been altered by someone else while editing.</li>
+ <li>[Feature] Add unread posts quick search option. (Bug #46765)</li>
+ <li>[Feature] Add option to disable avatar uploads from remote locations. (Bug #45375)</li>
+ <li>[Feature] Ability to delete warnings and keep warnings permanently. (Bug #43375)</li>
<li>[Feature] Ability to empty a user's outbox from the user ACP quick tools.</li>
- <li>[Feature] Ability to search ACP / MCP logs</li>
- <li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module</li>
+ <li>[Feature] Ability to search ACP/MCP logs.</li>
+ <li>[Feature] Users can report PMs to moderators which are then visible in a new MCP module.</li>
<li>[Feature] Parse email text files with the template engine.</li>
<li>[Feature] Use email-style quoting when bbcodes are disabled.</li>
<li>[Feature] Added new functionality to inactive users module:
@@ -295,17 +338,18 @@
</li>
<li>[Feature] Display version check on ACP main page.</li>
<li>[Feature] Ability to copy permissions from one forum to several other forums.</li>
- <li>[Feature] Ability to control the display of custom profile fields on viewtopic (Bug #48985).</li>
+ <li>[Feature] Ability to control the display of custom profile fields on viewtopic. (Bug #48985)</li>
<li>[Feature] Fallback options for missing language files. (Bug #38575 - Patch by EXreaction)</li>
- <li>[Feature] Separate PM Reply and PM Reply to all in prosilver.</li>
+ <li>[Feature] Separate &quot;PM Reply&quot; and &quot;PM Reply to all&quot; in prosilver.</li>
<li>[Feature] Place debug notices during captcha rendering in the error log - useful for debugging output already started errors.</li>
- <li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...</li>
- <li>[Feature] Added function to generate Email hash. (Bug #49195)</li>
- <li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li>
+ <li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset (useful for bridges and applications using phpBB).</li>
+ <li>[Feature] Added function to generate email hash. (Bug #49195)</li>
+ <li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one submit button. Prosilver uses this for the posting page(s) and registration screen.</li>
<li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li>
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul>
- <a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>
+
+ <a name="v304"></a><h3>1.iii. 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>
@@ -394,7 +438,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.iii. Changes since 3.0.3</h3>
+ <a name="v303"></a><h3>1.iv. Changes since 3.0.3</h3>
<ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
@@ -426,7 +470,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.iv. Changes since 3.0.2</h3>
+ <a name="v302"></a><h3>1.v. 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>
@@ -525,7 +569,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.v. Changes since 3.0.1</h3>
+ <a name="v301"></a><h3>1.vi. Changes since 3.0.1</h3>
<ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
@@ -573,7 +617,7 @@
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul>
- <a name="v300"></a><h3>1.vi Changes since 3.0.0</h3>
+ <a name="v300"></a><h3>1.vii Changes since 3.0.0</h3>
<ul>
<li>[Change] Validate birthdays (Bug #15004)</li>
@@ -644,7 +688,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.vii. Changes since 3.0.RC8</h3>
+ <a name="v30rc8"></a><h3>1.viii. 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>
@@ -653,7 +697,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.viii. Changes since 3.0.RC7</h3>
+ <a name="v30rc7"></a><h3>1.ix. Changes since 3.0.RC7</h3>
<ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li>
@@ -688,7 +732,7 @@
<li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul>
- <a name="v30rc6"></a><h3>1.ix. Changes since 3.0.RC6</h3>
+ <a name="v30rc6"></a><h3>1.x. Changes since 3.0.RC6</h3>
<ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
@@ -698,7 +742,7 @@
<li>[Fix] Able to request new password (Bug #14743)</li>
</ul>
- <a name="v30rc5"></a><h3>1.x. Changes since 3.0.RC5</h3>
+ <a name="v30rc5"></a><h3>1.xi. 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>
@@ -761,7 +805,7 @@
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul>
- <a name="v30rc4"></a><h3>1.xi. Changes since 3.0.RC4</h3>
+ <a name="v30rc4"></a><h3>1.xii. Changes since 3.0.RC4</h3>
<ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
@@ -812,7 +856,7 @@
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul>
- <a name="v30rc3"></a><h3>1.xii. Changes since 3.0.RC3</h3>
+ <a name="v30rc3"></a><h3>1.xiii. Changes since 3.0.RC3</h3>
<ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@@ -921,7 +965,7 @@
</ul>
- <a name="v30rc2"></a><h3>1.xiii. Changes since 3.0.RC2</h3>
+ <a name="v30rc2"></a><h3>1.xiv. Changes since 3.0.RC2</h3>
<ul>
<li>[Fix] Re-allow searching within the memberlist</li>
@@ -967,7 +1011,7 @@
</ul>
- <a name="v30rc1"></a><h3>1.xiv. Changes since 3.0.RC1</h3>
+ <a name="v30rc1"></a><h3>1.xv. Changes since 3.0.RC1</h3>
<ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index c6106fc09f..00b8e2e656 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -668,7 +668,7 @@ function set_modified_headers($stamp, $browser)
$last_load = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? strtotime(trim($_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;
if ((strpos(strtolower($browser), 'msie 6.0') === false) && (strpos(strtolower($browser), 'msie 8.0') === false))
{
- if ($last_load !== false && $last_load <= $stamp)
+ if ($last_load !== false && $last_load >= $stamp)
{
if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
{
diff --git a/phpBB/feed.php b/phpBB/feed.php
index a6206d9203..a7c6f831a3 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -35,14 +35,12 @@ $forum_id = request_var('f', 0);
$topic_id = request_var('t', 0);
$mode = request_var('mode', '');
-// Feed date format for PHP > 5 and PHP4
-$feed_date_format = (PHP_VERSION >= 5) ? 'c' : "Y-m-d\TH:i:sO";
-$params = false;
-
// We do not use a template, therefore we simply define the global template variables here
$global_vars = $item_vars = array();
+$feed_updated_time = 0;
// Generate params array for use in append_sid() to correctly link back to this page
+$params = false;
if ($forum_id || $topic_id || $mode)
{
$params = array(
@@ -67,19 +65,6 @@ if ($feed === false)
// Open Feed
$feed->open();
-// Some default assignments
-// FEED_IMAGE is not used (atom)
-$global_vars = array(
- 'FEED_IMAGE' => ($user->img('site_logo', '', false, '', 'src')) ? $board_url . '/' . substr($user->img('site_logo', '', false, '', 'src'), strlen($phpbb_root_path)) : '',
- 'SELF_LINK' => feed_append_sid('/feed.' . $phpEx, $params),
- 'FEED_LINK' => $board_url . '/index.' . $phpEx,
- 'FEED_TITLE' => $config['sitename'],
- 'FEED_SUBTITLE' => $config['site_desc'],
- 'FEED_UPDATED' => $user->format_date(time(), $feed_date_format, true),
- 'FEED_LANG' => $user->lang['USER_LANG'],
- 'FEED_AUTHOR' => $config['sitename'],
-);
-
// Iterate through items
while ($row = $feed->get_item())
{
@@ -99,16 +84,17 @@ while ($row = $feed->get_item())
$options = $row[$feed->get('options')];
}
- $title = ($row[$feed->get('title')]) ? $row[$feed->get('title')] : ((isset($row[$feed->get('title2')])) ? $row[$feed->get('title2')] : '');
- $title = censor_text($title);
+ $title = (isset($row[$feed->get('title')]) && $row[$feed->get('title')] !== '') ? $row[$feed->get('title')] : ((isset($row[$feed->get('title2')])) ? $row[$feed->get('title2')] : '');
+
+ $item_time = (int) $row[$feed->get('date')];
$item_row = array(
'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '',
- 'pubdate' => $user->format_date($row[$feed->get('date')], $feed_date_format, true),
+ 'pubdate' => feed_format_date($item_time),
'link' => '',
'title' => censor_text($title),
'category' => ($config['feed_item_statistics']) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '',
- 'category_name' => ($config['feed_item_statistics']) ? utf8_htmlspecialchars($row['forum_name']) : '',
+ 'category_name' => ($config['feed_item_statistics']) ? $row['forum_name'] : '',
'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options)),
'statistics' => '',
);
@@ -117,8 +103,29 @@ while ($row = $feed->get_item())
$feed->adjust_item($item_row, $row);
$item_vars[] = $item_row;
+
+ $feed_updated_time = max($feed_updated_time, $item_time);
}
+// If we do not have any items at all, sending the current time is better than sending no time.
+if (!$feed_updated_time)
+{
+ $feed_updated_time = time();
+}
+
+// Some default assignments
+// FEED_IMAGE is not used (atom)
+$global_vars = array_merge($global_vars, array(
+ 'FEED_IMAGE' => ($user->img('site_logo', '', false, '', 'src')) ? $board_url . '/' . substr($user->img('site_logo', '', false, '', 'src'), strlen($phpbb_root_path)) : '',
+ 'SELF_LINK' => feed_append_sid('/feed.' . $phpEx, $params),
+ 'FEED_LINK' => $board_url . '/index.' . $phpEx,
+ 'FEED_TITLE' => $config['sitename'],
+ 'FEED_SUBTITLE' => $config['site_desc'],
+ 'FEED_UPDATED' => feed_format_date($feed_updated_time),
+ 'FEED_LANG' => $user->lang['USER_LANG'],
+ 'FEED_AUTHOR' => $config['sitename'],
+));
+
$feed->close();
// Output page
@@ -133,12 +140,7 @@ if ($config['gzip_compress'])
}
// IF debug extra is enabled and admin want to "explain" the page we need to set other headers...
-if (!defined('DEBUG_EXTRA') || !request_var('explain', 0) || !$auth->acl_get('a_'))
-{
- header("Content-Type: application/atom+xml; charset=UTF-8");
- header("Last-Modified: " . gmdate('D, d M Y H:i:s', time()) . ' GMT');
-}
-else
+if (defined('DEBUG_EXTRA') && request_var('explain', 0) && $auth->acl_get('a_'))
{
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
@@ -157,6 +159,9 @@ else
exit_handler();
}
+header("Content-Type: application/atom+xml; charset=UTF-8");
+header("Last-Modified: " . gmdate('D, d M Y H:i:s', $feed_updated_time) . ' GMT');
+
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
echo '<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="' . $global_vars['FEED_LANG'] . '">' . "\n";
echo '<link rel="self" type="application/atom+xml" href="' . $global_vars['SELF_LINK'] . '" />' . "\n\n";
@@ -196,7 +201,7 @@ foreach ($item_vars as $row)
echo '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>';
}
- echo '<hr /></div>' . "\n" . ']]></content>' . "\n";
+ echo '<hr />' . "\n" . ']]></content>' . "\n";
echo '</entry>' . "\n";
}
@@ -212,17 +217,34 @@ function feed_append_sid($url, $params)
{
global $board_url;
- $link = append_sid($board_url . $url, $params);
+ return append_sid($board_url . $url, $params, true, '');
+}
- // Remove added sid - not as easy as it sounds. ;)
- $link = (strpos($link, 'sid=') !== false) ? trim(preg_replace('/(&amp;|&|\?)sid=[a-z0-9]+(&amp;|&)?/', '\1', $link), '?& ') : $link;
+/**
+* Generate ISO 8601 date string (RFC 3339)
+**/
+function feed_format_date($time)
+{
+ static $zone_offset;
+ static $offset_string;
+
+ if (empty($offset_string))
+ {
+ global $user;
+
+ $zone_offset = (int) $user->timezone + (int) $user->dst;
- // Now the only thing remaining could be an empty &amp;
- $link = (substr($link, -5) === '&amp;') ? substr($link, 0, -5) : $link;
- // And &amp;#xxx
- $link = str_replace('&amp;#', '#', $link);
+ $sign = ($zone_offset < 0) ? '-' : '+';
+ $time_offset = abs($zone_offset);
- return $link;
+ $offset_seconds = $time_offset % 3600;
+ $offset_minutes = $offset_seconds / 60;
+ $offset_hours = ($time_offset - $offset_seconds) / 3600;
+
+ $offset_string = sprintf("%s%02d:%02d", $sign, $offset_hours, $offset_minutes);
+ }
+
+ return gmdate("Y-m-d\TH:i:s", $time + $zone_offset) . $offset_string;
}
/**
@@ -376,26 +398,16 @@ class phpbb_feed_factory
}
/**
-* Base/default Feed class if no mode is specified.
-* This can be the overall site feed or a forum/topic feed.
+* Base class with some generic functions and settings.
+*
* @package phpBB3
*/
-class phpbb_feed
+class phpbb_feed_base
{
/**
- * Forum id specified for forum feed.
- */
- var $forum_id = 0;
-
- /**
- * Topic id specified for topic feed.
- */
- var $topic_id = 0;
-
- /**
* SQL Query to be executed to get feed items
*/
- var $sql;
+ var $sql = array();
/**
* Keys specified for retrieval of title, content, etc.
@@ -408,9 +420,9 @@ class phpbb_feed
var $excluded_forums_ary = NULL;
/**
- * Number of items to fetch
+ * Number of items to fetch. Usually overwritten by $config['feed_something']
*/
- var $num_items;
+ var $num_items = 15;
/**
* boolean to determine if items array is filled or not
@@ -430,7 +442,7 @@ class phpbb_feed
/**
* Default cache time of entries in seconds
*/
- var $cache_time = 300;
+ var $cache_time = 90;
/**
* Separator for title elements to separate items (for example forum / topic)
@@ -438,79 +450,49 @@ class phpbb_feed
var $separator = "\xE2\x80\xA2"; // &bull;
/**
- * Constructor. Set standard keys.
+ * Separator for the statistics row (Posted by, post date, replies, etc.)
*/
- function phpbb_feed($forum_id = 0, $topic_id = 0)
- {
- global $config;
+ var $separator_stats = "\xE2\x80\x94"; // &mdash;
- $this->forum_id = $forum_id;
- $this->topic_id = $topic_id;
+ /**
+ * Constructor
+ */
+ function phpbb_feed_base()
+ {
+ global $user;
- $this->sql = array();
+ // Disable cache if it is not a guest or a bot but a registered user
+ if ($this->cache_time && !empty($user) && $user->data['is_registered'])
+ {
+ $this->cache_time = 0;
+ }
- // Set some values for pagination
- $this->num_items = (int) $config['feed_limit'];
$this->set_keys();
}
+ /**
+ * Set keys.
+ */
function set_keys()
{
- // Set keys for items...
- $this->set('title', 'post_subject');
- $this->set('title2', 'topic_title');
- $this->set('author_id', 'user_id');
- $this->set('creator', 'username');
- $this->set('text', 'post_text');
- $this->set('bitfield', 'bbcode_bitfield');
- $this->set('bbcode_uid','bbcode_uid');
- $this->set('date', 'post_time');
-
- $this->set('enable_bbcode', 'enable_bbcode');
- $this->set('enable_smilies', 'enable_smilies');
- $this->set('enable_magic_url', 'enable_magic_url');
}
+ /**
+ * Open feed
+ */
function open()
{
- if (!$this->forum_id && !$this->topic_id)
- {
- return;
- }
- else if ($this->forum_id && !$this->topic_id)
- {
- global $db, $user, $global_vars;
-
- $sql = 'SELECT forum_name
- FROM ' . FORUMS_TABLE . '
- WHERE forum_id = ' . $this->forum_id;
- $result = $db->sql_query($sql);
-
- $global_vars['FEED_MODE'] = $user->lang['FORUM'] . ': ' . $db->sql_fetchfield('forum_name');
-
- $db->sql_freeresult($result);
- }
- else if ($this->topic_id)
- {
- global $db, $user, $global_vars;
-
- $sql = 'SELECT topic_title
- FROM ' . TOPICS_TABLE . '
- WHERE topic_id = ' . $this->topic_id;
- $result = $db->sql_query($sql);
-
- $global_vars['FEED_MODE'] = $user->lang['TOPIC'] . ': ' . $db->sql_fetchfield('topic_title');
-
- $db->sql_freeresult($result);
- }
}
+ /**
+ * Close feed
+ */
function close()
{
+ global $db;
+
if (!empty($this->result))
{
- global $db;
-
$db->sql_freeresult($this->result);
}
}
@@ -544,55 +526,224 @@ class phpbb_feed
global $auth, $db, $config, $phpbb_root_path, $phpEx, $user;
// Which forums should not be searched ?
- $exclude_forums = array();
+ $this->excluded_forums_ary = array();
+
+ // Exclude excluded forums and forums we cannot read
+ $forum_ids_read = array_keys($auth->acl_getf('f_read', true));
+ $sql_or = (!empty($forum_ids_read)) ? 'OR ' . $db->sql_in_set('forum_id', $forum_ids_read, true) : '';
$sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . '
- WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '<> 0');
+ WHERE ' . $db->sql_bit_and('forum_options', FORUM_OPTION_FEED_EXCLUDE, '<> 0') . "
+ $sql_or";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $exclude_forums[] = (int) $row['forum_id'];
+ $this->excluded_forums_ary[(int) $row['forum_id']] = (int) $row['forum_id'];
}
$db->sql_freeresult($result);
- // Exclude forums the user is not able to read
- $this->excluded_forums_ary = array_keys($auth->acl_getf('!f_read', true));
- $this->excluded_forums_ary = (sizeof($exclude_forums)) ? array_merge($exclude_forums, $this->excluded_forums_ary) : $this->excluded_forums_ary;
+ // Include passworded forums
+ $this->excluded_forums_ary = array_unique(array_merge($this->excluded_forums_ary, $this->get_passworded_forums()));
- $not_in_fid = (sizeof($this->excluded_forums_ary)) ? 'WHERE (' . $db->sql_in_set('f.forum_id', $this->excluded_forums_ary, true) . ' AND ' . $db->sql_in_set('f.parent_id', $this->excluded_forums_ary, true) . ") OR (f.forum_password <> '' AND fa.user_id <> " . (int) $user->data['user_id'] . ')' : '';
+ return $this->excluded_forums_ary;
+ }
- $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, fa.user_id
+ function get_passworded_forums()
+ {
+ global $db, $user;
+
+ // Exclude passworded forums
+ $sql = 'SELECT f.forum_id, fa.user_id
FROM ' . FORUMS_TABLE . ' f
- LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
- AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
- $not_in_fid
- ORDER BY f.left_id";
+ LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa
+ ON (fa.forum_id = f.forum_id
+ AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
+ WHERE f.forum_password <> ''";
$result = $db->sql_query($sql);
- $right_id = 0;
+ $forum_ids = array();
while ($row = $db->sql_fetchrow($result))
{
- // Exclude passworded forum completely
- if ($row['forum_password'] && $row['user_id'] != $user->data['user_id'])
+ $forum_id = (int) $row['forum_id'];
+
+ if ($row['user_id'] != $user->data['user_id'])
{
- $this->excluded_forums_ary[] = (int) $row['forum_id'];
- continue;
+ $forum_ids[$forum_id] = $forum_id;
}
+ }
+ $db->sql_freeresult($result);
- if ($row['right_id'] > $right_id)
+ return $forum_ids;
+ }
+
+ function get_item()
+ {
+ global $db, $cache;
+
+ if (!$this->cache_time)
+ {
+ if (empty($this->result))
{
- $right_id = (int) $row['right_id'];
+ if (!$this->get_sql())
+ {
+ return false;
+ }
+
+ // Query database
+ $sql = $db->sql_build_query('SELECT', $this->sql);
+ $this->result = $db->sql_query_limit($sql, $this->num_items);
}
- else if ($row['right_id'] < $right_id)
+
+ return $db->sql_fetchrow($this->result);
+ }
+ else
+ {
+ if (empty($this->items_filled))
{
- continue;
+ // Try to load result set...
+ $cache_filename = substr(get_class($this), strlen('phpbb_'));
+
+ if (($this->items = $cache->get('_' . $cache_filename)) === false)
+ {
+ $this->items = array();
+
+ if ($this->get_sql())
+ {
+ // Query database
+ $sql = $db->sql_build_query('SELECT', $this->sql);
+ $result = $db->sql_query_limit($sql, $this->num_items);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $this->items[] = $row;
+ }
+ $db->sql_freeresult($result);
+ }
+
+ $cache->put('_' . $cache_filename, $this->items, $this->cache_time);
+ }
+
+ $this->items_filled = true;
}
+
+ $row = array_shift($this->items);
+ return (!$row) ? false : $row;
}
- $db->sql_freeresult($result);
+ }
+}
- return $this->excluded_forums_ary;
+/**
+* Default feed class if no mode is specified.
+* This can be the overall site feed or a forum/topic feed.
+*
+* @package phpBB3
+*/
+class phpbb_feed extends phpbb_feed_base
+{
+ /**
+ * Forum id specified for forum feed.
+ */
+ var $forum_id = 0;
+
+ /**
+ * Topic id specified for topic feed.
+ */
+ var $topic_id = 0;
+
+ /**
+ * Constructor.
+ */
+ function phpbb_feed($forum_id = 0, $topic_id = 0)
+ {
+ global $config;
+
+ // Call parent constructor.
+ parent::phpbb_feed_base();
+
+ $this->forum_id = $forum_id;
+ $this->topic_id = $topic_id;
+
+ $this->sql = array();
+ }
+
+ function set_keys()
+ {
+ global $config;
+
+ $this->set('title', 'post_subject');
+ $this->set('title2', 'topic_title');
+ $this->set('author_id', 'user_id');
+ $this->set('creator', 'username');
+ $this->set('text', 'post_text');
+ $this->set('bitfield', 'bbcode_bitfield');
+ $this->set('bbcode_uid','bbcode_uid');
+ $this->set('date', 'post_time');
+
+ $this->set('enable_bbcode', 'enable_bbcode');
+ $this->set('enable_smilies', 'enable_smilies');
+ $this->set('enable_magic_url', 'enable_magic_url');
+
+ $this->num_items = (int) $config['feed_limit'];
+ }
+
+ function open()
+ {
+ global $auth, $db, $user;
+
+ // Topic/Forum feed
+ if ($this->topic_id || $this->forum_id)
+ {
+ if ($this->topic_id)
+ {
+ // Topic feed
+ $sql = 'SELECT t.forum_id, f.forum_options
+ FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f
+ WHERE t.topic_id = ' . $this->topic_id . '
+ AND t.forum_id = f.forum_id';
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (empty($row))
+ {
+ trigger_error('NO_TOPIC');
+ }
+
+ $this->forum_id = (int) $row['forum_id'];
+ }
+ else
+ {
+ // Forum feed
+ $sql = 'SELECT forum_options
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $this->forum_id;
+ $result = $db->sql_query($sql);
+ $row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (empty($row))
+ {
+ trigger_error('NO_FORUM');
+ }
+ }
+
+ // Make sure forum is not excluded from feed
+ if (phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']))
+ {
+ trigger_error('NO_FEED');
+ }
+
+ // Make sure we can read this forum
+ if (!$auth->acl_get('f_read', $this->forum_id))
+ {
+ trigger_error('SORRY_AUTH_READ');
+ }
+
+ // Disable caching
+ $this->cache_time = 0;
+ }
}
/**
@@ -638,7 +789,7 @@ class phpbb_feed
}
// Determine which forums to fetch
- $not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('f1.forum_id', $this->excluded_forums(), true) : '';
+ $not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('f2.forum_id', $this->excluded_forums(), true) : '';
// Determine forum childs...
$sql = 'SELECT f2.forum_id
@@ -673,14 +824,6 @@ class phpbb_feed
// Fetch last posts from specified topic...
else if ($this->topic_id)
{
- // First of all, determine the forum...
- $sql = 'SELECT forum_id
- FROM ' . TOPICS_TABLE . '
- WHERE topic_id = ' . $this->topic_id;
- $result = $db->sql_query_limit($sql, 1);
- $this->forum_id = (int) $db->sql_fetchfield('forum_id');
- $db->sql_freeresult($result);
-
// non-global announcement
if ($this->forum_id && in_array($this->forum_id, $this->excluded_forums()))
{
@@ -711,7 +854,7 @@ class phpbb_feed
'SELECT' => 'f.forum_id, f.forum_name, f.forum_desc_options, ' .
't.topic_last_post_time, t.topic_id, t.topic_title, t.topic_time, t.topic_replies, t.topic_views, ' .
'p.post_id, p.post_time, p.post_subject, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url, ' .
- 'u.username, u.user_id, u.user_email, u.user_colour',
+ 'u.username, u.user_id',
'FROM' => array(
POSTS_TABLE => 'p',
TOPICS_TABLE => 't',
@@ -728,73 +871,6 @@ class phpbb_feed
return true;
}
- function get_item()
- {
- global $db, $cache;
-
- // Disable cache if it is not a guest or a bot but a registered user
- if ($this->cache_time)
- {
- global $user;
-
- // We check this here because we call get_item() quite often
- if (!empty($user) && $user->data['is_registered'])
- {
- $this->cache_time = 0;
- }
- }
-
- if (!$this->cache_time)
- {
- if (empty($this->result))
- {
- if (!$this->get_sql())
- {
- return false;
- }
-
- // Query database
- $sql = $db->sql_build_query('SELECT', $this->sql);
- $this->result = $db->sql_query_limit($sql, $this->num_items);
- }
-
- return $db->sql_fetchrow($this->result);
- }
- else
- {
- if (empty($this->items_filled))
- {
- // Try to load result set...
- $cache_filename = substr(get_class($this), strlen('phpbb_'));
-
- if (($this->items = $cache->get('_' . $cache_filename)) === false)
- {
- $this->items = array();
-
- if ($this->get_sql())
- {
- // Query database
- $sql = $db->sql_build_query('SELECT', $this->sql);
- $result = $db->sql_query_limit($sql, $this->num_items);
-
- while ($row = $db->sql_fetchrow($result))
- {
- $this->items[] = $row;
- }
- $db->sql_freeresult($result);
- }
-
- $cache->put('_' . $cache_filename, $this->items, $this->cache_time);
- }
-
- $this->items_filled = true;
- }
-
- $row = array_shift($this->items);
- return (!$row) ? false : $row;
- }
- }
-
function adjust_item(&$item_row, &$row)
{
global $phpEx, $config;
@@ -806,16 +882,17 @@ class phpbb_feed
{
global $user;
- $user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a>';
-
- $time = ($this->topic_id) ? $row['post_time'] : $row['topic_time'];
+ $user_link = ($row['user_id'] != ANONYMOUS) ? '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a>' : $row['username'];
- $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link . ' - ' . $user->format_date($time). ' - ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies'] . ' - ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
+ $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link
+ . ' ' . $this->separator_stats . ' ' . $user->format_date($row['post_time'])
+ . ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies']
+ . ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
}
}
}
-class phpbb_feed_forums extends phpbb_feed
+class phpbb_feed_forums extends phpbb_feed_base
{
function set_keys()
{
@@ -831,13 +908,6 @@ class phpbb_feed_forums extends phpbb_feed
$this->num_items = (int) $config['feed_overall_forums_limit'];
}
- function open()
- {
- global $user, $global_vars;
-
- $global_vars['FEED_MODE'] = $user->lang['FORUMS'];
- }
-
function get_sql()
{
global $db;
@@ -866,13 +936,19 @@ class phpbb_feed_forums extends phpbb_feed
{
global $user;
- $item_row['statistics'] = sprintf($user->lang['TOTAL_TOPICS_OTHER'], $row['forum_topics']) . ' - ' . sprintf($user->lang['TOTAL_POSTS_OTHER'], $row['forum_posts']);
+ $item_row['statistics'] = sprintf($user->lang['TOTAL_TOPICS_OTHER'], $row['forum_topics'])
+ . ' ' . $this->separator_stats . ' ' . sprintf($user->lang['TOTAL_POSTS_OTHER'], $row['forum_posts']);
}
}
}
-class phpbb_feed_news extends phpbb_feed
+class phpbb_feed_news extends phpbb_feed_base
{
+ /**
+ * Longer cache time for the news feed
+ */
+ var $cache_time = 180;
+
function set_keys()
{
global $config;
@@ -893,16 +969,12 @@ class phpbb_feed_news extends phpbb_feed
$this->num_items = (int) $config['feed_overall_forums_limit'];
}
- function open()
- {
- global $user, $global_vars;
-
- $global_vars['FEED_MODE'] = $user->lang['FEED_NEWS'];
- }
-
function get_sql()
{
- global $db, $config;
+ global $auth, $config, $db;
+
+ // Get passworded forums
+ $forum_ids_passworded = $this->get_passworded_forums();
// Get news forums...
$sql = 'SELECT forum_id
@@ -913,6 +985,20 @@ class phpbb_feed_news extends phpbb_feed
$in_fid_ary = array();
while ($row = $db->sql_fetchrow($result))
{
+ $forum_id = (int) $row['forum_id'];
+
+ // Passworded forum
+ if (isset($forum_ids_passworded[$forum_id]))
+ {
+ continue;
+ }
+
+ // Make sure we can read this forum
+ if (!$auth->acl_get('f_read', $forum_id))
+ {
+ continue;
+ }
+
$in_fid_ary[] = (int) $row['forum_id'];
}
$db->sql_freeresult($result);
@@ -924,20 +1010,17 @@ class phpbb_feed_news extends phpbb_feed
// Build SQL Query
$this->sql = array(
- 'SELECT' => 'f.forum_id, f.forum_password, f.forum_name, f.forum_topics, f.forum_posts, f.parent_id, f.left_id, f.right_id,
+ 'SELECT' => 'f.forum_id, f.forum_name, f.forum_topics, f.forum_posts,
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_views, t.topic_time,
- p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url,
- u.username, u.user_id, u.user_email, u.user_colour',
+ p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
'FROM' => array(
TOPICS_TABLE => 't',
FORUMS_TABLE => 'f',
POSTS_TABLE => 'p',
- USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('t.forum_id', $in_fid_ary) . '
AND f.forum_id = t.forum_id
AND p.post_id = t.topic_first_post_id
- AND t.topic_poster = u.user_id
AND t.topic_moved_id = 0',
'ORDER_BY' => 't.topic_time DESC',
);
@@ -955,14 +1038,17 @@ class phpbb_feed_news extends phpbb_feed
{
global $user;
- $user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row[$this->get('author_id')]) . '">' . $row[$this->get('creator')] . '</a>';
+ $user_link = ($row[$this->get('author_id')] != ANONYMOUS) ? '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row[$this->get('author_id')]) . '">' . $row[$this->get('creator')] . '</a>' : $row[$this->get('creator')];
- $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link . ' - ' . $user->format_date($row['topic_time']). ' - ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies'] . ' - ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
+ $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link
+ . ' ' . $this->separator_stats . ' ' . $user->format_date($row['topic_time'])
+ . ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies']
+ . ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
}
}
}
-class phpbb_feed_topics extends phpbb_feed
+class phpbb_feed_topics extends phpbb_feed_base
{
function set_keys()
{
@@ -984,13 +1070,6 @@ class phpbb_feed_topics extends phpbb_feed
$this->num_items = (int) $config['feed_overall_topics_limit'];
}
- function open()
- {
- global $user, $global_vars;
-
- $global_vars['FEED_MODE'] = $user->lang['TOPICS'];
- }
-
function get_sql()
{
global $db, $config;
@@ -1023,20 +1102,17 @@ class phpbb_feed_topics extends phpbb_feed
}
$this->sql = array(
- 'SELECT' => 'f.forum_id, f.forum_password, f.forum_name, f.forum_topics, f.forum_posts, f.parent_id, f.left_id, f.right_id,
+ 'SELECT' => 'f.forum_id, f.forum_name, f.forum_topics, f.forum_posts,
t.topic_id, t.topic_title, t.topic_poster, t.topic_first_poster_name, t.topic_replies, t.topic_views, t.topic_time,
- p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url,
- u.username, u.user_id, u.user_email, u.user_colour',
+ p.post_id, p.post_text, p.bbcode_bitfield, p.bbcode_uid, p.enable_bbcode, p.enable_smilies, p.enable_magic_url',
'FROM' => array(
TOPICS_TABLE => 't',
FORUMS_TABLE => 'f',
POSTS_TABLE => 'p',
- USERS_TABLE => 'u',
),
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
AND f.forum_id = p.forum_id
- AND t.topic_id = p.topic_id
- AND u.user_id = p.poster_id',
+ AND t.topic_id = p.topic_id',
'ORDER_BY' => 't.topic_last_post_time DESC',
);
@@ -1053,9 +1129,12 @@ class phpbb_feed_topics extends phpbb_feed
{
global $user;
- $user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row[$this->get('author_id')]) . '">' . $row[$this->get('creator')] . '</a>';
+ $user_link = ($row[$this->get('author_id')] != ANONYMOUS) ? '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row[$this->get('author_id')]) . '">' . $row[$this->get('creator')] . '</a>' : $row[$this->get('creator')];
- $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link . ' - ' . $user->format_date($row['topic_time']). ' - ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies'] . ' - ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
+ $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link
+ . ' ' . $this->separator_stats . ' ' . $user->format_date($row['topic_time'])
+ . ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . $row['topic_replies']
+ . ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'];
}
}
}
diff --git a/phpBB/includes/acm/acm_eaccelerator.php b/phpBB/includes/acm/acm_eaccelerator.php
index 1a3cf3c0f7..645067c199 100644
--- a/phpBB/includes/acm/acm_eaccelerator.php
+++ b/phpBB/includes/acm/acm_eaccelerator.php
@@ -30,6 +30,7 @@ if (!class_exists('acm_memory'))
class acm extends acm_memory
{
var $extension = 'eaccelerator';
+ var $function = 'eaccelerator_get';
var $serialize_header = '#phpbb-serialized#';
diff --git a/phpBB/includes/acm/acm_memcache.php b/phpBB/includes/acm/acm_memcache.php
index 3077ee9615..52b8832749 100644
--- a/phpBB/includes/acm/acm_memcache.php
+++ b/phpBB/includes/acm/acm_memcache.php
@@ -105,7 +105,11 @@ class acm extends acm_memory
*/
function _write($var, $data, $ttl = 2592000)
{
- return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl);
+ if (!$this->memcache->replace($this->key_prefix . $var, $data, $this->flags, $ttl))
+ {
+ return $this->memcache->set($this->key_prefix . $var, $data, $this->flags, $ttl);
+ }
+ return true;
}
/**
diff --git a/phpBB/includes/acm/acm_memory.php b/phpBB/includes/acm/acm_memory.php
index 1ed4fb0d55..e315e979e5 100644
--- a/phpBB/includes/acm/acm_memory.php
+++ b/phpBB/includes/acm/acm_memory.php
@@ -47,6 +47,11 @@ class acm_memory
trigger_error("Could not find required extension [{$this->extension}] for the ACM module $acm_type.", E_USER_ERROR);
}
+
+ if (isset($this->function) && !function_exists($this->function))
+ {
+ trigger_error("The required function [{$this->function}] is not available for the ACM module $acm_type.", E_USER_ERROR);
+ }
}
/**
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 2ff597ee98..bde59ec870 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -75,13 +75,6 @@ class acp_forums
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
- case 'copy_perm':
-
- if (!(($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
- {
- trigger_error($user->lang['NO_PERMISSION_COPY'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
- }
-
break;
}
@@ -125,7 +118,6 @@ class acp_forums
'type_action' => request_var('type_action', ''),
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
'forum_parents' => '',
- 'forum_options' => 0,
'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
'forum_link' => request_var('forum_link', ''),
'forum_link_track' => request_var('forum_link_track', false),
@@ -159,6 +151,12 @@ class acp_forums
'forum_password_unset' => request_var('forum_password_unset', false),
);
+ // On add, add empty forum_options... else do not consider it (not updating it)
+ if ($action == 'add')
+ {
+ $forum_data['forum_options'] = 0;
+ }
+
// Use link_display_on_index setting if forum type is link
if ($forum_data['forum_type'] == FORUM_LINK)
{
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index 8213c55ccb..e1deb7e533 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -89,16 +89,19 @@ class acp_icons
continue;
}
- // adjust the width and height to be lower than 128px while perserving the aspect ratio
- if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
+ // adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
+ if ($mode == 'icons')
{
- $img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
- $img_size[0] = 127;
- }
- else if ($img_size[1] > 127)
- {
- $img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
- $img_size[1] = 127;
+ if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
+ {
+ $img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
+ $img_size[0] = 127;
+ }
+ else if ($img_size[1] > 127)
+ {
+ $img_size[0] = (int) ($img_size[0] * (127 / $img_size[1]));
+ $img_size[1] = 127;
+ }
}
$_images[$path . $img]['file'] = $path . $img;
@@ -363,7 +366,7 @@ class acp_icons
if ($mode == 'smilies' && $action == 'create')
{
$smiley_count = $this->item_count($table);
-
+
$addable_smileys_count = sizeof($images);
foreach ($images as $image)
{
@@ -372,7 +375,7 @@ class acp_icons
--$addable_smileys_count;
}
}
-
+
if ($smiley_count + $addable_smileys_count > SMILEY_LIMIT)
{
trigger_error(sprintf($user->lang['TOO_MANY_SMILIES'], SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
@@ -400,15 +403,19 @@ class acp_icons
$image_height[$image] = $img_size[1];
}
- if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
+ // Adjust image width/height for icons
+ if ($mode == 'icons')
{
- $image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
- $image_width[$image] = 127;
- }
- else if ($image_height[$image] > 127)
- {
- $image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
- $image_height[$image] = 127;
+ if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
+ {
+ $image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
+ $image_width[$image] = 127;
+ }
+ else if ($image_height[$image] > 127)
+ {
+ $image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
+ $image_height[$image] = 127;
+ }
}
$img_sql = array(
@@ -923,7 +930,7 @@ class acp_icons
generate_pagination($this->u_action, $item_count, $config['smilies_per_page'], $pagination_start, true)
);
}
-
+
/**
* Returns the count of smilies or icons in the database
*
diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php
index 3d0c0a2780..1a12c4967c 100644
--- a/phpBB/includes/acp/acp_inactive.php
+++ b/phpBB/includes/acp/acp_inactive.php
@@ -90,22 +90,19 @@ class acp_inactive
if ($action == 'activate')
{
- if ($config['require_activation'] == USER_ACTIVATION_ADMIN)
+ // Get those 'being activated'...
+ $sql = 'SELECT user_id, username' . (($config['require_activation'] == USER_ACTIVATION_ADMIN) ? ', user_email, user_lang' : '') . '
+ FROM ' . USERS_TABLE . '
+ WHERE ' . $db->sql_in_set('user_id', $mark) . '
+ AND user_type = ' . USER_INACTIVE;
+ $result = $db->sql_query($sql);
+
+ $inactive_users = array();
+ while ($row = $db->sql_fetchrow($result))
{
- // Get those 'being activated'...
- $sql = 'SELECT user_id, username, user_email, user_lang
- FROM ' . USERS_TABLE . '
- WHERE ' . $db->sql_in_set('user_id', $mark) . '
- AND user_type = ' . USER_INACTIVE;
- $result = $db->sql_query($sql);
-
- $inactive_users = array();
- while ($row = $db->sql_fetchrow($result))
- {
- $inactive_users[] = $row;
- }
- $db->sql_freeresult($result);
+ $inactive_users[] = $row;
}
+ $db->sql_freeresult($result);
user_active_flip('activate', $mark);
@@ -136,6 +133,15 @@ class acp_inactive
$messenger->save_queue();
}
+ if (!empty($inactive_users))
+ {
+ foreach ($inactive_users as $row)
+ {
+ add_log('admin', 'LOG_USER_ACTIVE', $row['username']);
+ add_log('user', $row['user_id'], 'LOG_USER_ACTIVE_USER');
+ }
+ }
+
// For activate we really need to redirect, else a refresh can result in users being deactivated again
$u_action = $this->u_action . "&amp;$u_sort_param&amp;start=$start";
$u_action .= ($per_page != $config['topics_per_page']) ? "&amp;users_per_page=$per_page" : '';
diff --git a/phpBB/includes/acp/acp_jabber.php b/phpBB/includes/acp/acp_jabber.php
index 3ab6eb64ed..9925527b34 100644
--- a/phpBB/includes/acp/acp_jabber.php
+++ b/phpBB/includes/acp/acp_jabber.php
@@ -44,13 +44,13 @@ class acp_jabber
$this->tpl_name = 'acp_jabber';
$this->page_title = 'ACP_JABBER_SETTINGS';
- $jab_enable = request_var('jab_enable', $config['jab_enable']);
- $jab_host = request_var('jab_host', $config['jab_host']);
- $jab_port = request_var('jab_port', $config['jab_port']);
- $jab_username = request_var('jab_username', $config['jab_username']);
- $jab_password = request_var('jab_password', $config['jab_password']);
- $jab_package_size = request_var('jab_package_size', $config['jab_package_size']);
- $jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']);
+ $jab_enable = request_var('jab_enable', (bool) $config['jab_enable']);
+ $jab_host = request_var('jab_host', (string) $config['jab_host']);
+ $jab_port = request_var('jab_port', (int) $config['jab_port']);
+ $jab_username = request_var('jab_username', (string) $config['jab_username']);
+ $jab_password = request_var('jab_password', (string) $config['jab_password']);
+ $jab_package_size = request_var('jab_package_size', (int) $config['jab_package_size']);
+ $jab_use_ssl = request_var('jab_use_ssl', (bool) $config['jab_use_ssl']);
$form_name = 'acp_jabber';
add_form_key($form_name);
@@ -117,7 +117,7 @@ class acp_jabber
'JAB_ENABLE' => $jab_enable,
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
'JAB_HOST' => $jab_host,
- 'JAB_PORT' => $jab_port,
+ 'JAB_PORT' => ($jab_port) ? $jab_port : '',
'JAB_USERNAME' => $jab_username,
'JAB_PASSWORD' => $jab_password,
'JAB_PACKAGE_SIZE' => $jab_package_size,
diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php
index 1b0ec4b5d5..fc08c7e8e8 100644
--- a/phpBB/includes/acp/acp_profile.php
+++ b/phpBB/includes/acp/acp_profile.php
@@ -509,6 +509,14 @@ class acp_profile
// Get the number of options if this key is 'field_maxlen'
$var = request_var('field_default_value', 0);
}*/
+ else if ($field_type == FIELD_INT && $key == 'field_default_value')
+ {
+ // Permit an empty string
+ if (request_var('field_default_value', '') === '')
+ {
+ $var = '';
+ }
+ }
$cp->vars[$key] = $var;
}
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index afca056eb2..4905840e02 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -1416,7 +1416,7 @@ class acp_users
$now = getdate();
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
- for ($i = $now['year'] - 100; $i < $now['year']; $i++)
+ for ($i = $now['year'] - 100; $i <= $now['year']; $i++)
{
$selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php
index 1effada666..a0142292ed 100644
--- a/phpBB/includes/cache.php
+++ b/phpBB/includes/cache.php
@@ -86,7 +86,7 @@ class cache extends acm
{
if ((version_compare(PHP_VERSION, '5.1.0', '>=') || (version_compare(PHP_VERSION, '5.0.0-dev', '<=') && version_compare(PHP_VERSION, '4.4.0', '>='))) && @preg_match('/\p{L}/u', 'a') !== false)
{
- $censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#u';
+ $censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#iu';
}
else
{
diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php
index 73406a954f..131c0b3b77 100644
--- a/phpBB/includes/captcha/captcha_factory.php
+++ b/phpBB/includes/captcha/captcha_factory.php
@@ -35,7 +35,7 @@ class phpbb_captcha_factory
{
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx);
}
- $instance =& call_user_func(array($name, 'get_instance'));
+ $instance = call_user_func(array($name, 'get_instance'));
return $instance;
}
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
index c17cfa7bbe..45811c5d26 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
@@ -53,7 +53,7 @@ class phpbb_captcha_qa
// read input
$this->confirm_id = request_var('qa_confirm_id', '');
- $this->answer = request_var('qa_answer', '', true);
+ $this->answer = utf8_normalize_nfc(request_var('qa_answer', '', true));
$this->type = (int) $type;
$this->question_lang = $user->lang_name;
@@ -502,7 +502,7 @@ class phpbb_captcha_qa
{
global $db;
- $answer = ($this->question_strict) ? request_var('qa_answer', '', true) : utf8_clean_string(request_var('qa_answer', '', true));
+ $answer = ($this->question_strict) ? utf8_normalize_nfc(request_var('qa_answer', '', true)) : utf8_clean_string(utf8_normalize_nfc(request_var('qa_answer', '', true)));
$sql = 'SELECT answer_text
FROM ' . CAPTCHA_ANSWERS_TABLE . '
@@ -789,11 +789,12 @@ class phpbb_captcha_qa
*/
function acp_get_question_input()
{
+ $answers = utf8_normalize_nfc(request_var('answers', '', true));
$question = array(
'question_text' => request_var('question_text', '', true),
'strict' => request_var('strict', false),
'lang_iso' => request_var('lang_iso', ''),
- 'answers' => explode("\n", request_var('answers', '', true)),
+ 'answers' => (strlen($answers)) ? explode("\n", $answers) : '',
);
return $question;
@@ -908,8 +909,9 @@ class phpbb_captcha_qa
}
if (!isset($langs[$question_data['lang_iso']]) ||
- !$question_data['question_text'] ||
- !sizeof($question_data['answers']))
+ !strlen($question_data['question_text']) ||
+ !sizeof($question_data['answers']) ||
+ !is_array($question_data['answers']))
{
return false;
}
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index 3bb9467bbf..398611d24e 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.0.6-RC2');
+define('PHPBB_VERSION', '3.0.6');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/db/db_tools.php b/phpBB/includes/db/db_tools.php
index eabcfd818e..a762b31681 100644
--- a/phpBB/includes/db/db_tools.php
+++ b/phpBB/includes/db/db_tools.php
@@ -453,11 +453,17 @@ class phpbb_db_tools
case 'firebird':
case 'mssql':
+ // We need the data here
+ $old_return_statements = $this->return_statements;
+ $this->return_statements = true;
+
$primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
foreach ($primary_key_stmts as $pk_stmt)
{
$statements[] = $pk_stmt;
}
+
+ $this->return_statements = $old_return_statements;
break;
case 'oracle':
@@ -1867,7 +1873,7 @@ class phpbb_db_tools
}
else
{
- $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
}
break;
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index f7180029b5..63cdb7126d 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -136,7 +136,7 @@ class dbal_oracle extends dbal
*/
function _rewrite_where($where_clause)
{
- preg_match_all('/\s*(AND|OR)?\s*([\w_.]++)\s*(?:(=|<[=>]?|>=?)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
+ preg_match_all('/\s*(AND|OR)?\s*([\w_.()]++)\s*(?:(=|<[=>]?|>=?|LIKE)\s*((?>\'(?>[^\']++|\'\')*+\'|[\d-.()]+))|((NOT )?IN\s*\((?>\'(?>[^\']++|\'\')*+\',? ?|[\d-.]+,? ?)*+\)))/', $where_clause, $result, PREG_SET_ORDER);
$out = '';
foreach ($result as $val)
{
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index e787932441..396267432a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3959,7 +3959,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
$s_last_visit = ($user->data['user_id'] != ANONYMOUS) ? $user->format_date($user->data['session_last_visit']) : '';
// Get users online list ... if required
- $l_online_users = $online_userlist = $l_online_record = '';
+ $l_online_users = $online_userlist = $l_online_record = $l_online_time = '';
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
{
@@ -3982,15 +3982,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
set_config('record_online_date', time(), true);
}
- $l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date']));
+ $l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date'], false, true));
$l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
$l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
}
- else
- {
- $l_online_time = '';
- }
$l_privmsgs_text = $l_privmsgs_text_unread = '';
$s_privmsg_new = false;
@@ -4139,7 +4135,8 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'S_FORUM_ID' => $forum_id,
'S_TOPIC_ID' => $topic_id,
- 'S_LOGIN_ACTION' => (!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&amp;redirect=' . urlencode(str_replace('&amp;', '&', build_url())) : append_sid("index.$phpEx", false, true, $user->session_id) . '&amp;redirect=' . urlencode(str_replace('&amp;', '&', build_url())),
+ 'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id)),
+ 'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => str_replace('&amp;', '&', build_url()))),
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
'S_ENABLE_FEEDS_FORUMS' => ($config['feed_overall_forums']) ? true : false,
@@ -4158,7 +4155,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
- 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang']),
+ 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang'], true, $user->session_id),
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
'T_THEME_NAME' => $user->theme['theme_path'],
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index c0db64dbfb..ddadda8ed2 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2361,8 +2361,8 @@ function cache_moderators()
'FROM' => array(
ACL_OPTIONS_TABLE => 'o',
USER_GROUP_TABLE => 'ug',
- ACL_GROUPS_TABLE => 'a',
GROUPS_TABLE => 'g',
+ ACL_GROUPS_TABLE => 'a',
),
'LEFT_JOIN' => array(
@@ -2549,17 +2549,24 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
return;
}
- $keywords = preg_split('#[\s+\-|*()]+#u', utf8_strtolower(preg_quote($keywords, '#')), 0, PREG_SPLIT_NO_EMPTY);
+ // Use no preg_quote for $keywords because this would lead to sole backslashes being added
+ // We also use an OR connection here for spaces and the | string. Currently, regex is not supported for searching (but may come later).
+ $keywords = preg_split('#[\s|]+#u', utf8_strtolower($keywords), 0, PREG_SPLIT_NO_EMPTY);
$sql_keywords = '';
if (!empty($keywords))
{
- $keywords_pattern = '#' . implode('|', $keywords) . '#ui';
+ $keywords_pattern = array();
+
+ // Build pattern and keywords...
for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)
{
+ $keywords_pattern[] = preg_quote($keywords[$i], '#');
$keywords[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
}
+ $keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
+
$operations = array();
foreach ($user->lang as $key => $value)
{
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index cec1becb6e..58cbdaef5b 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -323,7 +323,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false;
// Mark the first visible forum on index as unread if there's any unread global announcement
- if (($forum_id == $forum_ids_moderator[0]) && ($root_data['forum_id'] == 0) && $ga_unread)
+ if ($ga_unread && !empty($forum_ids_moderator) && $forum_id == $forum_ids_moderator[0])
{
$forum_unread = true;
}
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 6d5021b9aa..16dce16a72 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -476,8 +476,9 @@ class jabber
}
else if (in_array('PLAIN', $methods) && ($this->session['ssl'] || !empty($this->session['tls'])))
{
+ // http://www.ietf.org/rfc/rfc4616.txt (PLAIN SASL Mechanism)
$this->send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>"
- . base64_encode(chr(0) . $this->username . '@' . $this->server . chr(0) . $this->password) .
+ . base64_encode($this->username . '@' . $this->server . chr(0) . $this->username . chr(0) . $this->password) .
'</auth>');
}
else if (in_array('ANONYMOUS', $methods))
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index c93b6a6bba..4fc5034f7b 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -894,6 +894,13 @@ function handle_mark_actions($user_id, $mark_action)
case 'delete_marked':
+ global $auth;
+
+ if (!$auth->acl_get('u_pm_delete'))
+ {
+ trigger_error('NO_AUTH_DELETE_MESSAGE');
+ }
+
if (confirm_box(true))
{
delete_pm($user_id, $msg_ids, $cur_folder_id);
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 9e356414a9..61e3587158 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -158,11 +158,11 @@ class custom_profile
case FIELD_STRING:
case FIELD_TEXT:
- if (empty($field_value) && !$field_data['field_required'])
+ if (trim($field_value) === '' && !$field_data['field_required'])
{
return false;
}
- else if (empty($field_value) && $field_data['field_required'])
+ else if (trim($field_value) === '' && $field_data['field_required'])
{
return 'FIELD_REQUIRED';
}
@@ -624,7 +624,7 @@ class custom_profile
}
else
{
- if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident]))
+ if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident]))
{
$value = NULL;
}
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 3783aadab5..8d9ece5205 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -105,6 +105,7 @@ class mcp_queue
{
$template->assign_vars(array(
'S_TOPIC_REVIEW' => true,
+ 'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
'TOPIC_TITLE' => $post_info['topic_title'])
);
}
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index 7bed20187a..e19fe96963 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -116,6 +116,7 @@ class mcp_reports
{
$template->assign_vars(array(
'S_TOPIC_REVIEW' => true,
+ 'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
'TOPIC_TITLE' => $post_info['topic_title'])
);
}
@@ -429,7 +430,7 @@ class mcp_reports
'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
'TOPIC_ID' => $topic_id,
'TOTAL' => $total,
- 'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
+ 'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
)
);
@@ -671,7 +672,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
$messenger->send($reporter['user_notify_type']);
}
}
-
+
if (!$pm)
{
foreach ($post_info as $post)
@@ -712,13 +713,13 @@ function close_report($report_id_list, $mode, $action, $pm = false)
{
$return_forum = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
}
-
+
if (sizeof($topic_ids) === 1)
{
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&amp;f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
}
}
-
+
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_forum . $return_topic . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
}
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 3df582d640..8979511d9a 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -115,7 +115,7 @@ class bbcode_firstpass extends bbcode
'attachment' => array('bbcode_id' => 12, 'regexp' => array('#\[attachment=([0-9]+)\](.*?)\[/attachment\]#ise' => "\$this->bbcode_attachment('\$1', '\$2')")),
'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#ise' => "\$this->bbcode_strong('\$1')")),
'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#ise' => "\$this->bbcode_italic('\$1')")),
- 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\]((?s).*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
+ 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url(=(.*))?\](.*)\[/url\]#iUe' => "\$this->validate_url('\$2', '\$3')")),
'img' => array('bbcode_id' => 4, 'regexp' => array('#\[img\](.*)\[/img\]#iUe' => "\$this->bbcode_img('\$1')")),
'size' => array('bbcode_id' => 5, 'regexp' => array('#\[size=([\-\+]?\d+)\](.*?)\[/size\]#ise' => "\$this->bbcode_size('\$1', '\$2')")),
'color' => array('bbcode_id' => 6, 'regexp' => array('!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+)\](.*?)\[/color\]!ise' => "\$this->bbcode_color('\$1', '\$2')")),
@@ -1064,17 +1064,12 @@ class parse_message extends bbcode_firstpass
$this->mode = $mode;
- if (!isset($config['max_' . $mode . '_chars']))
+ foreach (array('chars', 'smilies', 'urls', 'font_size', 'img_height', 'img_width') as $key)
{
- $config['max_' . $mode . '_chars'] = 0;
- }
- if (!isset($config['max_' . $mode . '_smilies']))
- {
- $config['max_' . $mode . '_smilies'] = 0;
- }
- if (!isset($config['max_' . $mode . '_urls']))
- {
- $config['max_' . $mode . '_urls'] = 0;
+ if (!isset($config['max_' . $mode . '_' . $key]))
+ {
+ $config['max_' . $mode . '_' . $key] = 0;
+ }
}
$this->allow_img_bbcode = $allow_img_bbcode;
diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php
index 1d015576a7..659c088763 100644
--- a/phpBB/includes/questionnaire/questionnaire.php
+++ b/phpBB/includes/questionnaire/questionnaire.php
@@ -303,6 +303,7 @@ class phpbb_questionnaire_phpbb_data_provider
'database_gc' => true,
'dbms_version' => true,
'default_dateformat' => true,
+ 'default_lang' => true,
'display_last_edited' => true,
'display_order' => true,
'edit_time' => true,
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index d1c1ff00d1..c72e674011 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -444,7 +444,7 @@ class fulltext_mysql extends search_backend
if (sizeof($author_ary) && $author_name)
{
// first one matches post of registered users, second one guests and deleted users
- $sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
+ $sql_author = ' AND (' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
}
else if (sizeof($author_ary))
{
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index bf41fea7de..933bd47347 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -1355,7 +1355,7 @@ class session
{
global $config, $db;
- $user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
+ $user_id = ($user_id === false) ? (int) $this->data['user_id'] : (int) $user_id;
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
WHERE user_id = ' . (int) $user_id;
@@ -1378,7 +1378,7 @@ class session
// Let's also clear any current sessions for the specified user_id
// If it's the current user then we'll leave this session intact
$sql_where = 'session_user_id = ' . (int) $user_id;
- $sql_where .= ($user_id === $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
+ $sql_where .= ($user_id === (int) $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
WHERE $sql_where";
@@ -1386,7 +1386,7 @@ class session
// We're changing the password of the current user and they have a key
// Lets regenerate it to be safe
- if ($user_id === $this->data['user_id'] && $this->cookie_data['k'])
+ if ($user_id === (int) $this->data['user_id'] && $this->cookie_data['k'])
{
$this->set_login_key($user_id);
}
diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php
index 7d09694e2a..af5c9d3a47 100644
--- a/phpBB/includes/template.php
+++ b/phpBB/includes/template.php
@@ -152,6 +152,7 @@ class template
function destroy()
{
$this->_tpldata = array('.' => array(0 => array()));
+ $this->_rootref = &$this->_tpldata['.'][0];
}
/**
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 2f56bcdf7a..4d72d45f81 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -767,7 +767,7 @@ function compose_pm($id, $mode, $action)
$parse_sig->bbcode_uid = $preview_signature_uid;
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
- $parse_sig->format_display($enable_bbcode, $enable_urls, $enable_smilies);
+ $parse_sig->format_display($config['allow_sig_bbcode'], $config['allow_sig_links'], $config['allow_sig_smilies']);
$preview_signature = $parse_sig->message;
unset($parse_sig);
}
@@ -811,7 +811,7 @@ function compose_pm($id, $mode, $action)
}
// Decode text for message display
- $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh) ? $bbcode_uid : $message_parser->bbcode_uid;
+ $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && (!sizeof($error) || (sizeof($error) && !$submit))) ? $bbcode_uid : $message_parser->bbcode_uid;
$message_parser->decode_message($bbcode_uid);
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 33d2c9fb6f..665dd2c83f 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -65,6 +65,12 @@ function view_folder($id, $mode, $folder_id, $folder)
$mark_options = array('mark_important', 'delete_marked');
+ // Minimise edits
+ if (!$auth->acl_get('u_pm_delete') && $key = array_search('delete_marked', $mark_options))
+ {
+ unset($mark_options[$key]);
+ }
+
$s_mark_options = '';
foreach ($mark_options as $mark_option)
{
@@ -194,13 +200,15 @@ function view_folder($id, $mode, $folder_id, $folder)
else
{
// Build Recipient List if in outbox/sentbox
- $address = $data = array();
+
+ $address_temp = $address = $data = array();
if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
{
foreach ($folder_info['rowset'] as $message_id => $row)
{
- $address[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
+ $address_temp[$message_id] = rebuild_header(array('to' => $row['to_address'], 'bcc' => $row['bcc_address']));
+ $address[$message_id] = array();
}
}
@@ -224,8 +232,12 @@ function view_folder($id, $mode, $folder_id, $folder)
$_types = array('u', 'g');
foreach ($_types as $ug_type)
{
- if (isset($address[$message_id][$ug_type]) && sizeof($address[$message_id][$ug_type]))
+ if (isset($address_temp[$message_id][$ug_type]) && sizeof($address_temp[$message_id][$ug_type]))
{
+ if (!isset($address[$message_id][$ug_type]))
+ {
+ $address[$message_id][$ug_type] = array();
+ }
if ($ug_type == 'u')
{
$sql = 'SELECT user_id as id, username as name
@@ -238,21 +250,31 @@ function view_folder($id, $mode, $folder_id, $folder)
FROM ' . GROUPS_TABLE . '
WHERE ';
}
- $sql .= $db->sql_in_set(($ug_type == 'u') ? 'user_id' : 'group_id', array_map('intval', array_keys($address[$message_id][$ug_type])));
+ $sql .= $db->sql_in_set(($ug_type == 'u') ? 'user_id' : 'group_id', array_map('intval', array_keys($address_temp[$message_id][$ug_type])));
$result = $db->sql_query($sql);
while ($info_row = $db->sql_fetchrow($result))
{
- $address[$message_id][$ug_type][$address[$message_id][$ug_type][$info_row['id']]][] = $info_row['name'];
- unset($address[$message_id][$ug_type][$info_row['id']]);
+ $address[$message_id][$ug_type][$address_temp[$message_id][$ug_type][$info_row['id']]][] = $info_row['name'];
+ unset($address_temp[$message_id][$ug_type][$info_row['id']]);
}
$db->sql_freeresult($result);
}
}
- decode_message($message_row['message_text'], $message_row['bbcode_uid']);
+ // There is the chance that all recipients of the message got deleted. To avoid creating
+ // exports without recipients, we add a bogus "undisclosed recipient".
+ if (!(isset($address[$message_id]['g']) && sizeof($address[$message_id]['g'])) &&
+ !(isset($address[$message_id]['u']) && sizeof($address[$message_id]['u'])))
+ {
+ $address[$message_id]['u'] = array();
+ $address[$message_id]['u']['to'] = array();
+ $address[$message_id]['u']['to'][] = $user->lang['UNDISCLOSED_RECIPIENT'];
+ }
+ decode_message($message_row['message_text'], $message_row['bbcode_uid']);
+
$data[] = array(
'subject' => censor_text($row['message_subject']),
'sender' => $row['username'],
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index ce223cf302..bf9c183e0c 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.0.6-RC3';
+$updates_to_version = '3.0.6';
// Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false;
@@ -30,8 +30,12 @@ define('IN_INSTALL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-// Report all errors, except notices
-//error_reporting(E_ALL ^ E_NOTICE);
+// Report all errors, except notices and deprecation messages
+if (!defined('E_DEPRECATED'))
+{
+ define('E_DEPRECATED', 8192);
+}
+//error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
error_reporting(E_ALL);
@set_time_limit(0);
@@ -45,7 +49,7 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
}
// Load Extensions
-if (!empty($load_extensions))
+if (!empty($load_extensions) && function_exists('dl'))
{
$load_extensions = explode(',', $load_extensions);
@@ -346,11 +350,15 @@ for ($i = 0; $i < sizeof($versions); $i++)
$no_updates = false;
- $statements = $db_tools->perform_schema_changes($schema_changes);
-
- foreach ($statements as $sql)
+ // We run one index after the other... to be consistent with schema changes...
+ foreach ($schema_changes as $key => $changes)
{
- _sql($sql, $errored, $error_ary);
+ $statements = $db_tools->perform_schema_changes(array($key => $changes));
+
+ foreach ($statements as $sql)
+ {
+ _sql($sql, $errored, $error_ary);
+ }
}
}
@@ -716,6 +724,9 @@ function database_update_info()
'session_forum_id' => array('UINT', 0),
),
),
+ 'drop_keys' => array(
+ GROUPS_TABLE => array('group_legend'),
+ ),
'add_index' => array(
SESSIONS_TABLE => array(
'session_forum_id' => array('session_forum_id'),
@@ -724,9 +735,6 @@ function database_update_info()
'group_legend_name' => array('group_legend', 'group_name'),
),
),
- 'drop_keys' => array(
- GROUPS_TABLE => array('group_legend'),
- ),
),
// No changes from 3.0.1-RC1 to 3.0.1
'3.0.1-RC1' => array(),
@@ -885,6 +893,10 @@ function database_update_info()
),
// No changes from 3.0.6-RC2 to 3.0.6-RC3
'3.0.6-RC2' => array(),
+ // No changes from 3.0.6-RC3 to 3.0.6-RC4
+ '3.0.6-RC3' => array(),
+ // No changes from 3.0.6-RC4 to 3.0.6
+ '3.0.6-RC4' => array(),
);
}
@@ -1051,10 +1063,21 @@ function change_database_data(&$no_updates, $version)
// Changes from 3.0.3-RC1 to 3.0.3
case '3.0.3-RC1':
- $sql = 'UPDATE ' . LOG_TABLE . "
- SET log_operation = 'LOG_DELETE_TOPIC'
- WHERE log_operation = 'LOG_TOPIC_DELETED'";
- _sql($sql, $errored, $error_ary);
+ if ($db->sql_layer == 'oracle')
+ {
+ // log_operation is CLOB - but we can change this later
+ $sql = 'UPDATE ' . LOG_TABLE . "
+ SET log_operation = 'LOG_DELETE_TOPIC'
+ WHERE log_operation LIKE 'LOG_TOPIC_DELETED'";
+ _sql($sql, $errored, $error_ary);
+ }
+ else
+ {
+ $sql = 'UPDATE ' . LOG_TABLE . "
+ SET log_operation = 'LOG_DELETE_TOPIC'
+ WHERE log_operation = 'LOG_TOPIC_DELETED'";
+ _sql($sql, $errored, $error_ary);
+ }
$no_updates = false;
break;
@@ -1197,6 +1220,18 @@ function change_database_data(&$no_updates, $version)
'drop_keys' => array(
ACL_OPTIONS_TABLE => array('auth_option'),
),
+ );
+
+ global $db_tools;
+
+ $statements = $db_tools->perform_schema_changes($changes);
+
+ foreach ($statements as $sql)
+ {
+ _sql($sql, $errored, $error_ary);
+ }
+
+ $changes = array(
'add_unique_index' => array(
ACL_OPTIONS_TABLE => array(
'auth_option' => array('auth_option'),
@@ -1204,8 +1239,6 @@ function change_database_data(&$no_updates, $version)
),
);
- global $db_tools;
-
$statements = $db_tools->perform_schema_changes($changes);
foreach ($statements as $sql)
@@ -1528,6 +1561,14 @@ function change_database_data(&$no_updates, $version)
$no_updates = false;
break;
+
+ // No changes from 3.0.6-RC3 to 3.0.6-RC4
+ case '3.0.6-RC3':
+ break;
+
+ // No changes from 3.0.6-RC4 to 3.0.6
+ case '3.0.6-RC4':
+ break;
}
}
@@ -2515,13 +2556,12 @@ class updater_db_tools
FROM user_indexes
WHERE table_name = '" . strtoupper($table_name) . "'
AND generated = 'N'
- AND uniqueness = 'UNIQUE'
- AND index_name LIKE 'U_%'";
+ AND uniqueness = 'UNIQUE'";
$col = 'index_name';
break;
case 'sqlite':
- $sql = "PRAGMA index_list('" . $table_name . "') WHERE unique = 1;";
+ $sql = "PRAGMA index_list('" . $table_name . "');";
$col = 'name';
break;
}
@@ -2548,7 +2588,15 @@ class updater_db_tools
switch ($this->sql_layer)
{
case 'oracle':
- $row[$col] = substr($row[$col], strlen('U_' . $row['table_owner']) + 1);
+ // Two cases here... prefixed with U_[table_owner] and not prefixed with table_name
+ if (strpos($row[$col], 'U_') === 0)
+ {
+ $row[$col] = substr($row[$col], strlen('U_' . $row['table_owner']) + 1);
+ }
+ else if (strpos($row[$col], strtoupper($table_name)) === 0)
+ {
+ $row[$col] = substr($row[$col], strlen($table_name) + 1);
+ }
break;
case 'firebird':
@@ -3222,7 +3270,8 @@ class updater_db_tools
}
else
{
- $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql'];
+ // TODO: try to change pkey without removing trigger, generator or constraints. ATM this query may fail.
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN "' . strtoupper($column_name) . '" TYPE ' . ' ' . $column_data['column_type_sql_type'];
}
break;
diff --git a/phpBB/install/index.php b/phpBB/install/index.php
index 47f1787030..eb51ca5fb2 100644
--- a/phpBB/install/index.php
+++ b/phpBB/install/index.php
@@ -18,8 +18,12 @@ define('IN_INSTALL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-// Report all errors, except notices
-error_reporting(E_ALL ^ E_NOTICE);
+// Report all errors, except notices and deprecation messages
+if (!defined('E_DEPRECATED'))
+{
+ define('E_DEPRECATED', 8192);
+}
+error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
if (version_compare(PHP_VERSION, '4.3.3') < 0)
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 1b8553fb7a..1cc1365752 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1212,7 +1212,7 @@ class install_install extends module
}
// Change prefix
- $sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
+ $sql_query = preg_replace('# phpbb_([^\s]*) #i', ' ' . $data['table_prefix'] . '\1 ', $sql_query);
// Change language strings...
$sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query);
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index ab7ec35705..9f5a428029 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -262,6 +262,16 @@ class install_update extends module
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']);
}
+ // Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run
+ // we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less
+ // We now try to cope with this by triggering the update process
+ if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<'))
+ {
+ $template->assign_vars(array(
+ 'S_UP_TO_DATE' => false,
+ ));
+ }
+
break;
case 'update_db':
@@ -917,7 +927,7 @@ class install_update extends module
{
if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/'))
{
- trigger_error(sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $phpbb_root_path . 'store/'), E_USER_ERROR);
+ trigger_error(sprintf('The directory ā€œ%sā€ is not writable.', $phpbb_root_path . 'store/'), E_USER_ERROR);
}
if ($use_method == '.zip')
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 18bd8d8e9a..1c75ee4886 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -239,7 +239,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
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 ('version', '3.0.6-RC2');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6');
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/email/admin_welcome_activated.txt b/phpBB/language/en/email/admin_welcome_activated.txt
index c16a403f00..2397868323 100644
--- a/phpBB/language/en/email/admin_welcome_activated.txt
+++ b/phpBB/language/en/email/admin_welcome_activated.txt
@@ -2,6 +2,8 @@ Subject: Account activated
Hello {USERNAME},
-Your account on "{SITENAME}" has now been activated, you may login using the username and password you received in a previous e-mail.
+Your account on "{SITENAME}" has now been activated, you may login using the username you received in a previous e-mail.
+
+Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
{EMAIL_SIG} \ No newline at end of file
diff --git a/phpBB/language/en/email/admin_welcome_inactive.txt b/phpBB/language/en/email/admin_welcome_inactive.txt
index af3ac9ca87..e0970d3ff3 100644
--- a/phpBB/language/en/email/admin_welcome_inactive.txt
+++ b/phpBB/language/en/email/admin_welcome_inactive.txt
@@ -10,7 +10,7 @@ Username: {USERNAME}
Board URL: {U_BOARD}
----------------------------
-Your account is currently inactive and will need to be approved by an administrator before you can log in. Another email will be sent when this had occured.
+Your account is currently inactive and will need to be approved by an administrator before you can log in. Another email will be sent when this has occured.
Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index 88b2cc273d..596e0531df 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -96,7 +96,7 @@ $help = array(
),
array(
0 => 'How do I show an image below my username?',
- 1 => 'There are two images that may appear below a username when viewing posts. Depending on the used style, the first may be an image associated with your rank, generally in the form of stars, blocks or dots, indicating how many posts you have made or your status on the board. The second, usually a larger image, is known as an avatar and is generally unique or personal to each user. It is up to the board administrator to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrator and ask them for their reasons.'
+ 1 => 'There are two images which may appear below a username when viewing posts. One of them may be an image associated with your rank, generally in the form of stars, blocks or dots, indicating how many posts you have made or your status on the board. Another, usually a larger image, is known as an avatar and is generally unique or personal to each user. It is up to the board administrators to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrators and ask them for their reasons.'
),
array(
0 => 'What is my rank and how do I change it?',
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index ab03cdb0be..2e988e2d42 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -253,6 +253,8 @@ $lang = array_merge($lang, array(
'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.',
'PM_REPORTED_SUCCESS' => 'This private message has been successfully reported.',
'PM_REPORT_TOTAL' => 'In total there is <strong>1</strong> PM report to review.',
+ 'PM_REPORTS_CLOSED_SUCCESS' => 'The selected PM reports have been closed successfully.',
+ 'PM_REPORTS_DELETED_SUCCESS'=> 'The selected PM reports have been deleted successfully.',
'PM_REPORTS_TOTAL' => 'In total there are <strong>%d</strong> PM reports to review.',
'PM_REPORTS_ZERO_TOTAL' => 'There are no PM reports to review.',
'PM_REPORT_DETAILS' => 'Private message report details',
diff --git a/phpBB/language/en/search_synonyms.php b/phpBB/language/en/search_synonyms.php
index b85c39e5d5..1618c292d3 100644
--- a/phpBB/language/en/search_synonyms.php
+++ b/phpBB/language/en/search_synonyms.php
@@ -26,7 +26,7 @@ $synonyms = array(
'anemia' => 'anaemia',
'anemic' => 'anaemic',
'anesthesia' => 'anaesthesia',
- 'appologize' => 'appologise',
+ 'apologize' => 'apologise',
'archean' => 'archaean',
'archeology' => 'archaeology',
'archeozoic' => 'archaeozoic',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 4b79a4b6ca..02b8a282d9 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -460,6 +460,7 @@ $lang = array_merge($lang, array(
'UCP_ZEBRA' => 'Friends &amp; Foes',
'UCP_ZEBRA_FOES' => 'Manage foes',
'UCP_ZEBRA_FRIENDS' => 'Manage friends',
+ 'UNDISCLOSED_RECIPIENT' => 'Undisclosed Recipient',
'UNKNOWN_FOLDER' => 'Unknown folder',
'UNWATCH_MARKED' => 'Unwatch marked',
'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 11ff9e7685..7cffbfd854 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -976,9 +976,11 @@ switch ($mode)
$jabber = request_var('jabber', '');
$search_group_id = request_var('search_group_id', 0);
+ // when using these, make sure that we actually have values defined in $find_key_match
$joined_select = request_var('joined_select', 'lt');
$active_select = request_var('active_select', 'lt');
$count_select = request_var('count_select', 'eq');
+
$joined = explode('-', request_var('joined', ''));
$active = explode('-', request_var('active', ''));
$count = (request_var('count', '') !== '') ? request_var('count', 0) : '';
@@ -1016,9 +1018,9 @@ switch ($mode)
$sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : '';
$sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : '';
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
- $sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
- $sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
- $sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
+ $sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
+ $sql_where .= (sizeof($joined) > 1 && isset($find_key_match[$joined_select])) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
+ $sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1 && isset($find_key_match[$active_select])) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
$sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
if ($search_group_id)
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 1c7cd95b81..660ca8ef23 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -45,13 +45,6 @@ $mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var
$error = $post_data = array();
$current_time = time();
-if ($config['enable_post_confirm'] && !$user->data['is_registered'])
-{
- include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
- $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
- $captcha->init(CONFIRM_POST);
-}
-
// Was cancel pressed? If so then redirect to the appropriate page
if ($cancel || ($current_time - $lastclick < 2 && $submit))
{
@@ -95,8 +88,8 @@ switch ($mode)
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
WHERE t.topic_id = $topic_id
AND (f.forum_id = t.forum_id
- OR f.forum_id = $forum_id)
- AND t.topic_approved = 1";
+ OR f.forum_id = $forum_id)" .
+ (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1');
break;
case 'quote':
@@ -125,7 +118,7 @@ switch ($mode)
AND u.user_id = p.poster_id
AND (f.forum_id = t.forum_id
OR f.forum_id = $forum_id)" .
- (($auth->acl_get('m_approve', $forum_id) && $mode != 'quote') ? '' : 'AND p.post_approved = 1');
+ (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1');
break;
case 'smilies':
@@ -171,6 +164,13 @@ if (!$post_data)
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
}
+// Not able to reply to unapproved posts/topics
+// TODO: add more descriptive language key
+if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && !$post_data['topic_approved']) || ($mode == 'quote' && !$post_data['post_approved'])))
+{
+ trigger_error(($mode == 'reply' || $mode == 'bump') ? 'TOPIC_UNAPPROVED' : 'POST_UNAPPROVED');
+}
+
if ($mode == 'popup')
{
upload_popup($post_data['forum_style']);
@@ -179,6 +179,13 @@ if ($mode == 'popup')
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
+if ($config['enable_post_confirm'] && !$user->data['is_registered'])
+{
+ include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
+ $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
+ $captcha->init(CONFIRM_POST);
+}
+
// Use post_row values in favor of submitted ones...
$forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id;
$topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id;
diff --git a/phpBB/report.php b/phpBB/report.php
index d154acf03b..ca8c7bbd0e 100644
--- a/phpBB/report.php
+++ b/phpBB/report.php
@@ -215,6 +215,8 @@ if ($submit && $reason_id)
// Generate the reasons
display_reasons($reason_id);
+$page_title = ($pm_id) ? $user->lang['REPORT_MESSAGE'] : $user->lang['REPORT_POST'];
+
$template->assign_vars(array(
'S_REPORT_POST' => ($pm_id) ? false : true,
'REPORT_TEXT' => $report_text,
@@ -227,7 +229,7 @@ $template->assign_vars(array(
generate_forum_nav($forum_data);
// Start output of page
-page_header($user->lang['REPORT_POST']);
+page_header($page_title);
$template->set_filenames(array(
'body' => 'report_body.html')
diff --git a/phpBB/search.php b/phpBB/search.php
index 258297d088..c70f389b94 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -653,6 +653,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$forums = $rowset = $shadow_topic_list = array();
while ($row = $db->sql_fetchrow($result))
{
+ $row['forum_id'] = (int) $row['forum_id'];
+ $row['topic_id'] = (int) $row['topic_id'];
+
if ($row['topic_status'] == ITEM_MOVED)
{
$shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
diff --git a/phpBB/style.php b/phpBB/style.php
index 0b4c3d0d41..fa77815670 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -15,8 +15,12 @@ define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
-// Report all errors, except notices
-error_reporting(E_ALL ^ E_NOTICE);
+// Report all errors, except notices and deprecation messages
+if (!defined('E_DEPRECATED'))
+{
+ define('E_DEPRECATED', 8192);
+}
+error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
require($phpbb_root_path . 'config.' . $phpEx);
@@ -31,7 +35,7 @@ if (version_compare(PHP_VERSION, '6.0.0-dev', '<'))
}
// Load Extensions
-if (!empty($load_extensions))
+if (!empty($load_extensions) && function_exists('dl'))
{
$load_extensions = explode(',', $load_extensions);
diff --git a/phpBB/styles/prosilver/template/captcha_recaptcha.html b/phpBB/styles/prosilver/template/captcha_recaptcha.html
index cc4db0b760..97d2cda28e 100644
--- a/phpBB/styles/prosilver/template/captcha_recaptcha.html
+++ b/phpBB/styles/prosilver/template/captcha_recaptcha.html
@@ -15,7 +15,7 @@
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
- lang : '{L_RECAPTCHA_LANG}',
+ lang : '{LA_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
};
// ]]>
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 11e4315e2a..074c250b18 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -317,6 +317,39 @@ function find_in_tree(node, tag, type, class_name)
}
}
+var in_autocomplete = false;
+var last_key_entered = '';
+
+/**
+* Check event key
+*/
+function phpbb_check_key(event)
+{
+ // Keycode is array down or up?
+ if (event.keyCode && (event.keyCode == 40 || event.keyCode == 38))
+ in_autocomplete = true;
+
+ // Make sure we are not within an "autocompletion" field
+ if (in_autocomplete)
+ {
+ // If return pressed and key changed we reset the autocompletion
+ if (!last_key_entered || last_key_entered == event.which)
+ {
+ in_autocompletion = false;
+ return true;
+ }
+ }
+
+ // Keycode is not return, then return. ;)
+ if (event.which != 13)
+ {
+ last_key_entered = event.which;
+ return true;
+ }
+
+ return false;
+}
+
/**
* Usually used for onkeypress event, to submit a form on enter
*/
@@ -326,8 +359,7 @@ function submit_default_button(event, selector, class_name)
if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
event.which = event.charCode || event.keyCode;
- // Keycode is not return, then return. ;)
- if (event.which != 13)
+ if (phpbb_check_key(event))
return true;
var current = selector['parentNode'];
@@ -373,6 +405,9 @@ function apply_onkeypress_event()
if (!default_button || default_button.length <= 0)
return true;
+ if (phpbb_check_key(e))
+ return true;
+
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
{
default_button.click();
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index 3ed8724361..17790eb78a 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -24,6 +24,7 @@
| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
<!-- ENDIF -->
<input type="submit" name="login" value="{L_LOGIN}" class="button2" />
+ {S_LOGIN_REDIRECT}
</fieldset>
</form>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html
index 495e8661b9..fe111aaa45 100644
--- a/phpBB/styles/prosilver/template/login_body.html
+++ b/phpBB/styles/prosilver/template/login_body.html
@@ -36,7 +36,7 @@
<dt>&nbsp;</dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
</dl>
-
+ {S_LOGIN_REDIRECT}
</fieldset>
</div>
<span class="corners-bottom"><span></span></span></div>
diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html
index 1278a2e9a8..a342a9aa24 100644
--- a/phpBB/styles/prosilver/template/login_forum.html
+++ b/phpBB/styles/prosilver/template/login_forum.html
@@ -24,6 +24,7 @@
<dt>&nbsp;</dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" id="login" class="button1" value="{L_LOGIN}" tabindex="2" /></dd>
</dl>
+ {S_LOGIN_REDIRECT}
</fieldset>
<span class="corners-bottom"><span></span></span></div>
diff --git a/phpBB/styles/prosilver/template/quickreply_editor.html b/phpBB/styles/prosilver/template/quickreply_editor.html
index 1ec8e2b643..8a5b8aeb16 100644
--- a/phpBB/styles/prosilver/template/quickreply_editor.html
+++ b/phpBB/styles/prosilver/template/quickreply_editor.html
@@ -1,12 +1,16 @@
<script type="text/javascript">
// <![CDATA[
- function hide_qr()
+ function hide_qr(show)
{
dE('qr_editor_div');
dE('qr_showeditor_div');
+ if (show && document.getElementById('qr_editor_div').style.display != 'none')
+ {
+ document.getElementsByName('message')[0].focus();
+ }
return true;
}
-
+
function init_qr()
{
@@ -20,7 +24,6 @@
<form method="post" action="{U_QR_ACTION}">
<div class="panel" id="qr_ns_editor_div">
<div class="inner"><span class="corners-top"><span></span></span>
- <div class="content">
<h2>{L_QUICKREPLY}</h2>
<fieldset class="fields1">
<dl style="clear: left;">
@@ -37,7 +40,6 @@
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
<input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
</fieldset>
- </div>
<span class="corners-bottom"><span></span></span></div>
</div>
</form>
@@ -45,7 +47,6 @@
<form method="post" action="{U_QR_ACTION}">
<div class="panel" style="display: none" id="qr_editor_div">
<div class="inner"><span class="corners-top"><span></span></span>
- <div class="content">
<h2>{L_QUICKREPLY}</h2>
<fieldset class="fields1">
<dl style="clear: left;">
@@ -62,8 +63,7 @@
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
<input type="submit" accesskey="f" tabindex="6" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
</fieldset>
- <a href="" class="right-box up" onclick="hide_qr(); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a>
- </div>
+ <a href="" class="right-box up" onclick="hide_qr(false); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a>
<span class="corners-bottom"><span></span></span></div>
</div>
<div class="panel" style="display: none" id="qr_showeditor_div" >
@@ -71,7 +71,7 @@
<div class="content">
<fieldset class="submit-buttons">
- <input type="submit" name="show_qr" tabindex="1" class="button2" value="{L_SHOW_QR}" onclick="hide_qr();return false;"/>
+ <input type="submit" name="show_qr" tabindex="1" class="button2" value="{L_SHOW_QR}" onclick="hide_qr(true);return false;"/>
</fieldset>
</div>
<span class="corners-bottom"><span></span></span></div>
diff --git a/phpBB/styles/prosilver/template/search_results.html b/phpBB/styles/prosilver/template/search_results.html
index c38a37452b..f2a4435103 100644
--- a/phpBB/styles/prosilver/template/search_results.html
+++ b/phpBB/styles/prosilver/template/search_results.html
@@ -138,7 +138,7 @@
<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF -->
<!-- IF S_SELECT_SORT_DAYS or S_SELECT_SORT_KEY -->
<label><!-- IF S_SHOW_TOPICS -->{L_DISPLAY_POSTS}<!-- ELSE -->{L_SORT_BY}</label><label><!-- ENDIF --> {S_SELECT_SORT_DAYS}<!-- IF S_SELECT_SORT_KEY --></label> <label>{S_SELECT_SORT_KEY}</label>
- <label>{S_SELECT_SORT_DIR} <!-- ELSE --></label><!-- ENDIF --><input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
+ <label>{S_SELECT_SORT_DIR}<!-- ENDIF --> <input type="submit" name="sort" value="{L_GO}" class="button2" /></label>
<!-- ENDIF -->
</fieldset>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index 70fd5c8496..3f8921c6d3 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -100,6 +100,7 @@
<dt>&nbsp;</dt>
<dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
</dl>
+ {S_LOGIN_REDIRECT}
</fieldset>
</div>
diff --git a/phpBB/styles/subsilver2/template/captcha_default.html b/phpBB/styles/subsilver2/template/captcha_default.html
index eaf7a30944..e0116ae42c 100644
--- a/phpBB/styles/subsilver2/template/captcha_default.html
+++ b/phpBB/styles/subsilver2/template/captcha_default.html
@@ -11,5 +11,5 @@
<tr>
<td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8" />
- <!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="button2" value="{L_VC_REFRESH}" /><!-- ENDIF --></td>
+ <!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="btnlite" value="{L_VC_REFRESH}" /><!-- ENDIF --></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_qa.html b/phpBB/styles/subsilver2/template/captcha_qa.html
index dc8d5505a1..23d2a92f68 100644
--- a/phpBB/styles/subsilver2/template/captcha_qa.html
+++ b/phpBB/styles/subsilver2/template/captcha_qa.html
@@ -1,8 +1,8 @@
<tr>
- <th colspan="2" valign="middle">{QA_CONFIRM_QUESTION}</th>
+ <th colspan="2" valign="middle">{L_CONFIRM_QUESTION}</th>
</tr>
<tr>
- <td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}:</b><br /></td>
+ <td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}:</b><br /><span class="gensmall">{L_CONFIRM_QUESTION_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="qa_answer" size="80" /></td>
<input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/captcha_recaptcha.html b/phpBB/styles/subsilver2/template/captcha_recaptcha.html
index cacdbeead7..3776c77ea4 100644
--- a/phpBB/styles/subsilver2/template/captcha_recaptcha.html
+++ b/phpBB/styles/subsilver2/template/captcha_recaptcha.html
@@ -8,7 +8,7 @@
<script type="text/javascript">
// <![CDATA[
var RecaptchaOptions = {
- lang : '{L_RECAPTCHA_LANG}',
+ lang : '{LA_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
};
// ]]>
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index 8b6c1167b3..863e4f7bee 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -80,6 +80,7 @@
<td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" />&nbsp; <!-- IF S_AUTOLOGIN_ENABLED --> <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
</tr>
</table>
+ {S_LOGIN_REDIRECT}
{S_FORM_TOKEN}
</form>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html
index 810a7376f2..51f7068b5f 100644
--- a/phpBB/styles/subsilver2/template/login_body.html
+++ b/phpBB/styles/subsilver2/template/login_body.html
@@ -77,7 +77,7 @@
</tr>
</table>
{S_FORM_TOKEN}
-
+{S_LOGIN_REDIRECT}
</form>
<br clear="all" />
diff --git a/phpBB/styles/subsilver2/template/login_forum.html b/phpBB/styles/subsilver2/template/login_forum.html
index c3d57085df..96b025a2f9 100644
--- a/phpBB/styles/subsilver2/template/login_forum.html
+++ b/phpBB/styles/subsilver2/template/login_forum.html
@@ -32,6 +32,7 @@
</tr>
</table>
{S_FORM_TOKEN}
+ {S_LOGIN_REDIRECT}
</form>
</div>
diff --git a/phpBB/styles/subsilver2/template/mcp_ban.html b/phpBB/styles/subsilver2/template/mcp_ban.html
index 0e352b57dd..706c8b2cd2 100644
--- a/phpBB/styles/subsilver2/template/mcp_ban.html
+++ b/phpBB/styles/subsilver2/template/mcp_ban.html
@@ -84,15 +84,15 @@
</tr>
<tr>
<td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td>
- <td class="row2"><input style="border: 0; width: 100%" type="text" name="unbanlength" disabled="disabled" /></td>
+ <td class="row2"><input style="border: 0; width: 100%" type="text" name="unbanlength" readonly="readonly" /></td>
</tr>
<tr>
<td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td>
- <td class="row2"><textarea style="border: 0; width: 100%" name="unbanreason" disabled="disabled" rows="5" cols="80">&nbsp;</textarea></td>
+ <td class="row2"><textarea style="border: 0; width: 100%" name="unbanreason" readonly="readonly" rows="5" cols="80">&nbsp;</textarea></td>
</tr>
<tr>
<td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td>
- <td class="row2"><textarea style="border: 0; width: 100%" name="unbangivereason" disabled="disabled" rows="5" cols="80">&nbsp;</textarea></td>
+ <td class="row2"><textarea style="border: 0; width: 100%" name="unbangivereason" readonly="readonly" rows="5" cols="80">&nbsp;</textarea></td>
</tr>
<tr>
<td class="cat" colspan="2" align="center"><input type="submit" name="unbansubmit" value="{L_SUBMIT}" class="btnmain" />&nbsp; <input type="reset" value="{L_RESET}" class="btnlite" />&nbsp;</td>
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index f0b2699471..387a749e24 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -125,7 +125,7 @@
<td class="row1" align="center"><span class="genmed">{L_USERNAME}:</span> <input class="post" type="text" name="username" size="10" />&nbsp; <span class="genmed">{L_PASSWORD}:</span> <input class="post" type="password" name="password" size="10" /><!-- IF S_AUTOLOGIN_ENABLED -->&nbsp; <span class="gensmall">{L_LOG_ME_IN}</span> <input type="checkbox" class="radio" name="autologin" /><!-- ENDIF -->&nbsp; <input type="submit" class="btnmain" name="login" value="{L_LOGIN}" /></td>
</tr>
</table>
-
+ {S_LOGIN_REDIRECT}
</form>
<!-- ENDIF -->
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 7fb954017d..a114940449 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1726,6 +1726,12 @@ if (empty($_REQUEST['f']))
$_REQUEST['f'] = $forum_id;
}
+// We need to do the same with the topic_id. See #53025.
+if (empty($_REQUEST['t']) && !empty($topic_id))
+{
+ $_REQUEST['t'] = $topic_id;
+}
+
// Output the page
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);