merge changes from 3.0.x branch

git-svn-id: file:///svn/phpbb/trunk@10342 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2009-12-16 15:48:23 +00:00
parent 51d173ff1e
commit b68de2323d
71 changed files with 986 additions and 646 deletions

View file

@ -93,15 +93,15 @@
</dl> </dl>
<dl> <dl>
<dt><label for="unbanlength">{L_BAN_LENGTH}:</label></dt> <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>
<dl> <dl>
<dt><label for="unbanreason">{L_BAN_REASON}:</label></dt> <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>
<dl> <dl>
<dt><label for="unbangivereason">{L_BAN_GIVE_REASON}:</label></dt> <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> </dl>
<p class="submit-buttons"> <p class="submit-buttons">

View file

@ -124,13 +124,6 @@
<dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd> <dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd>
</dl> </dl>
</div> </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"> <p class="quick">
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" /> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
@ -141,4 +134,20 @@
</form> </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 --> <!-- ENDIF -->

View file

@ -4,7 +4,7 @@
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
lang : '{L_RECAPTCHA_LANG}', lang : '{LA_RECAPTCHA_LANG}'
}; };
// ]]> // ]]>
</script> </script>

View file

@ -19,8 +19,12 @@ if (!defined('IN_PHPBB'))
$starttime = explode(' ', microtime()); $starttime = explode(' ', microtime());
$starttime = $starttime[1] + $starttime[0]; $starttime = $starttime[1] + $starttime[0];
// Report all errors, except notices // Report all errors, except notices and deprecation messages
error_reporting(E_ALL ^ E_NOTICE); 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 * Remove variables created by register_globals from the global scope
@ -172,7 +176,8 @@ if (defined('DEBUG_EXTRA'))
} }
// Load Extensions // 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); $load_extensions = explode(',', $load_extensions);

View file

@ -796,6 +796,7 @@ function get_schema_struct()
'poster_ip' => array('INDEX', 'poster_ip'), 'poster_ip' => array('INDEX', 'poster_ip'),
'poster_id' => array('INDEX', 'poster_id'), 'poster_id' => array('INDEX', 'poster_id'),
'post_approved' => array('INDEX', 'post_approved'), 'post_approved' => array('INDEX', 'post_approved'),
'post_username' => array('INDEX', 'post_username'),
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')), 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
), ),
); );

View file

@ -53,6 +53,7 @@
<ol> <ol>
<li><a href="#changelog">Changelog</a> <li><a href="#changelog">Changelog</a>
<ol style="list-style-type: lower-roman;"> <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="#v305">Changes since 3.0.5</a></li>
<li><a href="#v304">Changes since 3.0.4</a></li> <li><a href="#v304">Changes since 3.0.4</a></li>
<li><a href="#v303">Changes since 3.0.3</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="inner"><span class="corners-top"><span></span></span>
<div class="content"> <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> <ul>
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li> <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] 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] 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 - Patch by bantu)</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 - Patch by bantu)</li> <li>[Fix] Correctly show private message history. (Bug #46065)</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] 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] 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] 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 - Patch by bantu)</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 - Patch by bantu)</li> <li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215)</li>
<li>[Fix] Correctly apply the can change vote permission again. Regression introduced in r9470. (Bug #45895)</li> <li>[Fix] Correctly apply the &quot;can change vote&quot; 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] 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] 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] 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] Allow friends/foes to be added and removed at the same time. (Bug #46255)</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] 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] 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] 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] 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] Show proper error message when trying to add bots to friends/foes list. (Bug #40205)</li>
<li>[Fix] Fix Oracle database backup (Bug #46715)</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 - Patch by rxu)</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 - Patch by nickvergessen)</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 when Jabber functionality is disabled (Bug #20775 - Patch by nickvergessen)</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 - Patch by nickvergessen)</li> <li>[Fix] Correctly exclude forums from active topics list. (Bug #19135)</li>
<li>[Fix] Do not display birthdays of banned users (Bug #20625 - Patch by nickvergessen)</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] 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] 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 - Patch by nickvergessen)</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 - Patch by rxu)</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 - Patch by nickvergessen)</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 - Patch by nickvergessen)</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] 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] Fix censoring of unicode words. (Bug #16555)</li>
<li>[Fix] Display coloured usernames in ACP groups management screens</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] 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 - Patch by rxu)</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] 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] 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 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 - Patch by rxu)</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] 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] 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] 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] 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] 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 - Patch by nickvergessen)</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 - Patch by nickvergessen)</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 - Patch by bantu)</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 - Patch by bantu)</li> <li>[Fix] Check if template file is empty before trying to read from it. (Bug #47345)</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] 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 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] 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 when searching for author names. (Bug #36565, #47765 - Patch by nickvergessen)</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] 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] 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 - Patch by rxu)</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] 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] 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] Correctly detect GZIP status in debug mode. (Bug #24075)</li>
<li>[Fix] Posting smilies in view more smilies now work again in IE (Bug #46025 - Patch by leviatan21)</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 - Patch by bantu)</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 - Patch by rxu)</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 - Patch by nickvergessen)</li> <li>[Fix] Show smilies and images in topic print view. (Bug #47265)</li>
<li>[Fix] Force full date in private message print view. (Patch by nickvergessen)</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] 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] 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] 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] Correct escaping/unescaping in the LDAP authentication plugin. (Bug #48175)</li>
<li>[Fix] Add hard limit for smilies.</li> <li>[Fix] Add hard limit for smilies.</li>
<li>[Fix] Remove redundant SQL query from ucp.php. (Bug #40305)</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] 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] 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] 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] 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] 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] 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] 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] 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 - Patch by nickvergessen)</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] 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 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] 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] 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] 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] 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] 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] 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] 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 - Patch by nickvergessen)</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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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> <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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] &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] 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 - Patch by nickvergessen)</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] 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 styles. (Bug #14304 - Patch by leviatan21)</li>
<li>[Change] Add confirmation for deactivating language packs (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 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] 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 get_username_string() function calls on viewtopic.</li>
<li>[Change] Cache version check.</li> <li>[Change] Cache version check.</li>
<li>[Change] When creating a new forum without copying permissions, ask again.</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] 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] 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] 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] 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] 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] 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] 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] Resize oversized topic icons. (Bug #44415)</li>
<li>[Change] Banned IPs are now sorted (Bug #43045 - Patch by DavidIQ)</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 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>[Change] phpBB updater now solves common conflicts on its 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] Add language selection to the registration terms page. (Bug #15085 - Patch by leviatan21)</li>
<li>[Feature] Backported 3.2 captcha plugins. <li>[Feature] Backported 3.2 captcha plugins:
<ul> <ul>
<li>Classic and GD CAPTCHA</li> <li>Classic and GD CAPTCHA</li>
<li>reCaptcha (based on API from recaptcha.net by Mike Crawford and Ben Maurer)</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> <li>3D Wave (by Robert &quot;Xore&quot; Hetzler)</li>
</ul> </ul>
</li> </li>
<li>[Feature] Introduced new ACM plugins: <li>[Feature] Introduced new ACM (Cache) plugins:
<ul> <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/memcache">memcache</a></li>
<li><a href="http://pecl.php.net/package/APC">APC</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://xcache.lighttpd.net/">XCache</a></li>
<li><a href="http://eaccelerator.net/">eAccelerator</a></li> <li><a href="http://eaccelerator.net/">eAccelerator</a></li>
</ul> </ul>
</li> </li>
<li>[Feature] ATOM Feeds (Idea and diversed from RSS Feed 2.0 MOD (Version 1.0.8/9) by leviatan21)</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 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] 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] 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] 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] 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 - Patch by nickvergessen)</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] 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] Store signature configuration options in database. (Bug #45115)</li>
<li>[Feature] Add bare-bones quick-reply editor to viewtopic.</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] Detect if a post has been altered by someone else while editing.</li>
<li>[Feature] Add unread posts quick search option (Bug #46765 - Patch by rxu)</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 - Patch by nickvergessen)</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 - Patch by nickvergessen)</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 empty a user's outbox from the user ACP quick tools.</li>
<li>[Feature] Ability to search ACP / MCP logs</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] 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] Parse email text files with the template engine.</li>
<li>[Feature] Use email-style quoting when bbcodes are disabled.</li> <li>[Feature] Use email-style quoting when bbcodes are disabled.</li>
<li>[Feature] Added new functionality to inactive users module: <li>[Feature] Added new functionality to inactive users module:
@ -295,17 +338,18 @@
</li> </li>
<li>[Feature] Display version check on ACP main page.</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 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] 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] 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] 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] 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] 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] 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> <li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
</ul> </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> <ul>
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li> <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> <li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
</ul> </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> <ul>
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li> <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> <li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
</ul> </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> <ul>
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li> <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> <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> </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> <ul>
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li> <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> <li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
</ul> </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> <ul>
<li>[Change] Validate birthdays (Bug #15004)</li> <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> <li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
</ul> </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> <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> <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> <li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
</ul> </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> <ul>
<li>[Fix] Fixed MSSQL related bug in the update system</li> <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> <li>[Fix] No duplication of active topics (Bug #15474)</li>
</ul> </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> <ul>
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li> <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> <li>[Fix] Able to request new password (Bug #14743)</li>
</ul> </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> <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> <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> <li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
</ul> </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> <ul>
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li> <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> <li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
</ul> </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> <ul>
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li> <li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
@ -921,7 +965,7 @@
</ul> </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> <ul>
<li>[Fix] Re-allow searching within the memberlist</li> <li>[Fix] Re-allow searching within the memberlist</li>
@ -967,7 +1011,7 @@
</ul> </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> <ul>
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li> <li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>

View file

@ -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; $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 ((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') if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
{ {

View file

@ -35,14 +35,12 @@ $forum_id = request_var('f', 0);
$topic_id = request_var('t', 0); $topic_id = request_var('t', 0);
$mode = request_var('mode', ''); $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 // We do not use a template, therefore we simply define the global template variables here
$global_vars = $item_vars = array(); $global_vars = $item_vars = array();
$feed_updated_time = 0;
// Generate params array for use in append_sid() to correctly link back to this page // Generate params array for use in append_sid() to correctly link back to this page
$params = false;
if ($forum_id || $topic_id || $mode) if ($forum_id || $topic_id || $mode)
{ {
$params = array( $params = array(
@ -67,19 +65,6 @@ if ($feed === false)
// Open Feed // Open Feed
$feed->open(); $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 // Iterate through items
while ($row = $feed->get_item()) while ($row = $feed->get_item())
{ {
@ -99,16 +84,17 @@ while ($row = $feed->get_item())
$options = $row[$feed->get('options')]; $options = $row[$feed->get('options')];
} }
$title = ($row[$feed->get('title')]) ? $row[$feed->get('title')] : ((isset($row[$feed->get('title2')])) ? $row[$feed->get('title2')] : ''); $title = (isset($row[$feed->get('title')]) && $row[$feed->get('title')] !== '') ? $row[$feed->get('title')] : ((isset($row[$feed->get('title2')])) ? $row[$feed->get('title2')] : '');
$title = censor_text($title);
$item_time = (int) $row[$feed->get('date')];
$item_row = array( $item_row = array(
'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '', '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' => '', 'link' => '',
'title' => censor_text($title), 'title' => censor_text($title),
'category' => ($config['feed_item_statistics']) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '', '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)), 'description' => censor_text(feed_generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options)),
'statistics' => '', 'statistics' => '',
); );
@ -117,8 +103,29 @@ while ($row = $feed->get_item())
$feed->adjust_item($item_row, $row); $feed->adjust_item($item_row, $row);
$item_vars[] = $item_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(); $feed->close();
// Output page // 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 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_')) 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
{ {
header('Content-type: text/html; charset=UTF-8'); header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"'); header('Cache-Control: private, no-cache="set-cookie"');
@ -157,6 +159,9 @@ else
exit_handler(); 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 '<?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 '<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"; 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 '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>';
} }
echo '<hr /></div>' . "\n" . ']]></content>' . "\n"; echo '<hr />' . "\n" . ']]></content>' . "\n";
echo '</entry>' . "\n"; echo '</entry>' . "\n";
} }
@ -212,17 +217,34 @@ function feed_append_sid($url, $params)
{ {
global $board_url; 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;
// Now the only thing remaining could be an empty &amp; if (empty($offset_string))
$link = (substr($link, -5) === '&amp;') ? substr($link, 0, -5) : $link; {
// And &amp;#xxx global $user;
$link = str_replace('&amp;#', '#', $link);
return $link; $zone_offset = (int) $user->timezone + (int) $user->dst;
$sign = ($zone_offset < 0) ? '-' : '+';
$time_offset = abs($zone_offset);
$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. * Base class with some generic functions and settings.
* This can be the overall site feed or a forum/topic feed. *
* @package phpBB3 * @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 * SQL Query to be executed to get feed items
*/ */
var $sql; var $sql = array();
/** /**
* Keys specified for retrieval of title, content, etc. * Keys specified for retrieval of title, content, etc.
@ -408,9 +420,9 @@ class phpbb_feed
var $excluded_forums_ary = NULL; 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 * boolean to determine if items array is filled or not
@ -430,7 +442,7 @@ class phpbb_feed
/** /**
* Default cache time of entries in seconds * 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) * Separator for title elements to separate items (for example forum / topic)
@ -438,79 +450,49 @@ class phpbb_feed
var $separator = "\xE2\x80\xA2"; // &bull; 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) var $separator_stats = "\xE2\x80\x94"; // &mdash;
/**
* Constructor
*/
function phpbb_feed_base()
{ {
global $config; global $user;
$this->forum_id = $forum_id; // Disable cache if it is not a guest or a bot but a registered user
$this->topic_id = $topic_id; if ($this->cache_time && !empty($user) && $user->data['is_registered'])
{
$this->cache_time = 0;
}
$this->sql = array();
// Set some values for pagination
$this->num_items = (int) $config['feed_limit'];
$this->set_keys(); $this->set_keys();
} }
/**
* Set keys.
*/
function 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() 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() function close()
{ {
global $db;
if (!empty($this->result)) if (!empty($this->result))
{ {
global $db;
$db->sql_freeresult($this->result); $db->sql_freeresult($this->result);
} }
} }
@ -544,206 +526,62 @@ class phpbb_feed
global $auth, $db, $config, $phpbb_root_path, $phpEx, $user; global $auth, $db, $config, $phpbb_root_path, $phpEx, $user;
// Which forums should not be searched ? // 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 $sql = 'SELECT forum_id
FROM ' . FORUMS_TABLE . ' 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); $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) 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); $db->sql_freeresult($result);
// Exclude forums the user is not able to read // Include passworded forums
$this->excluded_forums_ary = array_keys($auth->acl_getf('!f_read', true)); $this->excluded_forums_ary = array_unique(array_merge($this->excluded_forums_ary, $this->get_passworded_forums()));
$this->excluded_forums_ary = (sizeof($exclude_forums)) ? array_merge($exclude_forums, $this->excluded_forums_ary) : $this->excluded_forums_ary;
$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'] . ')' : '';
$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.right_id, f.forum_password, 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";
$result = $db->sql_query($sql);
$right_id = 0;
while ($row = $db->sql_fetchrow($result))
{
// Exclude passworded forum completely
if ($row['forum_password'] && $row['user_id'] != $user->data['user_id'])
{
$this->excluded_forums_ary[] = (int) $row['forum_id'];
continue;
}
if ($row['right_id'] > $right_id)
{
$right_id = (int) $row['right_id'];
}
else if ($row['right_id'] < $right_id)
{
continue;
}
}
$db->sql_freeresult($result);
return $this->excluded_forums_ary; return $this->excluded_forums_ary;
} }
/** function get_passworded_forums()
* Get SQL query for fetching items
*/
function get_sql()
{ {
global $db; global $db, $user;
$post_ids = array(); // 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) . "')
WHERE f.forum_password <> ''";
$result = $db->sql_query($sql);
// Search for topics in last X days $forum_ids = array();
$last_post_time_sql = ($this->sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($this->sort_days * 24 * 3600)) : ''; while ($row = $db->sql_fetchrow($result))
// Fetch latest post, grouped by topic...
if (!$this->forum_id && !$this->topic_id)
{ {
// First of all, the post ids... $forum_id = (int) $row['forum_id'];
$not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('t.forum_id', $this->excluded_forums(), true) : '';
$sql = 'SELECT t.topic_last_post_id if ($row['user_id'] != $user->data['user_id'])
FROM ' . TOPICS_TABLE . ' t
WHERE t.topic_approved = 1
AND t.topic_moved_id = 0' .
$not_in_fid .
$last_post_time_sql . '
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $this->num_items);
while ($row = $db->sql_fetchrow($result))
{ {
$post_ids[] = (int) $row['topic_last_post_id']; $forum_ids[$forum_id] = $forum_id;
} }
$db->sql_freeresult($result);
} }
// Fetch latest posts from forum $db->sql_freeresult($result);
else if (!$this->topic_id && $this->forum_id)
{
// Make sure the forum is not listed within the forbidden ones. ;)
if (in_array($this->forum_id, $this->excluded_forums()))
{
return false;
}
// Determine which forums to fetch return $forum_ids;
$not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('f1.forum_id', $this->excluded_forums(), true) : '';
// Determine forum childs...
$sql = 'SELECT f2.forum_id
FROM ' . FORUMS_TABLE . ' f1, ' . FORUMS_TABLE . ' f2
WHERE f1.forum_id = ' . $this->forum_id . '
AND (f2.left_id BETWEEN f1.left_id AND f1.right_id' . $not_in_fid . ')';
$result = $db->sql_query($sql);
$forum_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = (int) $row['forum_id'];
}
$db->sql_freeresult($result);
// Now select from forums...
$sql = 'SELECT t.topic_last_post_id
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
AND t.topic_approved = 1
AND t.topic_moved_id = 0' .
$last_post_time_sql . '
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $this->num_items);
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = (int) $row['topic_last_post_id'];
}
$db->sql_freeresult($result);
}
// 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()))
{
return false;
}
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '
WHERE topic_id = ' . $this->topic_id . '
AND post_approved = 1
ORDER BY post_time DESC';
$result = $db->sql_query_limit($sql, $this->num_items);
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = (int) $row['post_id'];
}
$db->sql_freeresult($result);
}
if (!sizeof($post_ids))
{
return false;
}
// Now build sql query for obtaining items
$this->sql = array(
'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',
'FROM' => array(
POSTS_TABLE => 'p',
TOPICS_TABLE => 't',
FORUMS_TABLE => 'f',
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',
'ORDER_BY' => 'p.post_time DESC',
);
return true;
} }
function get_item() function get_item()
{ {
global $db, $cache; 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 (!$this->cache_time)
{ {
if (empty($this->result)) if (empty($this->result))
@ -794,6 +632,244 @@ class phpbb_feed
return (!$row) ? false : $row; return (!$row) ? false : $row;
} }
} }
}
/**
* 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;
}
}
/**
* Get SQL query for fetching items
*/
function get_sql()
{
global $db;
$post_ids = array();
// Search for topics in last X days
$last_post_time_sql = ($this->sort_days) ? ' AND t.topic_last_post_time > ' . (time() - ($this->sort_days * 24 * 3600)) : '';
// Fetch latest post, grouped by topic...
if (!$this->forum_id && !$this->topic_id)
{
// First of all, the post ids...
$not_in_fid = (sizeof($this->excluded_forums())) ? ' AND ' . $db->sql_in_set('t.forum_id', $this->excluded_forums(), true) : '';
$sql = 'SELECT t.topic_last_post_id
FROM ' . TOPICS_TABLE . ' t
WHERE t.topic_approved = 1
AND t.topic_moved_id = 0' .
$not_in_fid .
$last_post_time_sql . '
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $this->num_items);
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = (int) $row['topic_last_post_id'];
}
$db->sql_freeresult($result);
}
// Fetch latest posts from forum
else if (!$this->topic_id && $this->forum_id)
{
// Make sure the forum is not listed within the forbidden ones. ;)
if (in_array($this->forum_id, $this->excluded_forums()))
{
return false;
}
// Determine which forums to fetch
$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
FROM ' . FORUMS_TABLE . ' f1, ' . FORUMS_TABLE . ' f2
WHERE f1.forum_id = ' . $this->forum_id . '
AND (f2.left_id BETWEEN f1.left_id AND f1.right_id' . $not_in_fid . ')';
$result = $db->sql_query($sql);
$forum_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$forum_ids[] = (int) $row['forum_id'];
}
$db->sql_freeresult($result);
// Now select from forums...
$sql = 'SELECT t.topic_last_post_id
FROM ' . TOPICS_TABLE . ' t
WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . '
AND t.topic_approved = 1
AND t.topic_moved_id = 0' .
$last_post_time_sql . '
ORDER BY t.topic_last_post_time DESC';
$result = $db->sql_query_limit($sql, $this->num_items);
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = (int) $row['topic_last_post_id'];
}
$db->sql_freeresult($result);
}
// Fetch last posts from specified topic...
else if ($this->topic_id)
{
// non-global announcement
if ($this->forum_id && in_array($this->forum_id, $this->excluded_forums()))
{
return false;
}
$sql = 'SELECT post_id
FROM ' . POSTS_TABLE . '
WHERE topic_id = ' . $this->topic_id . '
AND post_approved = 1
ORDER BY post_time DESC';
$result = $db->sql_query_limit($sql, $this->num_items);
while ($row = $db->sql_fetchrow($result))
{
$post_ids[] = (int) $row['post_id'];
}
$db->sql_freeresult($result);
}
if (!sizeof($post_ids))
{
return false;
}
// Now build sql query for obtaining items
$this->sql = array(
'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',
'FROM' => array(
POSTS_TABLE => 'p',
TOPICS_TABLE => 't',
FORUMS_TABLE => 'f',
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',
'ORDER_BY' => 'p.post_time DESC',
);
return true;
}
function adjust_item(&$item_row, &$row) function adjust_item(&$item_row, &$row)
{ {
@ -806,16 +882,17 @@ class phpbb_feed
{ {
global $user; global $user;
$user_link = '<a href="' . feed_append_sid('/memberlist.' . $phpEx, 'mode=viewprofile&amp;u=' . $row['user_id']) . '">' . $row['username'] . '</a>'; $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'];
$time = ($this->topic_id) ? $row['post_time'] : $row['topic_time']; $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $user_link
. ' ' . $this->separator_stats . ' ' . $user->format_date($row['post_time'])
$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']; . ' ' . $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() function set_keys()
{ {
@ -831,13 +908,6 @@ class phpbb_feed_forums extends phpbb_feed
$this->num_items = (int) $config['feed_overall_forums_limit']; $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() function get_sql()
{ {
global $db; global $db;
@ -866,13 +936,19 @@ class phpbb_feed_forums extends phpbb_feed
{ {
global $user; 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() function set_keys()
{ {
global $config; global $config;
@ -893,16 +969,12 @@ class phpbb_feed_news extends phpbb_feed
$this->num_items = (int) $config['feed_overall_forums_limit']; $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() function get_sql()
{ {
global $db, $config; global $auth, $config, $db;
// Get passworded forums
$forum_ids_passworded = $this->get_passworded_forums();
// Get news forums... // Get news forums...
$sql = 'SELECT forum_id $sql = 'SELECT forum_id
@ -913,6 +985,20 @@ class phpbb_feed_news extends phpbb_feed
$in_fid_ary = array(); $in_fid_ary = array();
while ($row = $db->sql_fetchrow($result)) 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']; $in_fid_ary[] = (int) $row['forum_id'];
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
@ -924,20 +1010,17 @@ class phpbb_feed_news extends phpbb_feed
// Build SQL Query // Build SQL Query
$this->sql = array( $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, 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, 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',
'FROM' => array( 'FROM' => array(
TOPICS_TABLE => 't', TOPICS_TABLE => 't',
FORUMS_TABLE => 'f', FORUMS_TABLE => 'f',
POSTS_TABLE => 'p', POSTS_TABLE => 'p',
USERS_TABLE => 'u',
), ),
'WHERE' => $db->sql_in_set('t.forum_id', $in_fid_ary) . ' 'WHERE' => $db->sql_in_set('t.forum_id', $in_fid_ary) . '
AND f.forum_id = t.forum_id AND f.forum_id = t.forum_id
AND p.post_id = t.topic_first_post_id AND p.post_id = t.topic_first_post_id
AND t.topic_poster = u.user_id
AND t.topic_moved_id = 0', AND t.topic_moved_id = 0',
'ORDER_BY' => 't.topic_time DESC', 'ORDER_BY' => 't.topic_time DESC',
); );
@ -955,14 +1038,17 @@ class phpbb_feed_news extends phpbb_feed
{ {
global $user; 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() function set_keys()
{ {
@ -984,13 +1070,6 @@ class phpbb_feed_topics extends phpbb_feed
$this->num_items = (int) $config['feed_overall_topics_limit']; $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() function get_sql()
{ {
global $db, $config; global $db, $config;
@ -1023,20 +1102,17 @@ class phpbb_feed_topics extends phpbb_feed
} }
$this->sql = array( $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, 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, 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',
'FROM' => array( 'FROM' => array(
TOPICS_TABLE => 't', TOPICS_TABLE => 't',
FORUMS_TABLE => 'f', FORUMS_TABLE => 'f',
POSTS_TABLE => 'p', POSTS_TABLE => 'p',
USERS_TABLE => 'u',
), ),
'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . ' 'WHERE' => $db->sql_in_set('p.post_id', $post_ids) . '
AND f.forum_id = p.forum_id AND f.forum_id = p.forum_id
AND t.topic_id = p.topic_id AND t.topic_id = p.topic_id',
AND u.user_id = p.poster_id',
'ORDER_BY' => 't.topic_last_post_time DESC', 'ORDER_BY' => 't.topic_last_post_time DESC',
); );
@ -1053,9 +1129,12 @@ class phpbb_feed_topics extends phpbb_feed
{ {
global $user; 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'];
} }
} }
} }

View file

@ -30,6 +30,7 @@ if (!class_exists('acm_memory'))
class acm extends acm_memory class acm extends acm_memory
{ {
var $extension = 'eaccelerator'; var $extension = 'eaccelerator';
var $function = 'eaccelerator_get';
var $serialize_header = '#phpbb-serialized#'; var $serialize_header = '#phpbb-serialized#';

View file

@ -105,7 +105,11 @@ class acm extends acm_memory
*/ */
function _write($var, $data, $ttl = 2592000) 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;
} }
/** /**

View file

@ -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); 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);
}
} }
/** /**

View file

@ -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); 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; break;
} }
@ -125,7 +118,6 @@ class acp_forums
'type_action' => request_var('type_action', ''), 'type_action' => request_var('type_action', ''),
'forum_status' => request_var('forum_status', ITEM_UNLOCKED), 'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
'forum_parents' => '', 'forum_parents' => '',
'forum_options' => 0,
'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)), 'forum_name' => utf8_normalize_nfc(request_var('forum_name', '', true)),
'forum_link' => request_var('forum_link', ''), 'forum_link' => request_var('forum_link', ''),
'forum_link_track' => request_var('forum_link_track', false), '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), '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 // Use link_display_on_index setting if forum type is link
if ($forum_data['forum_type'] == FORUM_LINK) if ($forum_data['forum_type'] == FORUM_LINK)
{ {

View file

@ -89,16 +89,19 @@ class acp_icons
continue; continue;
} }
// adjust the width and height to be lower than 128px while perserving the aspect ratio // adjust the width and height to be lower than 128px while perserving the aspect ratio (for icons)
if ($img_size[0] > 127 && $img_size[0] > $img_size[1]) if ($mode == 'icons')
{ {
$img_size[1] = (int) ($img_size[1] * (127 / $img_size[0])); if ($img_size[0] > 127 && $img_size[0] > $img_size[1])
$img_size[0] = 127; {
} $img_size[1] = (int) ($img_size[1] * (127 / $img_size[0]));
else if ($img_size[1] > 127) $img_size[0] = 127;
{ }
$img_size[0] = (int) ($img_size[0] * (127 / $img_size[1])); else if ($img_size[1] > 127)
$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; $_images[$path . $img]['file'] = $path . $img;
@ -400,15 +403,19 @@ class acp_icons
$image_height[$image] = $img_size[1]; $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])); if ($image_width[$image] > 127 && $image_width[$image] > $image_height[$image])
$image_width[$image] = 127; {
} $image_height[$image] = (int) ($image_height[$image] * (127 / $image_width[$image]));
else if ($image_height[$image] > 127) $image_width[$image] = 127;
{ }
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image])); else if ($image_height[$image] > 127)
$image_height[$image] = 127; {
$image_width[$image] = (int) ($image_width[$image] * (127 / $image_height[$image]));
$image_height[$image] = 127;
}
} }
$img_sql = array( $img_sql = array(

View file

@ -90,22 +90,19 @@ class acp_inactive
if ($action == 'activate') 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' : '') . '
// Get those 'being activated'... FROM ' . USERS_TABLE . '
$sql = 'SELECT user_id, username, user_email, user_lang WHERE ' . $db->sql_in_set('user_id', $mark) . '
FROM ' . USERS_TABLE . ' AND user_type = ' . USER_INACTIVE;
WHERE ' . $db->sql_in_set('user_id', $mark) . ' $result = $db->sql_query($sql);
AND user_type = ' . USER_INACTIVE;
$result = $db->sql_query($sql);
$inactive_users = array(); $inactive_users = array();
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
$inactive_users[] = $row; $inactive_users[] = $row;
}
$db->sql_freeresult($result);
} }
$db->sql_freeresult($result);
user_active_flip('activate', $mark); user_active_flip('activate', $mark);
@ -136,6 +133,15 @@ class acp_inactive
$messenger->save_queue(); $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 // 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 = $this->u_action . "&amp;$u_sort_param&amp;start=$start";
$u_action .= ($per_page != $config['topics_per_page']) ? "&amp;users_per_page=$per_page" : ''; $u_action .= ($per_page != $config['topics_per_page']) ? "&amp;users_per_page=$per_page" : '';

View file

@ -44,13 +44,13 @@ class acp_jabber
$this->tpl_name = 'acp_jabber'; $this->tpl_name = 'acp_jabber';
$this->page_title = 'ACP_JABBER_SETTINGS'; $this->page_title = 'ACP_JABBER_SETTINGS';
$jab_enable = request_var('jab_enable', $config['jab_enable']); $jab_enable = request_var('jab_enable', (bool) $config['jab_enable']);
$jab_host = request_var('jab_host', $config['jab_host']); $jab_host = request_var('jab_host', (string) $config['jab_host']);
$jab_port = request_var('jab_port', $config['jab_port']); $jab_port = request_var('jab_port', (int) $config['jab_port']);
$jab_username = request_var('jab_username', $config['jab_username']); $jab_username = request_var('jab_username', (string) $config['jab_username']);
$jab_password = request_var('jab_password', $config['jab_password']); $jab_password = request_var('jab_password', (string) $config['jab_password']);
$jab_package_size = request_var('jab_package_size', $config['jab_package_size']); $jab_package_size = request_var('jab_package_size', (int) $config['jab_package_size']);
$jab_use_ssl = request_var('jab_use_ssl', $config['jab_use_ssl']); $jab_use_ssl = request_var('jab_use_ssl', (bool) $config['jab_use_ssl']);
$form_name = 'acp_jabber'; $form_name = 'acp_jabber';
add_form_key($form_name); add_form_key($form_name);
@ -117,7 +117,7 @@ class acp_jabber
'JAB_ENABLE' => $jab_enable, 'JAB_ENABLE' => $jab_enable,
'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'), 'L_JAB_SERVER_EXPLAIN' => sprintf($user->lang['JAB_SERVER_EXPLAIN'], '<a href="http://www.jabber.org/">', '</a>'),
'JAB_HOST' => $jab_host, 'JAB_HOST' => $jab_host,
'JAB_PORT' => $jab_port, 'JAB_PORT' => ($jab_port) ? $jab_port : '',
'JAB_USERNAME' => $jab_username, 'JAB_USERNAME' => $jab_username,
'JAB_PASSWORD' => $jab_password, 'JAB_PASSWORD' => $jab_password,
'JAB_PACKAGE_SIZE' => $jab_package_size, 'JAB_PACKAGE_SIZE' => $jab_package_size,

View file

@ -509,6 +509,14 @@ class acp_profile
// Get the number of options if this key is 'field_maxlen' // Get the number of options if this key is 'field_maxlen'
$var = request_var('field_default_value', 0); $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; $cp->vars[$key] = $var;
} }

View file

@ -1416,7 +1416,7 @@ class acp_users
$now = getdate(); $now = getdate();
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>'; $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"' : ''; $selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>"; $s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";

View file

@ -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) 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 else
{ {

View file

@ -35,7 +35,7 @@ class phpbb_captcha_factory
{ {
include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx); 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; return $instance;
} }

View file

@ -53,7 +53,7 @@ class phpbb_captcha_qa
// read input // read input
$this->confirm_id = request_var('qa_confirm_id', ''); $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->type = (int) $type;
$this->question_lang = $user->lang_name; $this->question_lang = $user->lang_name;
@ -502,7 +502,7 @@ class phpbb_captcha_qa
{ {
global $db; 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 $sql = 'SELECT answer_text
FROM ' . CAPTCHA_ANSWERS_TABLE . ' FROM ' . CAPTCHA_ANSWERS_TABLE . '
@ -789,11 +789,12 @@ class phpbb_captcha_qa
*/ */
function acp_get_question_input() function acp_get_question_input()
{ {
$answers = utf8_normalize_nfc(request_var('answers', '', true));
$question = array( $question = array(
'question_text' => request_var('question_text', '', true), 'question_text' => request_var('question_text', '', true),
'strict' => request_var('strict', false), 'strict' => request_var('strict', false),
'lang_iso' => request_var('lang_iso', ''), 'lang_iso' => request_var('lang_iso', ''),
'answers' => explode("\n", request_var('answers', '', true)), 'answers' => (strlen($answers)) ? explode("\n", $answers) : '',
); );
return $question; return $question;
@ -908,8 +909,9 @@ class phpbb_captcha_qa
} }
if (!isset($langs[$question_data['lang_iso']]) || if (!isset($langs[$question_data['lang_iso']]) ||
!$question_data['question_text'] || !strlen($question_data['question_text']) ||
!sizeof($question_data['answers'])) !sizeof($question_data['answers']) ||
!is_array($question_data['answers']))
{ {
return false; return false;
} }

View file

@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/ */
// phpBB Version // phpBB Version
define('PHPBB_VERSION', '3.0.6-RC2'); define('PHPBB_VERSION', '3.0.6');
// QA-related // QA-related
// define('PHPBB_QA', 1); // define('PHPBB_QA', 1);

View file

@ -453,11 +453,17 @@ class phpbb_db_tools
case 'firebird': case 'firebird':
case 'mssql': 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']); $primary_key_stmts = $this->sql_create_primary_key($table_name, $table_data['PRIMARY_KEY']);
foreach ($primary_key_stmts as $pk_stmt) foreach ($primary_key_stmts as $pk_stmt)
{ {
$statements[] = $pk_stmt; $statements[] = $pk_stmt;
} }
$this->return_statements = $old_return_statements;
break; break;
case 'oracle': case 'oracle':
@ -1867,7 +1873,7 @@ class phpbb_db_tools
} }
else 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; break;

View file

@ -136,7 +136,7 @@ class dbal_oracle extends dbal
*/ */
function _rewrite_where($where_clause) 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 = ''; $out = '';
foreach ($result as $val) foreach ($result as $val)
{ {

View file

@ -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']) : ''; $s_last_visit = ($user->data['user_id'] != ANONYMOUS) ? $user->format_date($user->data['session_last_visit']) : '';
// Get users online list ... if required // 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) 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); 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 = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
$l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']); $l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
} }
else
{
$l_online_time = '';
}
$l_privmsgs_text = $l_privmsgs_text_unread = ''; $l_privmsgs_text = $l_privmsgs_text_unread = '';
$s_privmsg_new = false; $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_FORUM_ID' => $forum_id,
'S_TOPIC_ID' => $topic_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' => ($config['feed_enable']) ? true : false,
'S_ENABLE_FEEDS_FORUMS' => ($config['feed_overall_forums']) ? 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_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/", 'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_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_STYLESHEET_NAME' => $user->theme['theme_name'],
'T_THEME_NAME' => $user->theme['theme_path'], 'T_THEME_NAME' => $user->theme['theme_path'],

View file

@ -2361,8 +2361,8 @@ function cache_moderators()
'FROM' => array( 'FROM' => array(
ACL_OPTIONS_TABLE => 'o', ACL_OPTIONS_TABLE => 'o',
USER_GROUP_TABLE => 'ug', USER_GROUP_TABLE => 'ug',
ACL_GROUPS_TABLE => 'a',
GROUPS_TABLE => 'g', GROUPS_TABLE => 'g',
ACL_GROUPS_TABLE => 'a',
), ),
'LEFT_JOIN' => array( 'LEFT_JOIN' => array(
@ -2549,17 +2549,24 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
return; 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 = ''; $sql_keywords = '';
if (!empty($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++) 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[$i] = $db->sql_like_expression($db->any_char . $keywords[$i] . $db->any_char);
} }
$keywords_pattern = '#' . implode('|', $keywords_pattern) . '#ui';
$operations = array(); $operations = array();
foreach ($user->lang as $key => $value) foreach ($user->lang as $key => $value)
{ {

View file

@ -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; $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 // 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; $forum_unread = true;
} }

View file

@ -476,8 +476,9 @@ class jabber
} }
else if (in_array('PLAIN', $methods) && ($this->session['ssl'] || !empty($this->session['tls']))) 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'>" $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>'); '</auth>');
} }
else if (in_array('ANONYMOUS', $methods)) else if (in_array('ANONYMOUS', $methods))

View file

@ -894,6 +894,13 @@ function handle_mark_actions($user_id, $mark_action)
case 'delete_marked': case 'delete_marked':
global $auth;
if (!$auth->acl_get('u_pm_delete'))
{
trigger_error('NO_AUTH_DELETE_MESSAGE');
}
if (confirm_box(true)) if (confirm_box(true))
{ {
delete_pm($user_id, $msg_ids, $cur_folder_id); delete_pm($user_id, $msg_ids, $cur_folder_id);

View file

@ -158,11 +158,11 @@ class custom_profile
case FIELD_STRING: case FIELD_STRING:
case FIELD_TEXT: case FIELD_TEXT:
if (empty($field_value) && !$field_data['field_required']) if (trim($field_value) === '' && !$field_data['field_required'])
{ {
return false; return false;
} }
else if (empty($field_value) && $field_data['field_required']) else if (trim($field_value) === '' && $field_data['field_required'])
{ {
return 'FIELD_REQUIRED'; return 'FIELD_REQUIRED';
} }
@ -624,7 +624,7 @@ class custom_profile
} }
else 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; $value = NULL;
} }

View file

@ -105,6 +105,7 @@ class mcp_queue
{ {
$template->assign_vars(array( $template->assign_vars(array(
'S_TOPIC_REVIEW' => true, 'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
'TOPIC_TITLE' => $post_info['topic_title']) 'TOPIC_TITLE' => $post_info['topic_title'])
); );
} }

View file

@ -116,6 +116,7 @@ class mcp_reports
{ {
$template->assign_vars(array( $template->assign_vars(array(
'S_TOPIC_REVIEW' => true, 'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
'TOPIC_TITLE' => $post_info['topic_title']) 'TOPIC_TITLE' => $post_info['topic_title'])
); );
} }

View file

@ -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')")), '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')")), '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')")), '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')")), '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')")), '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')")), '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; $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 . '_' . $key]))
} {
if (!isset($config['max_' . $mode . '_smilies'])) $config['max_' . $mode . '_' . $key] = 0;
{ }
$config['max_' . $mode . '_smilies'] = 0;
}
if (!isset($config['max_' . $mode . '_urls']))
{
$config['max_' . $mode . '_urls'] = 0;
} }
$this->allow_img_bbcode = $allow_img_bbcode; $this->allow_img_bbcode = $allow_img_bbcode;

View file

@ -303,6 +303,7 @@ class phpbb_questionnaire_phpbb_data_provider
'database_gc' => true, 'database_gc' => true,
'dbms_version' => true, 'dbms_version' => true,
'default_dateformat' => true, 'default_dateformat' => true,
'default_lang' => true,
'display_last_edited' => true, 'display_last_edited' => true,
'display_order' => true, 'display_order' => true,
'edit_time' => true, 'edit_time' => true,

View file

@ -444,7 +444,7 @@ class fulltext_mysql extends search_backend
if (sizeof($author_ary) && $author_name) if (sizeof($author_ary) && $author_name)
{ {
// first one matches post of registered users, second one guests and deleted users // 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)) else if (sizeof($author_ary))
{ {

View file

@ -1355,7 +1355,7 @@ class session
{ {
global $config, $db; 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 . ' $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
WHERE user_id = ' . (int) $user_id; WHERE user_id = ' . (int) $user_id;
@ -1378,7 +1378,7 @@ class session
// Let's also clear any current sessions for the specified user_id // 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 // If it's the current user then we'll leave this session intact
$sql_where = 'session_user_id = ' . (int) $user_id; $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 . " $sql = 'DELETE FROM ' . SESSIONS_TABLE . "
WHERE $sql_where"; WHERE $sql_where";
@ -1386,7 +1386,7 @@ class session
// We're changing the password of the current user and they have a key // We're changing the password of the current user and they have a key
// Lets regenerate it to be safe // 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); $this->set_login_key($user_id);
} }

View file

@ -152,6 +152,7 @@ class template
function destroy() function destroy()
{ {
$this->_tpldata = array('.' => array(0 => array())); $this->_tpldata = array('.' => array(0 => array()));
$this->_rootref = &$this->_tpldata['.'][0];
} }
/** /**

View file

@ -767,7 +767,7 @@ function compose_pm($id, $mode, $action)
$parse_sig->bbcode_uid = $preview_signature_uid; $parse_sig->bbcode_uid = $preview_signature_uid;
$parse_sig->bbcode_bitfield = $preview_signature_bitfield; $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; $preview_signature = $parse_sig->message;
unset($parse_sig); unset($parse_sig);
} }
@ -811,7 +811,7 @@ function compose_pm($id, $mode, $action)
} }
// Decode text for message display // 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); $message_parser->decode_message($bbcode_uid);

View file

@ -65,6 +65,12 @@ function view_folder($id, $mode, $folder_id, $folder)
$mark_options = array('mark_important', 'delete_marked'); $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 = ''; $s_mark_options = '';
foreach ($mark_options as $mark_option) foreach ($mark_options as $mark_option)
{ {
@ -194,13 +200,15 @@ function view_folder($id, $mode, $folder_id, $folder)
else else
{ {
// Build Recipient List if in outbox/sentbox // Build Recipient List if in outbox/sentbox
$address = $data = array();
$address_temp = $address = $data = array();
if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) if ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX)
{ {
foreach ($folder_info['rowset'] as $message_id => $row) 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'); $_types = array('u', 'g');
foreach ($_types as $ug_type) 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') if ($ug_type == 'u')
{ {
$sql = 'SELECT user_id as id, username as name $sql = 'SELECT user_id as id, username as name
@ -238,19 +250,29 @@ function view_folder($id, $mode, $folder_id, $folder)
FROM ' . GROUPS_TABLE . ' FROM ' . GROUPS_TABLE . '
WHERE '; 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); $result = $db->sql_query($sql);
while ($info_row = $db->sql_fetchrow($result)) while ($info_row = $db->sql_fetchrow($result))
{ {
$address[$message_id][$ug_type][$address[$message_id][$ug_type][$info_row['id']]][] = $info_row['name']; $address[$message_id][$ug_type][$address_temp[$message_id][$ug_type][$info_row['id']]][] = $info_row['name'];
unset($address[$message_id][$ug_type][$info_row['id']]); unset($address_temp[$message_id][$ug_type][$info_row['id']]);
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
} }
} }
// 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']); decode_message($message_row['message_text'], $message_row['bbcode_uid']);
$data[] = array( $data[] = array(

View file

@ -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. // Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false; $debug_from_version = false;
@ -30,8 +30,12 @@ define('IN_INSTALL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);
// Report all errors, except notices // Report all errors, except notices and deprecation messages
//error_reporting(E_ALL ^ E_NOTICE); if (!defined('E_DEPRECATED'))
{
define('E_DEPRECATED', 8192);
}
//error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
error_reporting(E_ALL); error_reporting(E_ALL);
@set_time_limit(0); @set_time_limit(0);
@ -45,7 +49,7 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
} }
// Load Extensions // Load Extensions
if (!empty($load_extensions)) if (!empty($load_extensions) && function_exists('dl'))
{ {
$load_extensions = explode(',', $load_extensions); $load_extensions = explode(',', $load_extensions);
@ -346,11 +350,15 @@ for ($i = 0; $i < sizeof($versions); $i++)
$no_updates = false; $no_updates = false;
$statements = $db_tools->perform_schema_changes($schema_changes); // We run one index after the other... to be consistent with schema changes...
foreach ($schema_changes as $key => $changes)
foreach ($statements as $sql)
{ {
_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), 'session_forum_id' => array('UINT', 0),
), ),
), ),
'drop_keys' => array(
GROUPS_TABLE => array('group_legend'),
),
'add_index' => array( 'add_index' => array(
SESSIONS_TABLE => array( SESSIONS_TABLE => array(
'session_forum_id' => array('session_forum_id'), 'session_forum_id' => array('session_forum_id'),
@ -724,9 +735,6 @@ function database_update_info()
'group_legend_name' => array('group_legend', 'group_name'), '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 // No changes from 3.0.1-RC1 to 3.0.1
'3.0.1-RC1' => array(), '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 // No changes from 3.0.6-RC2 to 3.0.6-RC3
'3.0.6-RC2' => array(), '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 // Changes from 3.0.3-RC1 to 3.0.3
case '3.0.3-RC1': case '3.0.3-RC1':
$sql = 'UPDATE ' . LOG_TABLE . " if ($db->sql_layer == 'oracle')
SET log_operation = 'LOG_DELETE_TOPIC' {
WHERE log_operation = 'LOG_TOPIC_DELETED'"; // log_operation is CLOB - but we can change this later
_sql($sql, $errored, $error_ary); $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; $no_updates = false;
break; break;
@ -1197,6 +1220,18 @@ function change_database_data(&$no_updates, $version)
'drop_keys' => array( 'drop_keys' => array(
ACL_OPTIONS_TABLE => array('auth_option'), 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( 'add_unique_index' => array(
ACL_OPTIONS_TABLE => array( ACL_OPTIONS_TABLE => array(
'auth_option' => array('auth_option'), '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); $statements = $db_tools->perform_schema_changes($changes);
foreach ($statements as $sql) foreach ($statements as $sql)
@ -1528,6 +1561,14 @@ function change_database_data(&$no_updates, $version)
$no_updates = false; $no_updates = false;
break; 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 FROM user_indexes
WHERE table_name = '" . strtoupper($table_name) . "' WHERE table_name = '" . strtoupper($table_name) . "'
AND generated = 'N' AND generated = 'N'
AND uniqueness = 'UNIQUE' AND uniqueness = 'UNIQUE'";
AND index_name LIKE 'U_%'";
$col = 'index_name'; $col = 'index_name';
break; break;
case 'sqlite': case 'sqlite':
$sql = "PRAGMA index_list('" . $table_name . "') WHERE unique = 1;"; $sql = "PRAGMA index_list('" . $table_name . "');";
$col = 'name'; $col = 'name';
break; break;
} }
@ -2548,7 +2588,15 @@ class updater_db_tools
switch ($this->sql_layer) switch ($this->sql_layer)
{ {
case 'oracle': 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; break;
case 'firebird': case 'firebird':
@ -3222,7 +3270,8 @@ class updater_db_tools
} }
else 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; break;

View file

@ -18,8 +18,12 @@ define('IN_INSTALL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../'; $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);
// Report all errors, except notices // Report all errors, except notices and deprecation messages
error_reporting(E_ALL ^ E_NOTICE); 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 // @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) if (version_compare(PHP_VERSION, '4.3.3') < 0)

View file

@ -1212,7 +1212,7 @@ class install_install extends module
} }
// Change prefix // 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... // Change language strings...
$sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query); $sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query);

View file

@ -262,6 +262,16 @@ class install_update extends module
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']); $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; break;
case 'update_db': 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/')) 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') if ($use_method == '.zip')

View file

@ -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 ('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_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 ('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_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');

View file

@ -2,6 +2,8 @@ Subject: Account activated
Hello {USERNAME}, 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} {EMAIL_SIG}

View file

@ -10,7 +10,7 @@ Username: {USERNAME}
Board URL: {U_BOARD} 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. 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.

View file

@ -96,7 +96,7 @@ $help = array(
), ),
array( array(
0 => 'How do I show an image below my username?', 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( array(
0 => 'What is my rank and how do I change it?', 0 => 'What is my rank and how do I change it?',

View file

@ -253,6 +253,8 @@ $lang = array_merge($lang, array(
'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.', 'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.',
'PM_REPORTED_SUCCESS' => 'This private message has been successfully reported.', '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_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_TOTAL' => 'In total there are <strong>%d</strong> PM reports to review.',
'PM_REPORTS_ZERO_TOTAL' => 'There are no PM reports to review.', 'PM_REPORTS_ZERO_TOTAL' => 'There are no PM reports to review.',
'PM_REPORT_DETAILS' => 'Private message report details', 'PM_REPORT_DETAILS' => 'Private message report details',

View file

@ -26,7 +26,7 @@ $synonyms = array(
'anemia' => 'anaemia', 'anemia' => 'anaemia',
'anemic' => 'anaemic', 'anemic' => 'anaemic',
'anesthesia' => 'anaesthesia', 'anesthesia' => 'anaesthesia',
'appologize' => 'appologise', 'apologize' => 'apologise',
'archean' => 'archaean', 'archean' => 'archaean',
'archeology' => 'archaeology', 'archeology' => 'archaeology',
'archeozoic' => 'archaeozoic', 'archeozoic' => 'archaeozoic',

View file

@ -460,6 +460,7 @@ $lang = array_merge($lang, array(
'UCP_ZEBRA' => 'Friends &amp; Foes', 'UCP_ZEBRA' => 'Friends &amp; Foes',
'UCP_ZEBRA_FOES' => 'Manage foes', 'UCP_ZEBRA_FOES' => 'Manage foes',
'UCP_ZEBRA_FRIENDS' => 'Manage friends', 'UCP_ZEBRA_FRIENDS' => 'Manage friends',
'UNDISCLOSED_RECIPIENT' => 'Undisclosed Recipient',
'UNKNOWN_FOLDER' => 'Unknown folder', 'UNKNOWN_FOLDER' => 'Unknown folder',
'UNWATCH_MARKED' => 'Unwatch marked', 'UNWATCH_MARKED' => 'Unwatch marked',
'UPLOAD_AVATAR_FILE' => 'Upload from your machine', 'UPLOAD_AVATAR_FILE' => 'Upload from your machine',

View file

@ -976,9 +976,11 @@ switch ($mode)
$jabber = request_var('jabber', ''); $jabber = request_var('jabber', '');
$search_group_id = request_var('search_group_id', 0); $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'); $joined_select = request_var('joined_select', 'lt');
$active_select = request_var('active_select', 'lt'); $active_select = request_var('active_select', 'lt');
$count_select = request_var('count_select', 'eq'); $count_select = request_var('count_select', 'eq');
$joined = explode('-', request_var('joined', '')); $joined = explode('-', request_var('joined', ''));
$active = explode('-', request_var('active', '')); $active = explode('-', request_var('active', ''));
$count = (request_var('count', '') !== '') ? request_var('count', 0) : ''; $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 .= ($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 .= ($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 .= ($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 .= (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) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : ''; $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) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[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 " : ''; $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) if ($search_group_id)

View file

@ -45,13 +45,6 @@ $mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var
$error = $post_data = array(); $error = $post_data = array();
$current_time = time(); $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 // Was cancel pressed? If so then redirect to the appropriate page
if ($cancel || ($current_time - $lastclick < 2 && $submit)) if ($cancel || ($current_time - $lastclick < 2 && $submit))
{ {
@ -95,8 +88,8 @@ switch ($mode)
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
WHERE t.topic_id = $topic_id WHERE t.topic_id = $topic_id
AND (f.forum_id = t.forum_id AND (f.forum_id = t.forum_id
OR f.forum_id = $forum_id) OR f.forum_id = $forum_id)" .
AND t.topic_approved = 1"; (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1');
break; break;
case 'quote': case 'quote':
@ -125,7 +118,7 @@ switch ($mode)
AND u.user_id = p.poster_id AND u.user_id = p.poster_id
AND (f.forum_id = t.forum_id AND (f.forum_id = t.forum_id
OR f.forum_id = $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; break;
case 'smilies': case 'smilies':
@ -171,6 +164,13 @@ if (!$post_data)
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST'); 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') if ($mode == 'popup')
{ {
upload_popup($post_data['forum_style']); upload_popup($post_data['forum_style']);
@ -179,6 +179,13 @@ if ($mode == 'popup')
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']); $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... // Use post_row values in favor of submitted ones...
$forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id; $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; $topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id;

View file

@ -215,6 +215,8 @@ if ($submit && $reason_id)
// Generate the reasons // Generate the reasons
display_reasons($reason_id); display_reasons($reason_id);
$page_title = ($pm_id) ? $user->lang['REPORT_MESSAGE'] : $user->lang['REPORT_POST'];
$template->assign_vars(array( $template->assign_vars(array(
'S_REPORT_POST' => ($pm_id) ? false : true, 'S_REPORT_POST' => ($pm_id) ? false : true,
'REPORT_TEXT' => $report_text, 'REPORT_TEXT' => $report_text,
@ -227,7 +229,7 @@ $template->assign_vars(array(
generate_forum_nav($forum_data); generate_forum_nav($forum_data);
// Start output of page // Start output of page
page_header($user->lang['REPORT_POST']); page_header($page_title);
$template->set_filenames(array( $template->set_filenames(array(
'body' => 'report_body.html') 'body' => 'report_body.html')

View file

@ -653,6 +653,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$forums = $rowset = $shadow_topic_list = array(); $forums = $rowset = $shadow_topic_list = array();
while ($row = $db->sql_fetchrow($result)) 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) if ($row['topic_status'] == ITEM_MOVED)
{ {
$shadow_topic_list[$row['topic_moved_id']] = $row['topic_id']; $shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];

View file

@ -15,8 +15,12 @@ define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1); $phpEx = substr(strrchr(__FILE__, '.'), 1);
// Report all errors, except notices // Report all errors, except notices and deprecation messages
error_reporting(E_ALL ^ E_NOTICE); if (!defined('E_DEPRECATED'))
{
define('E_DEPRECATED', 8192);
}
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
require($phpbb_root_path . 'config.' . $phpEx); require($phpbb_root_path . 'config.' . $phpEx);
@ -31,7 +35,7 @@ if (version_compare(PHP_VERSION, '6.0.0-dev', '<'))
} }
// Load Extensions // Load Extensions
if (!empty($load_extensions)) if (!empty($load_extensions) && function_exists('dl'))
{ {
$load_extensions = explode(',', $load_extensions); $load_extensions = explode(',', $load_extensions);

View file

@ -15,7 +15,7 @@
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
lang : '{L_RECAPTCHA_LANG}', lang : '{LA_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF --> tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
}; };
// ]]> // ]]>

View file

@ -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 * 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)) if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
event.which = event.charCode || event.keyCode; event.which = event.charCode || event.keyCode;
// Keycode is not return, then return. ;) if (phpbb_check_key(event))
if (event.which != 13)
return true; return true;
var current = selector['parentNode']; var current = selector['parentNode'];
@ -373,6 +405,9 @@ function apply_onkeypress_event()
if (!default_button || default_button.length <= 0) if (!default_button || default_button.length <= 0)
return true; return true;
if (phpbb_check_key(e))
return true;
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
{ {
default_button.click(); default_button.click();

View file

@ -24,6 +24,7 @@
| <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label> | <label for="autologin">{L_LOG_ME_IN} <input type="checkbox" name="autologin" id="autologin" /></label>
<!-- ENDIF --> <!-- ENDIF -->
<input type="submit" name="login" value="{L_LOGIN}" class="button2" /> <input type="submit" name="login" value="{L_LOGIN}" class="button2" />
{S_LOGIN_REDIRECT}
</fieldset> </fieldset>
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -36,7 +36,7 @@
<dt>&nbsp;</dt> <dt>&nbsp;</dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd> <dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></dd>
</dl> </dl>
{S_LOGIN_REDIRECT}
</fieldset> </fieldset>
</div> </div>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>

View file

@ -24,6 +24,7 @@
<dt>&nbsp;</dt> <dt>&nbsp;</dt>
<dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" id="login" class="button1" value="{L_LOGIN}" tabindex="2" /></dd> <dd>{S_HIDDEN_FIELDS}<input type="submit" name="login" id="login" class="button1" value="{L_LOGIN}" tabindex="2" /></dd>
</dl> </dl>
{S_LOGIN_REDIRECT}
</fieldset> </fieldset>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>

View file

@ -1,9 +1,13 @@
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
function hide_qr() function hide_qr(show)
{ {
dE('qr_editor_div'); dE('qr_editor_div');
dE('qr_showeditor_div'); dE('qr_showeditor_div');
if (show && document.getElementById('qr_editor_div').style.display != 'none')
{
document.getElementsByName('message')[0].focus();
}
return true; return true;
} }
@ -20,7 +24,6 @@
<form method="post" action="{U_QR_ACTION}"> <form method="post" action="{U_QR_ACTION}">
<div class="panel" id="qr_ns_editor_div"> <div class="panel" id="qr_ns_editor_div">
<div class="inner"><span class="corners-top"><span></span></span> <div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<h2>{L_QUICKREPLY}</h2> <h2>{L_QUICKREPLY}</h2>
<fieldset class="fields1"> <fieldset class="fields1">
<dl style="clear: left;"> <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="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; <input type="submit" accesskey="f" tabindex="7" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
</fieldset> </fieldset>
</div>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>
</div> </div>
</form> </form>
@ -45,7 +47,6 @@
<form method="post" action="{U_QR_ACTION}"> <form method="post" action="{U_QR_ACTION}">
<div class="panel" style="display: none" id="qr_editor_div"> <div class="panel" style="display: none" id="qr_editor_div">
<div class="inner"><span class="corners-top"><span></span></span> <div class="inner"><span class="corners-top"><span></span></span>
<div class="content">
<h2>{L_QUICKREPLY}</h2> <h2>{L_QUICKREPLY}</h2>
<fieldset class="fields1"> <fieldset class="fields1">
<dl style="clear: left;"> <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="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; <input type="submit" accesskey="f" tabindex="6" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
</fieldset> </fieldset>
<a href="" class="right-box up" onclick="hide_qr(); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a> <a href="" class="right-box up" onclick="hide_qr(false); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a>
</div>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>
</div> </div>
<div class="panel" style="display: none" id="qr_showeditor_div" > <div class="panel" style="display: none" id="qr_showeditor_div" >
@ -71,7 +71,7 @@
<div class="content"> <div class="content">
<fieldset class="submit-buttons"> <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> </fieldset>
</div> </div>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>

View file

@ -138,7 +138,7 @@
<!-- IF NEXT_PAGE --><a href="{NEXT_PAGE}" class="right-box {S_CONTENT_FLOW_END}">{L_NEXT}</a><!-- ENDIF --> <!-- 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 --> <!-- 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><!-- 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 --> <!-- ENDIF -->
</fieldset> </fieldset>

View file

@ -100,6 +100,7 @@
<dt>&nbsp;</dt> <dt>&nbsp;</dt>
<dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd> <dd><input type="submit" name="login" tabindex="5" value="{L_LOGIN}" class="button1" /></dd>
</dl> </dl>
{S_LOGIN_REDIRECT}
</fieldset> </fieldset>
</div> </div>

View file

@ -11,5 +11,5 @@
<tr> <tr>
<td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td> <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" /> <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> </tr>

View file

@ -1,8 +1,8 @@
<tr> <tr>
<th colspan="2" valign="middle">{QA_CONFIRM_QUESTION}</th> <th colspan="2" valign="middle">{L_CONFIRM_QUESTION}</th>
</tr> </tr>
<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> <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> <input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
</tr> </tr>

View file

@ -8,7 +8,7 @@
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
lang : '{L_RECAPTCHA_LANG}', lang : '{LA_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF --> tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
}; };
// ]]> // ]]>

View file

@ -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> <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> </tr>
</table> </table>
{S_LOGIN_REDIRECT}
{S_FORM_TOKEN} {S_FORM_TOKEN}
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -77,7 +77,7 @@
</tr> </tr>
</table> </table>
{S_FORM_TOKEN} {S_FORM_TOKEN}
{S_LOGIN_REDIRECT}
</form> </form>
<br clear="all" /> <br clear="all" />

View file

@ -32,6 +32,7 @@
</tr> </tr>
</table> </table>
{S_FORM_TOKEN} {S_FORM_TOKEN}
{S_LOGIN_REDIRECT}
</form> </form>
</div> </div>

View file

@ -84,15 +84,15 @@
</tr> </tr>
<tr> <tr>
<td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td> <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>
<tr> <tr>
<td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td> <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>
<tr> <tr>
<td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td> <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>
<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> <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>

View file

@ -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> <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> </tr>
</table> </table>
{S_LOGIN_REDIRECT}
</form> </form>
<!-- ENDIF --> <!-- ENDIF -->

View file

@ -1726,6 +1726,12 @@ if (empty($_REQUEST['f']))
$_REQUEST['f'] = $forum_id; $_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 // Output the page
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id); page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);