aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_database.html4
-rw-r--r--phpBB/adm/style/acp_email.html2
-rw-r--r--phpBB/adm/style/acp_permissions.html30
-rw-r--r--phpBB/adm/style/acp_search.html10
-rw-r--r--phpBB/adm/style/overall_header.html27
-rw-r--r--phpBB/adm/style/simple_header.html13
-rw-r--r--phpBB/docs/FAQ.html8
-rw-r--r--phpBB/download/file.php5
-rw-r--r--phpBB/includes/bbcode.php6
-rw-r--r--phpBB/includes/captcha/plugins/captcha_abstract.php7
-rw-r--r--phpBB/includes/classes/session.php9
-rw-r--r--phpBB/includes/classes/template_compile.php8
-rw-r--r--phpBB/includes/classes/user.php2
-rw-r--r--phpBB/includes/constants.php2
-rw-r--r--phpBB/includes/core/system.php3
-rw-r--r--phpBB/includes/functions_admin.php27
-rw-r--r--phpBB/includes/functions_content.php2
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/functions_messenger.php19
-rw-r--r--phpBB/includes/functions_posting.php16
-rw-r--r--phpBB/includes/functions_privmsgs.php11
-rw-r--r--phpBB/includes/functions_transfer.php39
-rw-r--r--phpBB/includes/functions_upload.php39
-rw-r--r--phpBB/includes/functions_user.php5
-rw-r--r--phpBB/includes/message_parser.php6
-rw-r--r--phpBB/includes/search/fulltext_mysql.php6
-rw-r--r--phpBB/includes/search/fulltext_native.php31
-rw-r--r--phpBB/install/database_update.php9
-rw-r--r--phpBB/install/schemas/schema_data.php3
-rw-r--r--phpBB/language/en/acp/board.php4
-rw-r--r--phpBB/language/en/acp/permissions.php14
-rw-r--r--phpBB/language/en/acp/search.php2
-rw-r--r--phpBB/language/en/common.php8
-rw-r--r--phpBB/language/en/help_bbcode.php2
-rw-r--r--phpBB/language/en/posting.php2
-rw-r--r--phpBB/language/en/search.php2
-rw-r--r--phpBB/language/en/ucp.php4
-rw-r--r--phpBB/mcp.php7
-rw-r--r--phpBB/memberlist.php2
-rw-r--r--phpBB/modules/acp/acp_database.php29
-rw-r--r--phpBB/modules/acp/acp_permissions.php4
-rw-r--r--phpBB/modules/acp/acp_search.php2
-rw-r--r--phpBB/modules/acp/acp_styles.php3
-rw-r--r--phpBB/modules/acp/acp_users.php10
-rw-r--r--phpBB/modules/ucp/ucp_main.php7
-rw-r--r--phpBB/modules/ucp/ucp_pm_compose.php8
-rw-r--r--phpBB/modules/ucp/ucp_pm_viewfolder.php4
-rw-r--r--phpBB/posting.php3
-rw-r--r--phpBB/search.php7
-rw-r--r--phpBB/styles/prosilver/template/editor.js1
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js11
-rw-r--r--phpBB/styles/prosilver/template/posting_editor.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html4
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html2
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html2
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css5
-rw-r--r--phpBB/styles/prosilver/theme/colours.css2
-rw-r--r--phpBB/styles/prosilver/theme/common.css2
-rw-r--r--phpBB/viewforum.php7
-rw-r--r--phpBB/viewonline.php2
-rw-r--r--phpBB/viewtopic.php15
61 files changed, 376 insertions, 154 deletions
diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html
index ebc76c36a3..e839fb1bda 100644
--- a/phpBB/adm/style/acp_database.html
+++ b/phpBB/adm/style/acp_database.html
@@ -70,8 +70,8 @@
</dl>
<dl>
<dt><label for="where">{L_ACTION}:</label></dt>
- <dd><label><input type="radio" class="radio" name="where" value="store_and_download" id="where" checked="checked" /> {L_STORE_AND_DOWNLOAD}</label>
- <label><input type="radio" class="radio" name="where" value="store" /> {L_STORE_LOCAL}</label>
+ <dd>
+ <label><input type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd>
</dl>
<dl>
diff --git a/phpBB/adm/style/acp_email.html b/phpBB/adm/style/acp_email.html
index b1d9b4af11..885809ffe2 100644
--- a/phpBB/adm/style/acp_email.html
+++ b/phpBB/adm/style/acp_email.html
@@ -44,7 +44,7 @@
</dl>
<p class="submit-buttons">
- <input class="button1" type="submit" id="submit" name="submit" value="{L_EMAIL}" />&nbsp;
+ <input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />&nbsp;
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
</p>
{S_FORM_TOKEN}
diff --git a/phpBB/adm/style/acp_permissions.html b/phpBB/adm/style/acp_permissions.html
index b4386d5f19..63583093b0 100644
--- a/phpBB/adm/style/acp_permissions.html
+++ b/phpBB/adm/style/acp_permissions.html
@@ -3,7 +3,7 @@
<a name="maincontent"></a>
<!-- IF S_INTRO -->
-
+
<h1>{L_ACP_PERMISSIONS}</h1>
{L_ACP_PERMISSIONS_EXPLAIN}
@@ -12,10 +12,12 @@
<!-- IF S_SELECT_VICTIM -->
+ <!-- IF U_BACK --><a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">&laquo; {L_BACK}</a><!-- ENDIF -->
+
<h1>{L_TITLE}</h1>
<p>{L_EXPLAIN}</p>
-
+
<!-- IF S_FORUM_NAMES -->
<p><strong>{L_FORUMS}:</strong> {FORUM_NAMES}</p>
<!-- ENDIF -->
@@ -62,7 +64,7 @@
</fieldset>
</form>
-
+
<!-- ENDIF -->
<!-- ELSEIF S_SELECT_USER and S_CAN_SELECT_USER -->
@@ -123,7 +125,7 @@
<!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><label><input type="checkbox" class="radio" name="all_users" value="1" /> {L_ALL_USERS}</label></dd><!-- ENDIF -->
</dl>
</fieldset>
-
+
<fieldset class="quick">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
@@ -154,7 +156,7 @@
</div>
<div style="float: {S_CONTENT_FLOW_END}; width: 48%">
-
+
<!-- IF S_CAN_SELECT_GROUP -->
<h1>{L_USERGROUPS}</h1>
@@ -168,7 +170,7 @@
<!-- IF S_ALLOW_ALL_SELECT --><dd class="full" style="text-align: right;"><label><input type="checkbox" class="radio" name="all_groups" value="1" /> {L_ALL_GROUPS}</label></dd><!-- ENDIF -->
</dl>
</fieldset>
-
+
<fieldset class="quick">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
@@ -177,7 +179,7 @@
</form>
<form id="add_groups" method="post" action="{U_ACTION}">
-
+
<fieldset>
<legend>{L_ADD_GROUPS}</legend>
<dl>
@@ -199,7 +201,7 @@
<!-- ELSEIF S_SELECT_USERGROUP_VIEW -->
<div style="float: {S_CONTENT_FLOW_BEGIN}; width: 48%;">
-
+
<h1>{L_USERS}</h1>
<form id="users" method="post" action="{U_ACTION}">
@@ -210,7 +212,7 @@
<dd class="full"><select style="width: 100%;" name="user_id[]" multiple="multiple" size="5">{S_DEFINED_USER_OPTIONS}</select></dd>
</dl>
</fieldset>
-
+
<fieldset class="quick">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
@@ -240,7 +242,7 @@
</div>
<div style="float: {S_CONTENT_FLOW_END}; width: 48%">
-
+
<h1>{L_USERGROUPS}</h1>
<form id="groups" method="post" action="{U_ACTION}">
@@ -251,7 +253,7 @@
<dd class="full"><select style="width: 100%;" name="group_id[]" multiple="multiple" size="5">{S_DEFINED_GROUP_OPTIONS}</select></dd>
</dl>
</fieldset>
-
+
<fieldset class="quick">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
@@ -311,11 +313,11 @@
<!-- IF S_PERMISSION_DROPDOWN -->
<form id="pselect" method="post" action="{U_ACTION}">
-
+
<fieldset class="quick" style="float: {S_CONTENT_FLOW_BEGIN};">
{S_HIDDEN_FIELDS}
{S_FORM_TOKEN}
- {L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select>
+ {L_SELECT_TYPE}: <select name="type">{S_PERMISSION_DROPDOWN}</select>
<input class="button2" type="submit" name="submit" value="{L_GO}" />
</fieldset>
@@ -347,7 +349,7 @@
</fieldset>
<br /><br />
-
+
</form>
<!-- ENDIF -->
diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html
index 0879780749..5fd7a23d97 100644
--- a/phpBB/adm/style/acp_search.html
+++ b/phpBB/adm/style/acp_search.html
@@ -33,6 +33,10 @@
<dd><input id="min_search_author_chars" type="text" size="4" maxlength="4" name="config[min_search_author_chars]" value="{MIN_SEARCH_AUTHOR_CHARS}" /></dd>
</dl>
<dl>
+ <dt><label for="max_num_search_keywords">{L_MAX_NUM_SEARCH_KEYWORDS}:</label><br /><span>{L_MAX_NUM_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
+ <dd><input id="max_num_search_keywords" type="text" size="4" maxlength="4" name="config[max_num_search_keywords]" value="{MAX_NUM_SEARCH_KEYWORDS}" /></dd>
+ </dl>
+ <dl>
<dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}:</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
<dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
</dl>
@@ -130,9 +134,9 @@
<!-- END data -->
</tbody>
</table>
-
+
<!-- ENDIF -->
-
+
<p class="quick">
<!-- IF backend.S_INDEXED -->
<input class="button2" type="submit" name="action[delete]" value="{L_DELETE_INDEX}" onclick="popup_progress_bar('delete');" />
@@ -142,7 +146,7 @@
</p>
{S_FORM_TOKEN}
</fieldset>
-
+
</form>
<!-- END backend -->
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index adafc0aa6d..93d72d5205 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -28,9 +28,16 @@ function jumpto()
{
var page = prompt(jump_page, on_page);
- if (page !== null && !isNaN(page) && page > 0)
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
{
- document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
}
}
@@ -71,7 +78,7 @@ function marklist(id, name, state)
}
var rb = parent.getElementsByTagName('input');
-
+
for (var r = 0; r < rb.length; r++)
{
if (rb[r].name.substr(0, name.length) == name)
@@ -166,7 +173,7 @@ function switch_menu()
<p><a href="{U_ADM_INDEX}">{L_ADMIN_INDEX}</a> &bull; <a href="{U_INDEX}">{L_FORUM_INDEX}</a></p>
<p id="skip"><a href="#acp">{L_SKIP}</a></p>
</div>
-
+
<div id="page-body">
<div id="tabs">
<ul>
@@ -180,31 +187,31 @@ function switch_menu()
<div class="panel">
<span class="corners-top"><span></span></span>
<div id="content">
- <!-- IF not S_USER_NOTICE -->
+ <!-- IF not S_USER_NOTICE -->
<div id="toggle">
<a id="toggle-handle" accesskey="m" title="{L_MENU_TOGGLE}" onclick="switch_menu(); return false;" href="#"></a></div>
<!-- ENDIF -->
<div id="menu">
<p><!-- IF S_USER_LOGGED_IN --> {L_LOGGED_IN_AS}<br /><strong>{USERNAME}</strong> [&nbsp;<a href="{U_LOGOUT}">{L_LOGOUT}</a>&nbsp;]<!-- ENDIF --><!-- IF S_USER_ADMIN -->[&nbsp;<a href="{U_ADM_LOGOUT}">{L_ADM_LOGOUT}</a>&nbsp;]<!-- ENDIF --></p>
- <!-- IF S_USER_ADMIN -->
+ <!-- IF S_USER_ADMIN -->
<ul>
<!-- BEGIN l_block1 -->
<!-- IF l_block1.S_SELECTED -->
-
+
<!-- BEGIN l_block2 -->
<!-- IF .l_block1.l_block2.l_block3 -->
<li class="header">{l_block1.l_block2.L_TITLE}</li>
<!-- ENDIF -->
-
+
<!-- BEGIN l_block3 -->
<li<!-- IF l_block1.l_block2.l_block3.S_SELECTED --> id="activemenu"<!-- ENDIF -->><a href="{l_block1.l_block2.l_block3.U_TITLE}"><span>{l_block1.l_block2.l_block3.L_TITLE}</span></a></li>
<!-- END l_block3 -->
<!-- END l_block2 -->
-
+
<!-- ENDIF -->
<!-- END l_block1 -->
</ul>
<!-- ENDIF -->
</div>
-
+
<div id="main">
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 3e36c47988..e7d34c7ff4 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -39,9 +39,16 @@ function jumpto()
{
var page = prompt(jump_page, on_page);
- if (page !== null && !isNaN(page) && page > 0)
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
{
- document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
}
}
@@ -77,7 +84,7 @@ function marklist(id, name, state)
}
var rb = parent.getElementsByTagName('input');
-
+
for (var r = 0; r < rb.length; r++)
{
if (rb[r].name.substr(0, name.length) == name)
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
index ee92427530..f91d4bc223 100644
--- a/phpBB/docs/FAQ.html
+++ b/phpBB/docs/FAQ.html
@@ -53,7 +53,7 @@
<!-- add entry about common UTF8 problems (for example wrong uploading, editing) -->
<ul>
- <li><a href="#install">I cannot install this it is too difficult! Will you do it?</a></li>
+ <li><a href="#install">I am finding phpBB too difficult to install. Will you do it for me?</a></li>
<li><a href="#legal">I am having problems with the admin at a certain board, help!</a></li>
<li><a href="#legal">A board has ripped off my graphics/software/etc., stop them!</a></li>
<li><a href="#legal">A board is dealing in warez/porn/etc., you need to prevent them doing this!</a></li>
@@ -62,7 +62,7 @@
<li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
<li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
<li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
- <li><a href="#avatars">No matter what I set the uploadable avatars to I cannot upload one from my computer!</a></li>
+ <li><a href="#avatars">I am unable to upload avatars from my computer, regardless of the settings.</a></li>
<li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
<li><a href="#permissions">How do I use/set permissions?</a></li>
<li><a href="#login_issues">I (or my users) cannot stay logged in to the forum!</a></li>
@@ -78,7 +78,7 @@
<hr />
- <a name="install"></a><h2>I cannot install this it is too difficult! Will you do it?</h2>
+ <a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
@@ -205,7 +205,7 @@ I want to sue you because i think you host an illegal board!</h2>
<hr />
-<a name="avatars"></a><h2>No matter what I set the uploadable avatars to I cannot upload one from my computer!</h2>
+<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
<div class="paragraph">
<div class="inner"><span class="corners-top"><span></span></span>
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 61c108c626..dda6548e88 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -349,7 +349,7 @@ function send_avatar_to_browser($file, $browser)
}
else
{
- header('HTTP/1.0 404 not found');
+ header('HTTP/1.0 404 Not Found');
}
}
@@ -631,8 +631,9 @@ function set_modified_headers($stamp, $browser)
{
if ($last_load !== false && $last_load <= $stamp)
{
- if (@php_sapi_name() === 'CGI')
+ if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
{
+ // in theory, we shouldn't need that due to php doing it. Reality offers a differing opinion, though
header('Status: 304 Not Modified', true, 304);
}
else
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php
index d0cfd2f044..22aa43431e 100644
--- a/phpBB/includes/bbcode.php
+++ b/phpBB/includes/bbcode.php
@@ -1,4 +1,4 @@
-<?php
+18.04.2009<?php
/**
*
* @package phpBB3
@@ -509,12 +509,12 @@ class bbcode
else if (is_numeric($type))
{
$tpl = 'olist_open';
- $type = 'arabic-numbers';
+ $type = 'decimal';
}
else
{
$tpl = 'olist_open';
- $type = 'arabic-numbers';
+ $type = 'decimal';
}
return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));
diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php
index 621fea414a..4f494b9c69 100644
--- a/phpBB/includes/captcha/plugins/captcha_abstract.php
+++ b/phpBB/includes/captcha/plugins/captcha_abstract.php
@@ -29,6 +29,8 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
protected $type;
protected $solved = false;
+ protected $min_chars = 4;
+ protected $max_chars = 7;
function init($type)
{
@@ -46,7 +48,7 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
function execute_demo()
{
- $this->code = gen_rand_string(mt_rand(5, 8));
+ $this->code = gen_rand_string(mt_rand($this->min_chars, $this->max_chars));
$this->seed = hexdec(substr(unique_id(), 4, 10));
// compute $seed % 0x7fffffff
@@ -188,10 +190,11 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
*/
protected function generate_code()
{
- $this->code = gen_rand_string(mt_rand(5, 8));
+ $this->code = gen_rand_string(mt_rand($this->min_chars, $this->max_chars));
$this->confirm_id = md5(unique_id(phpbb::$user->ip));
$this->seed = hexdec(substr(unique_id(), 4, 10));
$this->solved = false;
+
// compute $seed % 0x7fffffff
$this->seed -= 0x7fffffff * floor($this->seed / 0x7fffffff);
diff --git a/phpBB/includes/classes/session.php b/phpBB/includes/classes/session.php
index 05a2b60a66..ca54bae552 100644
--- a/phpBB/includes/classes/session.php
+++ b/phpBB/includes/classes/session.php
@@ -420,6 +420,15 @@ abstract class phpbb_session
}
}
+ // Something quite important: session_page always holds the *last* page visited, except for the *first* visit.
+ // We are not able to simply have an empty session_page btw, therefore we need to tell phpBB how to detect this special case.
+ // If the session id is empty, we have a completely new one and will set an "identifier" here. This identifier is able to be checked later.
+ if (empty($this->data['session_id']))
+ {
+ // This is a temporary variable, only set for the very first visit
+ $this->data['session_created'] = true;
+ }
+
$this->session_id = $this->data['session_id'] = md5(phpbb::$security->unique_id());
$sql_ary['session_id'] = (string) $this->session_id;
diff --git a/phpBB/includes/classes/template_compile.php b/phpBB/includes/classes/template_compile.php
index 3f6f82f5df..098d8f4817 100644
--- a/phpBB/includes/classes/template_compile.php
+++ b/phpBB/includes/classes/template_compile.php
@@ -187,8 +187,8 @@ class phpbb_template_filter extends php_user_filter
$this->compile_language_tags($text_blocks);
// This will handle the remaining root-level varrefs
- $text_blocks = preg_replace('#\{([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_rootref['\\1'])) ? \$_rootref['\\1'] : ''; ?>", $text_blocks);
- $text_blocks = preg_replace('#\{\$([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_tpldata['DEFINE']['.']['\\1'])) ? \$_tpldata['DEFINE']['.']['\\1'] : ''; ?>", $text_blocks);
+ $text_blocks = preg_replace('#\{([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$_rootref['\\1'])) ? \$_rootref['\\1'] : ''; ?>", $text_blocks);
+ $text_blocks = preg_replace('#\{\$([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$_tpldata['DEFINE']['.']['\\1'])) ? \$_tpldata['DEFINE']['.']['\\1'] : ''; ?>", $text_blocks);
return $text_blocks;
}
@@ -201,14 +201,14 @@ class phpbb_template_filter extends php_user_filter
// transform vars prefixed by L_ into their language variable pendant if nothing is set within the tpldata array
if (strpos($text_blocks, '{L_') !== false)
{
- $text_blocks = preg_replace('#\{L_([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_rootref['L_\\1'])) ? \$_rootref['L_\\1'] : (isset(\$_lang['\\1']) ? \$_lang['\\1'] : '{ \\1 }'); ?>", $text_blocks);
+ $text_blocks = preg_replace('#\{L_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$_rootref['L_\\1'])) ? \$_rootref['L_\\1'] : ((isset(\$_lang['\\1'])) ? \$_lang['\\1'] : '{ \\1 }')); ?>", $text_blocks);
}
// Handle addslashed language variables prefixed with LA_
// If a template variable already exist, it will be used in favor of it...
if (strpos($text_blocks, '{LA_') !== false)
{
- $text_blocks = preg_replace('#\{LA_([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_rootref['LA_\\1'])) ? \$_rootref['LA_\\1'] : ((isset(\$_rootref['L_\\1'])) ? addslashes(\$_rootref['L_\\1']) : (isset(\$_lang['\\1']) ? addslashes(\$_lang['\\1']) : '{ \\1 }')); ?>", $text_blocks);
+ $text_blocks = preg_replace('#\{LA_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$_rootref['LA_\\1'])) ? \$_rootref['LA_\\1'] : ((isset(\$_rootref['L_\\1'])) ? addslashes(\$_rootref['L_\\1']) : ((isset(\$_lang['\\1'])) ? addslashes(\$_lang['\\1']) : '{ \\1 }'))); ?>", $text_blocks);
}
}
diff --git a/phpBB/includes/classes/user.php b/phpBB/includes/classes/user.php
index e060bcda52..83e8fce4eb 100644
--- a/phpBB/includes/classes/user.php
+++ b/phpBB/includes/classes/user.php
@@ -953,7 +953,7 @@ class phpbb_user extends phpbb_session
return $img_data;
}
- $img_data['src'] = PHPBB_ROOT_PATH . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename'];
+ $img_data['src'] = PHPBB_ROOT_PATH . 'styles/' . rawurlencode($this->theme['imageset_path']) . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename'];
$img_data['width'] = $this->img_array[$img]['image_width'];
$img_data['height'] = $this->img_array[$img]['image_height'];
}
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index f4863bd24f..8fc06cb352 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/
// phpBB Version
-define('PHPBB_VERSION', '3.1.0-dev');
+define('PHPBB_VERSION', '3.1.0-dev1');
// QA-related
// define('PHPBB_QA', 1);
diff --git a/phpBB/includes/core/system.php b/phpBB/includes/core/system.php
index 55dca1d311..5bb42e9ed4 100644
--- a/phpBB/includes/core/system.php
+++ b/phpBB/includes/core/system.php
@@ -107,6 +107,9 @@ class phpbb_system extends phpbb_plugin_support
if ($this->chmod_info['process'])
{
+ $file_uid = fileowner($filename);
+ $file_gid = filegroup($filename);
+
// Change owner
if (@chown($filename, $this->chmod_info['common_owner']))
{
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index ead47e4dba..884c5526c4 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -633,7 +633,24 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
return false;
}
- $where_clause = phpbb::$db->sql_in_set($where_type, array_map('intval', $where_ids));
+ $where_ids = array_map('intval', $where_ids);
+
+ // Split post deletion into chunks to overcome database limitations
+ if (sizeof($where_ids) >= 1001)
+ {
+ // Split into chunks of 1000
+ $chunks = array_chunk($where_ids, 1000);
+ $removed_posts = 0;
+
+ foreach ($chunks as $_where_ids)
+ {
+ $removed_posts += delete_posts($where_type, $_where_ids, $auto_sync, $posted_sync, $post_count_sync, $call_delete_topics);
+ }
+
+ return $removed_posts;
+ }
+
+ $where_clause = phpbb::$db->sql_in_set($where_type, $where_ids);
}
$approved_posts = 0;
@@ -646,10 +663,10 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
while ($row = phpbb::$db->sql_fetchrow($result))
{
- $post_ids[] = $row['post_id'];
- $poster_ids[] = $row['poster_id'];
- $topic_ids[] = $row['topic_id'];
- $forum_ids[] = $row['forum_id'];
+ $post_ids[] = (int) $row['post_id'];
+ $poster_ids[] = (int) $row['poster_id'];
+ $topic_ids[] = (int) $row['topic_id'];
+ $forum_ids[] = (int) $row['forum_id'];
if ($row['post_postcount'] && $post_count_sync && $row['post_approved'])
{
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index 27d70a708c..64c915b7dd 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -1108,7 +1108,7 @@ function truncate_string($string, $max_length = 60, $max_store_length = 255, $al
array_pop($chars);
$string = implode('', $chars);
}
- while (utf8_strlen($string) > $max_store_length || !sizeof($chars));
+ while (!empty($chars) && utf8_strlen($string) > $max_store_length);
}
if ($strip_reply)
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 18f23fbeea..cf12a60aec 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -234,7 +234,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
// Handle marking posts
if ($mark_read == 'forums' || $mark_read == 'all')
{
- $redirect = phpbb::$url->build_url('mark', 'hash');
+ $redirect = phpbb::$url->build_url(array('mark', 'hash'));
$token = request_var('hash', '');
if (phpbb::$security->check_link($token, 'global'))
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index a985a7b2ec..8d15e8a13f 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -176,7 +176,8 @@ class messenger
if (empty($this->tpl_msg[$template_lang . $template_file]))
{
- $tpl_file = PHPBB_ROOT_PATH . "language/$template_lang/email/$template_file.txt";
+ $tpl_file = (!empty(phpbb::$user->lang_path)) ? phpbb::$user->lang_path : PHPBB_ROOT_PATH . 'language/';
+ $tpl_file .= $template_lang . "/email/$template_file.txt";
if (!file_exists($tpl_file))
{
@@ -1401,9 +1402,10 @@ function mail_encode($str)
// define start delimimter, end delimiter and spacer
$start = "=?UTF-8?B?";
$end = "?=";
- $spacer = $end . ' ' . $start;
- $split_length = 64;
+ $delimiter = "\r\n ";
+ // Maximum length is 75. $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
+ $split_length = 60;
$encoded_str = base64_encode($str);
// If encoded string meets the limits, we just return with the correct data.
@@ -1415,7 +1417,7 @@ function mail_encode($str)
// If there is only ASCII data, we just return what we want, correctly splitting the lines.
if (strlen($str) === utf8_strlen($str))
{
- return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end;
+ return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
}
// UTF-8 data, compose encoded lines
@@ -1426,16 +1428,15 @@ function mail_encode($str)
{
$text = '';
- while (sizeof($array) && intval((strlen($text . current($array)) + 2) / 3) << 2 <= $split_length)
+ while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
{
- $text .= current($array);
- unset($array[key($array)]);
+ $text .= array_shift($array);
}
- $str .= $start . base64_encode($text) . $end . ' ';
+ $str .= $start . base64_encode($text) . $end . $delimiter;
}
- return substr($str, 0, -1);
+ return substr($str, 0, -strlen($delimiter));
}
?> \ No newline at end of file
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index baa2ab3180..1b5e434215 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -600,7 +600,7 @@ function create_thumbnail($source, $destination, $mimetype)
list($new_width, $new_height) = get_img_size_format($width, $height);
// Do not create a thumbnail if the resulting width/height is bigger than the original one
- if ($new_width > $width && $new_height > $height)
+ if ($new_width >= $width && $new_height >= $height)
{
return false;
}
@@ -1101,7 +1101,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
if (!$topic_notification && !$forum_notification)
{
- trigger_error('WRONG_NOTIFICATION_MODE');
+ trigger_error('NO_MODE');
}
if (($topic_notification && !phpbb::$config['allow_topic_notify']) || ($forum_notification && !phpbb::$config['allow_forum_notify']))
@@ -1708,6 +1708,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$sql_data[TOPICS_TABLE]['sql'] = array(
'topic_poster' => (int) phpbb::$user->data['user_id'],
'topic_time' => $current_time,
+ 'topic_last_view_time' => $current_time,
'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
'icon_id' => $data['icon_id'],
'topic_approved' => $post_approval,
@@ -1755,7 +1756,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
break;
case 'reply':
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0' . (($post_approval) ? ', topic_replies = topic_replies + 1' : '') . ((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_view_time = ' . $current_time . ',
+ topic_replies_real = topic_replies_real + 1,
+ topic_bumped = 0,
+ topic_bumper = 0' .
+ (($post_approval) ? ', topic_replies = topic_replies + 1' : '') .
+ ((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
+
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . ((phpbb::$acl->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
if ($post_approval && $topic_type != POST_GLOBAL)
@@ -1794,6 +1801,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1,
'poll_length' => (isset($poll['poll_options'])) ? $poll_length : 0,
'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0,
+ 'topic_last_view_time' => $current_time,
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
);
@@ -1837,7 +1845,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// Correctly set back the topic replies and forum posts... but only if the post was approved before.
if (!$post_approval && $data['post_approved'])
{
- $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1';
+ $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1, topic_last_view_time = ' . $current_time;
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
set_config_count('num_posts', -1, true);
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index de7a1e7d18..90060519db 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1731,8 +1731,14 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
$url = append_sid('ucp', 'i=pm');
$next_history_pm = $previous_history_pm = $prev_id = 0;
- foreach ($rowset as $id => $row)
+ // Re-order rowset to be able to get the next/prev message rows...
+ $rowset = array_values($rowset);
+
+ for ($i = 0, $size = sizeof($rowset); $i < $size; $i++)
{
+ $row = &$rowset[$i];
+ $id = (int) $row['msg_id'];
+
$author_id = $row['author_id'];
$folder_id = (int) $row['folder_id'];
@@ -1763,8 +1769,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
if ($id == $msg_id)
{
- $next_history_pm = next($rowset);
- $next_history_pm = (sizeof($next_history_pm)) ? (int) $next_history_pm['msg_id'] : 0;
+ $next_history_pm = (isset($rowset[$i + 1])) ? (int) $rowset[$i + 1]['msg_id'] : 0;
$previous_history_pm = $prev_id;
}
diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php
index 808f28a147..d7cb11cbf4 100644
--- a/phpBB/includes/functions_transfer.php
+++ b/phpBB/includes/functions_transfer.php
@@ -190,7 +190,7 @@ class transfer
$directory = $this->root_path . str_replace(PHPBB_ROOT_PATH, '', $directory);
$this->_chdir($directory);
- $result = $this->_ls('');
+ $result = $this->_ls();
if ($result !== false && is_array($result))
{
@@ -442,7 +442,24 @@ class ftp extends transfer
*/
private function _ls($dir = './')
{
- return @ftp_nlist($this->connection, $dir);
+ $list = @ftp_nlist($this->connection, $dir);
+
+ // Remove path if prepended
+ foreach ($list as $key => $item)
+ {
+ // Use same separator for item and dir
+ $item = str_replace('\\', '/', $item);
+ $dir = str_replace('\\', '/', $dir);
+
+ if (strpos($item, $dir) === 0)
+ {
+ $item = substr($item, strlen($dir));
+ }
+
+ $list[$key] = $item;
+ }
+
+ return $list;
}
/**
@@ -690,6 +707,24 @@ class ftp_fsock extends transfer
}
$this->_close_data_connection();
+ // Clear buffer
+ $this->_check_command();
+
+ // Remove path if prepended
+ foreach ($list as $key => $item)
+ {
+ // Use same separator for item and dir
+ $item = str_replace('\\', '/', $item);
+ $dir = str_replace('\\', '/', $dir);
+
+ if (strpos($item, $dir) === 0)
+ {
+ $item = substr($item, strlen($dir));
+ }
+
+ $list[$key] = $item;
+ }
+
return $list;
}
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 63c62215d1..363bfdd768 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -588,7 +588,18 @@ class fileupload
// PHP Upload filesize exceeded
if ($file->get('filename') == 'none')
{
- $file->error[] = (@ini_get('upload_max_filesize') == '') ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf(phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
+ $max_filesize = @ini_get('upload_max_filesize');
+ $unit = 'MB';
+
+ if (!empty($max_filesize))
+ {
+ $unit = strtolower(substr($max_filesize, -1, 1));
+ $max_filesize = (int) $max_filesize;
+
+ $unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
+ }
+
+ $file->error[] = (empty($max_filesize)) ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : phpbb::$user->lang($this->error_prefix . 'PHP_SIZE_OVERRUN', $max_filesize, phpbb::$user->lang[$unit]);
return $file;
}
@@ -662,7 +673,18 @@ class fileupload
// PHP Upload filesize exceeded
if ($file->get('filename') == 'none')
{
- $file->error[] = (@ini_get('upload_max_filesize') == '') ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf(phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
+ $max_filesize = @ini_get('upload_max_filesize');
+ $unit = 'MB';
+
+ if (!empty($max_filesize))
+ {
+ $unit = strtolower(substr($max_filesize, -1, 1));
+ $max_filesize = (int) $max_filesize;
+
+ $unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
+ }
+
+ $file->error[] = (empty($max_filesize)) ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : phpbb::$user->lang($this->error_prefix . 'PHP_SIZE_OVERRUN', $max_filesize, phpbb::$user->lang[$unit]);
return $file;
}
@@ -806,7 +828,18 @@ class fileupload
switch ($errorcode)
{
case 1:
- $error = (@ini_get('upload_max_filesize') == '') ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf(phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
+ $max_filesize = @ini_get('upload_max_filesize');
+ $unit = 'MB';
+
+ if (!empty($max_filesize))
+ {
+ $unit = strtolower(substr($max_filesize, -1, 1));
+ $max_filesize = (int) $max_filesize;
+
+ $unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
+ }
+
+ $error = (empty($max_filesize)) ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : phpbb::$user->lang($this->error_prefix . 'PHP_SIZE_OVERRUN', $max_filesize, phpbb::$user->lang[$unit]);
break;
case 2:
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 58149b9527..5c22cfb4ef 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2686,13 +2686,14 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
$temp_ary = array();
while ($row = phpbb::$db->sql_fetchrow($result))
{
- if ($default_groups[$row['user_id']] == $group_id && (!isset($temp_ary[$row['user_id']]) || array_search($row['group_name_clean'], $clean_group_order) < $temp_ary[$row['user_id']]))
+ if ($default_groups[$row['user_id']] == $group_id && (!isset($temp_ary[$row['user_id']]) || $group_order_id[$row['group_name']] < $temp_ary[$row['user_id']]))
{
$temp_ary[$row['user_id']] = $row['group_id'];
}
}
phpbb::$db->sql_freeresult($result);
+ // sql_where_ary holds the new default groups and their users
$sql_where_ary = array();
foreach ($temp_ary as $uid => $gid)
{
@@ -2704,7 +2705,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
{
if (isset($sql_where_ary[$gid]) && sizeof($sql_where_ary[$gid]))
{
- remove_default_rank($group_id, $sql_where_ary[$gid]);
+ remove_default_rank($gid, $sql_where_ary[$gid]);
remove_default_avatar($group_id, $sql_where_ary[$gid]);
group_set_user_default($gid, $sql_where_ary[$gid], $default_data_ary);
}
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 9a13d2d14c..39c65e054d 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1037,11 +1037,7 @@ class parse_message extends bbcode_firstpass
{
// Init BBCode UID
$this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
-
- if ($message)
- {
- $this->message = $message;
- }
+ $this->message = $message;
}
/**
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index 6430e3b0b8..8c4b8f3c7d 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -110,6 +110,12 @@ class fulltext_mysql extends search_backend
preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
$this->split_words = $matches[1];
+ // We limit the number of allowed keywords to minimize load on the database
+ if (phpbb::$config['max_num_search_keywords'] && sizeof($this->split_words) > phpbb::$config['max_num_search_keywords'])
+ {
+ trigger_error(phpbb::$user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', phpbb::$config['max_num_search_keywords'], sizeof($this->split_words)));
+ }
+
// to allow phrase search, we need to concatenate quoted words
$tmp_split_words = array();
$phrase = '';
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index 54854651a8..a2cb8936b5 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -163,6 +163,13 @@ class fulltext_native extends search_backend
);
$keywords = preg_replace($match, $replace, $keywords);
+ $num_keywords = sizeof(explode(' ', $keywords));
+
+ // We limit the number of allowed keywords to minimize load on the database
+ if (phpbb::$config['max_num_search_keywords'] && $num_keywords > phpbb::$config['max_num_search_keywords'])
+ {
+ trigger_error(phpbb::$user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', phpbb::$config['max_num_search_keywords'], $num_keywords));
+ }
// $keywords input format: each word separated by a space, words in a bracket are not separated
@@ -637,7 +644,11 @@ class fulltext_native extends search_backend
if (phpbb::$db->dbms_type === 'mysql')
{
- $sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
+ $sql_array_copy = $sql_array;
+
+ // $sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
+ $sql_array_copy['SELECT'] = 'SQL_CALC_FOUND_ROWS p.post_id ';
+
$is_mysql = true;
}
else
@@ -710,8 +721,14 @@ class fulltext_native extends search_backend
}
// if we use mysql and the total result count is not cached yet, retrieve it from the db
- if (!$total_results && $is_mysql)
+ if (!$total_results && $is_mysql && !empty($sql_array_copy))
{
+ $sql = phpbb::$db->sql_build_query('SELECT', $sql_array_copy);
+ unset($sql_array_copy);
+
+ phpbb::$db->sql_query($sql);
+ phpbb::$db->sql_freeresult($result);
+
$sql = 'SELECT FOUND_ROWS() as total_results';
$result = phpbb::$db->sql_query($sql);
$total_results = (int) phpbb::$db->sql_fetchfield('total_results');
@@ -831,8 +848,8 @@ class fulltext_native extends search_backend
{
if (phpbb::$db->dbms_type === 'mysql')
{
- $select = 'SQL_CALC_FOUND_ROWS ' . $select;
- $is_mysql = true;
+// $select = 'SQL_CALC_FOUND_ROWS ' . $select;
+ $is_mysql = true;
}
else
{
@@ -923,6 +940,12 @@ class fulltext_native extends search_backend
if (!$total_results && $is_mysql)
{
+ // Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
+ $sql = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
+
+ phpbb::$db->sql_query($sql);
+ phpbb::$db->sql_freeresult($result);
+
$sql = 'SELECT FOUND_ROWS() as total_results';
$result = phpbb::$db->sql_query($sql);
$total_results = (int) phpbb::$db->sql_fetchfield('total_results');
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 2eef013742..0be2e0f5b8 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.1.0';
+$updates_to_version = '3.1.0-dev1';
// Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false;
@@ -55,8 +55,8 @@ $inline_update = (request_var('type', 0)) ? true : false;
// Only an example, but also commented out
$database_update_info = array(
- // No changes from 3.0.3-RC1 to 3.0.3
- '3.0.3-RC1' => array(),
+ // Changes from 3.0.5 to 3.1.0-dev1
+ '3.0.5' => array(),
);
$error_ary = array();
@@ -340,6 +340,9 @@ function change_database_data($version)
switch ($version)
{
default:
+ // Changes from 3.0.5 to 3.1.0-dev1
+ case '3.0.5':
+ break;
break;
}
}
diff --git a/phpBB/install/schemas/schema_data.php b/phpBB/install/schemas/schema_data.php
index f4f5d3444d..766a918340 100644
--- a/phpBB/install/schemas/schema_data.php
+++ b/phpBB/install/schemas/schema_data.php
@@ -206,6 +206,7 @@ $schema_data[] = array(
array('max_filesize_pm', '262144'),
array('max_login_attempts', '3'),
array('max_name_chars', '20'),
+ array('max_num_search_keywords', '10'),
array('max_pass_chars', '30'),
array('max_poll_options', '10'),
array('max_poll_chars', '60000'),
@@ -268,7 +269,7 @@ $schema_data[] = array(
array('tpl_allow_php', '0'),
array('upload_icons_path', 'images/upload_icons'),
array('upload_path', 'files'),
- array('version', '3.1.0'),
+ array('version', '3.1.0-dev1'),
array('warnings_expire_days', '90'),
array('warnings_gc', '14400'),
),
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index dc12cbb42a..3c96f239e8 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -269,8 +269,8 @@ $lang = array_merge($lang, array(
'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.',
'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations',
'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.',
- 'VISUAL_CONFIRM_REFRESH' => 'Enable users to request new images',
- 'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new images, if they are unable to solve the VC during registration.',
+ 'VISUAL_CONFIRM_REFRESH' => 'Enable users to refresh the confirmation image',
+ 'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new confirmation codes, if they are unable to solve the VC during registration.',
));
// Cookie Settings
diff --git a/phpBB/language/en/acp/permissions.php b/phpBB/language/en/acp/permissions.php
index bba425d076..920643d927 100644
--- a/phpBB/language/en/acp/permissions.php
+++ b/phpBB/language/en/acp/permissions.php
@@ -50,7 +50,7 @@ $lang = array_merge($lang, array(
<h2>Permission Masks</h2>
<p>These are used to view the effective permissions assigned to Users, Moderators (Local and Global), Administrators or Forums.</p>
-
+
<br />
<p>For further information on setting up and managing permissions on your phpBB3 board, please see <a href="http://www.phpbb.com/support/documentation/3.0/quickstart/quick_permissions.html">Chapter 1.5 of our Quick Start Guide</a>.</p>
@@ -71,7 +71,7 @@ $lang = array_merge($lang, array(
'ACL_TYPE_GLOBAL_M_' => 'Global Moderator permissions',
'ACL_TYPE_LOCAL_M_' => 'Forum Moderator permissions',
'ACL_TYPE_LOCAL_F_' => 'Forum permissions',
-
+
'ACL_NO' => 'No',
'ACL_VIEW' => 'Viewing permissions',
'ACL_VIEW_EXPLAIN' => 'Here you can see the effective permissions the user/group is having. A red square indicates that the user/group does not have the permission, a green square indicates that the user/group does have the permission.',
@@ -83,10 +83,10 @@ $lang = array_merge($lang, array(
'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator permissions to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.',
'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.',
'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.',
- 'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
- 'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
- 'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
- 'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
+ 'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
+ 'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.',
'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.',
'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups.',
@@ -196,7 +196,7 @@ $lang = array_merge($lang, array(
'ROLE_DESCRIPTION_USER_NOAVATAR' => 'Has a limited feature set and is not allowed to use the Avatar feature.',
'ROLE_DESCRIPTION_USER_NOPM' => 'Has a limited feature set, and is not allowed to use Private Messages.',
'ROLE_DESCRIPTION_USER_STANDARD' => 'Can access most but not all user features. Cannot change user name or ignore the flood limit, for instance.',
-
+
'ROLE_DESCRIPTION_EXPLAIN' => 'You are able to enter a short explanation of what the role is doing or for what it is meant for. The text you enter here will be displayed within the permissions screens too.',
'ROLE_DESCRIPTION_LONG' => 'The role description is too long, please limit it to 4000 characters.',
'ROLE_DETAILS' => 'Role details',
diff --git a/phpBB/language/en/acp/search.php b/phpBB/language/en/acp/search.php
index 16fa7fdf6e..11e6723c75 100644
--- a/phpBB/language/en/acp/search.php
+++ b/phpBB/language/en/acp/search.php
@@ -68,6 +68,8 @@ $lang = array_merge($lang, array(
'MAX_SEARCH_CHARS' => 'Max characters indexed by search',
'MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching.',
+ 'MAX_NUM_SEARCH_KEYWORDS' => 'Maximum number of allowed keywords',
+ 'MAX_NUM_SEARCH_KEYWORDS_EXPLAIN' => 'Maximum number of words the user is able to search for. A value of 0 allows an unlimited number of words.',
'MIN_SEARCH_CHARS' => 'Min characters indexed by search',
'MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching.',
'MIN_SEARCH_AUTHOR_CHARS' => 'Min author name characters',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 3dbda4a4db..048e732e83 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -87,7 +87,7 @@ $lang = array_merge($lang, array(
'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.',
'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
- 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %d MB.<br />Please note this is set in php.ini and cannot be overridden.',
+ 'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1d %2s.',
@@ -163,7 +163,7 @@ $lang = array_merge($lang, array(
),
'EDIT_POST' => 'Edit post',
- 'EMAIL' => 'E-mail',
+ 'EMAIL' => 'E-mail', // Short form for EMAIL_ADDRESS
'EMAIL_ADDRESS' => 'E-mail address',
'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending e-mail at <strong>Line %1$s</strong>. Response: %2$s.',
'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.',
@@ -233,6 +233,8 @@ $lang = array_merge($lang, array(
'FTP_USERNAME_EXPLAIN' => 'Username used to connect to your server.',
'GENERAL_ERROR' => 'General Error',
+ 'GB' => 'GB',
+ 'GIB' => 'GiB',
'GO' => 'Go',
'GOTO_PAGE' => 'Go to page',
'GROUP' => 'Group',
@@ -535,7 +537,7 @@ $lang = array_merge($lang, array(
'SELECT_ALL_CODE' => 'Select all',
'SELECT_DESTINATION_FORUM' => 'Please select a destination forum',
'SELECT_FORUM' => 'Select a forum',
- 'SEND_EMAIL' => 'E-mail',
+ 'SEND_EMAIL' => 'E-mail', // Used for submit buttons
'SEND_EMAIL_USER' => 'E-mail', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> E-mail UserX
'SEND_PRIVATE_MESSAGE' => 'Send private message',
'SETTINGS' => 'Settings',
diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php
index 00b00c9e19..ed6fea96d3 100644
--- a/phpBB/language/en/help_bbcode.php
+++ b/phpBB/language/en/help_bbcode.php
@@ -76,7 +76,7 @@ $help = array(
),
array(
0 => 'Creating an Ordered list',
- 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: arabic-numbers"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
+ 1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
),
array(
0 => '--',
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index f75837e96f..b3acb7f290 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -141,7 +141,7 @@ $lang = array_merge($lang, array(
'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.',
'PHP_SIZE_NA' => 'The attachment’s file size is too large.<br />Could not determine the maximum size defined by PHP in php.ini.',
- 'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %d MB.<br />Please note this is set in php.ini and cannot be overridden.',
+ 'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
'PLACE_INLINE' => 'Place inline',
'POLL_DELETE' => 'Delete poll',
'POLL_FOR' => 'Run poll for',
diff --git a/phpBB/language/en/search.php b/phpBB/language/en/search.php
index 8e376b2602..4618a585b3 100644
--- a/phpBB/language/en/search.php
+++ b/phpBB/language/en/search.php
@@ -54,6 +54,8 @@ $lang = array_merge($lang, array(
'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.',
+ 'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
+
'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.',
'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.',
'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 0c26e612e3..ccb6fbdbb4 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -122,8 +122,8 @@ $lang = array_merge($lang, array(
'CONFIRM_EMAIL' => 'Confirm e-mail address',
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.',
'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
- 'VC_REFRESH' => 'New Image',
- 'VC_REFRESH_EXPLAIN' => 'If you cannot read the code, then you can request a new one by clicking the button.',
+ 'VC_REFRESH' => 'Refresh confirmation code',
+ 'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.',
'CONFIRM_PASSWORD' => 'Confirm password',
'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above.',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index ba0e47c6c2..df1bf291de 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -169,6 +169,13 @@ if ($quickmod)
break;
case 'topic_logs':
+ // Reset start parameter if we jumped from the quickmod dropdown
+ if (request_var('start', 0))
+ {
+ phpbb_request::overwrite('start', 0, phpbb_request::GET);
+ phpbb_request::overwrite('start', 0, phpbb_request::REQUEST);
+ }
+
$module->set_active('logs', 'topic_logs');
break;
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index a8f359ba1b..1ba62f7f8f 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -890,6 +890,8 @@ switch ($mode)
phpbb::$template->assign_vars(array(
'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'SUBJECT' => $subject,
+ 'MESSAGE' => $message,
));
break;
diff --git a/phpBB/modules/acp/acp_database.php b/phpBB/modules/acp/acp_database.php
index 86f050e1df..1490882d01 100644
--- a/phpBB/modules/acp/acp_database.php
+++ b/phpBB/modules/acp/acp_database.php
@@ -78,7 +78,7 @@ class acp_database
$schema_data = true;
}
- @set_time_limit(1200);
+ @set_time_limit(0);
$time = time();
@@ -420,27 +420,37 @@ class acp_database
$dir = PHPBB_ROOT_PATH . 'store/';
$dh = @opendir($dir);
+ $backup_files = array();
+
if ($dh)
{
while (($file = readdir($dh)) !== false)
{
if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
{
- $supported = in_array($matches[2], $methods);
-
- if ($supported == 'true')
+ if (in_array($matches[2], $methods))
{
- phpbb::$template->assign_block_vars('files', array(
- 'FILE' => $file,
- 'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
- 'SUPPORTED' => $supported,
- ));
+ $backup_files[gmdate("d-m-Y H:i:s", $matches[1])] = $file;
}
}
}
closedir($dh);
}
+ if (!empty($backup_files))
+ {
+ krsort($backup_files);
+
+ foreach ($backup_files as $name => $file)
+ {
+ phpbb::$template->assign_block_vars('files', array(
+ 'FILE' => $file,
+ 'NAME' => $name,
+ 'SUPPORTED' => true,
+ ));
+ }
+ }
+
phpbb::$template->assign_vars(array(
'U_ACTION' => $this->u_action . '&amp;action=submit',
));
@@ -540,6 +550,7 @@ class base_extractor
function write_end()
{
static $close;
+
if ($this->store)
{
if ($close === null)
diff --git a/phpBB/modules/acp/acp_permissions.php b/phpBB/modules/acp/acp_permissions.php
index 85b2cda164..074a468fef 100644
--- a/phpBB/modules/acp/acp_permissions.php
+++ b/phpBB/modules/acp/acp_permissions.php
@@ -743,7 +743,7 @@ class acp_permissions
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
- trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
+ trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&amp;forum_id[]=' . implode('&amp;forum_id[]=', $forum_ids)));
}
/**
@@ -806,7 +806,7 @@ class acp_permissions
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
- trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
+ trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&amp;forum_id[]=' . implode('&amp;forum_id[]=', $forum_id)));
}
/**
diff --git a/phpBB/modules/acp/acp_search.php b/phpBB/modules/acp/acp_search.php
index 43bb667770..fd2133f0a4 100644
--- a/phpBB/modules/acp/acp_search.php
+++ b/phpBB/modules/acp/acp_search.php
@@ -58,6 +58,7 @@ class acp_search
'load_search' => 'bool',
'limit_search_load' => 'float',
'min_search_author_chars' => 'integer',
+ 'max_num_search_keywords' => 'integer',
'search_store_results' => 'integer',
);
@@ -211,6 +212,7 @@ class acp_search
'SEARCH_INTERVAL' => (float) phpbb::$config['search_interval'],
'SEARCH_GUEST_INTERVAL' => (float) phpbb::$config['search_anonymous_interval'],
'SEARCH_STORE_RESULTS' => (int) phpbb::$config['search_store_results'],
+ 'MAX_NUM_SEARCH_KEYWORDS' => (int) phpbb::$config['max_num_search_keywords'],
'S_SEARCH_TYPES' => $search_options,
'S_YES_SEARCH' => (bool) phpbb::$config['load_search'],
diff --git a/phpBB/modules/acp/acp_styles.php b/phpBB/modules/acp/acp_styles.php
index a087348b36..db2a777900 100644
--- a/phpBB/modules/acp/acp_styles.php
+++ b/phpBB/modules/acp/acp_styles.php
@@ -34,7 +34,10 @@ class acp_styles
// Hardcoded template bitfield to add for new templates
$bitfield = new bitfield();
$bitfield->set(0);
+ $bitfield->set(1);
+ $bitfield->set(2);
$bitfield->set(3);
+ $bitfield->set(4);
$bitfield->set(8);
$bitfield->set(9);
$bitfield->set(11);
diff --git a/phpBB/modules/acp/acp_users.php b/phpBB/modules/acp/acp_users.php
index 54296c386c..bf83e6b842 100644
--- a/phpBB/modules/acp/acp_users.php
+++ b/phpBB/modules/acp/acp_users.php
@@ -1843,6 +1843,16 @@ class acp_users
}
$error = array();
+
+ // The delete action was successful - therefore update the user row...
+ $sql = 'SELECT u.*, s.*
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = u.user_id)
+ WHERE u.user_id = ' . $user_id . '
+ ORDER BY s.session_time DESC';
+ $result = $db->sql_query($sql);
+ $user_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
}
else
{
diff --git a/phpBB/modules/ucp/ucp_main.php b/phpBB/modules/ucp/ucp_main.php
index 8bd03baf49..1206d51681 100644
--- a/phpBB/modules/ucp/ucp_main.php
+++ b/phpBB/modules/ucp/ucp_main.php
@@ -775,7 +775,8 @@ class ucp_main
$folder_img = $folder_alt = $topic_type = '';
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
- $view_topic_url = append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id");
+ $view_topic_url_params = "f=$forum_id&amp;t=$topic_id";
+ $view_topic_url = append_sid('viewtopic', $view_topic_url_params);
// Send vars to template
phpbb::$template->assign_block_vars('topicrow', array(
@@ -818,8 +819,8 @@ class ucp_main
'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
'S_UNREAD_TOPIC' => $unread_topic,
- 'U_NEWEST_POST' => append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id&amp;view=unread") . '#unread',
- 'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
+ 'U_NEWEST_POST' => append_sid('viewtopic', $view_topic_url_params . '&amp;view=unread') . '#unread',
+ 'U_LAST_POST' => append_sid('viewtopic', $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $forum_id),
));
diff --git a/phpBB/modules/ucp/ucp_pm_compose.php b/phpBB/modules/ucp/ucp_pm_compose.php
index 122e08bc41..d316c0a775 100644
--- a/phpBB/modules/ucp/ucp_pm_compose.php
+++ b/phpBB/modules/ucp/ucp_pm_compose.php
@@ -839,10 +839,10 @@ function compose_pm($id, $mode, $action)
$forward_text = array();
$forward_text[] = phpbb::$user->lang['FWD_ORIGINAL_MESSAGE'];
- $forward_text[] = sprintf(phpbb::$user->lang['FWD_SUBJECT'], censor_text($message_subject));
- $forward_text[] = sprintf(phpbb::$user->lang['FWD_DATE'], phpbb::$user->format_date($message_time));
- $forward_text[] = sprintf(phpbb::$user->lang['FWD_FROM'], $quote_username_text);
- $forward_text[] = sprintf(phpbb::$user->lang['FWD_TO'], implode(', ', $fwd_to_field['to']));
+ $forward_text[] = phpbb::$user->lang('FWD_SUBJECT', censor_text($message_subject));
+ $forward_text[] = phpbb::$user->lang('FWD_DATE', phpbb::$user->format_date($message_time, false, true));
+ $forward_text[] = phpbb::$user->lang('FWD_FROM', $quote_username_text);
+ $forward_text[] = phpbb::$user->lang('FWD_TO', implode(', ', $fwd_to_field['to']));
$message_parser->message = implode("\n", $forward_text) . "\n\n[quote=&quot;{$quote_username}&quot;]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]";
$message_subject = ((!preg_match('/^Fwd:/', $message_subject)) ? 'Fwd: ' : '') . censor_text($message_subject);
diff --git a/phpBB/modules/ucp/ucp_pm_viewfolder.php b/phpBB/modules/ucp/ucp_pm_viewfolder.php
index 3d4c9d2f0b..5b252f7410 100644
--- a/phpBB/modules/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/modules/ucp/ucp_pm_viewfolder.php
@@ -325,7 +325,7 @@ function view_folder($id, $mode, $folder_id, $folder)
$data[] = array(
'subject' => censor_text($row['message_subject']),
'sender' => $row['username'],
- 'date' => phpbb::$user->format_date($row['message_time']),
+ 'date' => phpbb::$user->format_date($row['message_time'], 'c', true), // ISO 8601 date.
'to' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? $address[$message_id] : '',
'message' => $message_row['message_text']
);
@@ -497,7 +497,7 @@ function get_pm_from($folder_id, $folder, $user_id)
'PAGE_NUMBER' => on_page($pm_count, phpbb::$config['topics_per_page'], $start),
'TOTAL_MESSAGES' => (($pm_count == 1) ? phpbb::$user->lang['VIEW_PM_MESSAGE'] : sprintf(phpbb::$user->lang['VIEW_PM_MESSAGES'], $pm_count)),
- 'POST_IMG' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->img('button_topic_locked', 'PM_LOCKED') : phpbb::$user->img('button_pm_new', 'POST_PM'),
+ 'POST_IMG' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->img('button_topic_locked', 'POST_PM_LOCKED') : phpbb::$user->img('button_pm_new', 'POST_NEW_PM'),
'L_NO_MESSAGES' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->lang['POST_PM_LOCKED'] : phpbb::$user->lang['NO_MESSAGES'],
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f5ad0961fd..4c0dcc2481 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -55,7 +55,8 @@ if (phpbb::$config['enable_post_confirm'] && !phpbb::$user->is_registered)
// Was cancel pressed? If so then redirect to the appropriate page
if ($cancel || ($current_time - $lastclick < 2 && $submit))
{
- $redirect = ($post_id) ? append_sid('viewtopic', 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid('viewtopic', 't=' . $topic_id) : (($forum_id) ? append_sid('viewforum', 'f=' . $forum_id) : append_sid('index')));
+ $f = ($forum_id) ? 'f=' . $forum_id . '&amp;' : '';
+ $redirect = ($post_id) ? append_sid('viewtopic', $f . 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid('viewtopic', $f . 't=' . $topic_id) : (($forum_id) ? append_sid('viewforum', 'f=' . $forum_id) : append_sid('index')));
redirect($redirect);
}
diff --git a/phpBB/search.php b/phpBB/search.php
index 835ec11b94..1acdf2fd9c 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -767,7 +767,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$u_forum_id = $forum_id;
}
- $view_topic_url = append_sid('viewtopic', "f=$u_forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : ''));
+ $view_topic_url_params = "f=$u_forum_id&amp;t=$result_topic_id" . (($u_hilit) ? "&amp;hilit=$u_hilit" : '');
+ $view_topic_url = append_sid('viewtopic', $view_topic_url_params);
$replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
@@ -825,10 +826,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
'S_POSTS_UNAPPROVED' => $posts_unapproved,
- 'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
+ 'U_LAST_POST' => append_sid('viewtopic', $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
- 'U_NEWEST_POST' => $view_topic_url . '&amp;view=unread#unread',
+ 'U_NEWEST_POST' => append_sid('viewtopic', $view_topic_url_params . '&amp;view=unread') . '#unread',
'U_MCP_REPORT' => append_sid('mcp', 'i=reports&amp;mode=reports&amp;t=' . $result_topic_id, true, phpbb::$user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
);
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
index 5631ab67d1..9610cf91d1 100644
--- a/phpBB/styles/prosilver/template/editor.js
+++ b/phpBB/styles/prosilver/template/editor.js
@@ -16,7 +16,6 @@ var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -
var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
var baseHeight;
-onload_functions.push('initInsertions()');
/**
* Shows the help messages in the helpline window
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 6694dfb61b..06c4d1e785 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -23,9 +23,16 @@ function jumpto()
{
var page = prompt(jump_page, on_page);
- if (page !== null && !isNaN(page) && page > 0)
+ if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
{
- document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ if (base_url.indexOf('?') == -1)
+ {
+ document.location.href = base_url + '?start=' + ((page - 1) * per_page);
+ }
+ else
+ {
+ document.location.href = base_url.replace(/&amp;/g, '&') + '&start=' + ((page - 1) * per_page);
+ }
}
}
diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html
index a6d779e98a..f9a26ad310 100644
--- a/phpBB/styles/prosilver/template/posting_editor.html
+++ b/phpBB/styles/prosilver/template/posting_editor.html
@@ -135,7 +135,7 @@
</div>
<div id="message-box">
- <textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
+ <textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
</div>
</fieldset>
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index 535641f33b..d7f0608c8c 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -70,12 +70,12 @@
<!-- IF AUTHOR_POSTS --><dd><strong>{L_POSTS}:</strong> {AUTHOR_POSTS}</dd><!-- ENDIF -->
<!-- IF AUTHOR_JOINED --><dd><strong>{L_JOINED}:</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
<!-- IF AUTHOR_FROM --><dd><strong>{L_LOCATION}:</strong> {AUTHOR_FROM}</dd><!-- ENDIF -->
-
+
<!-- IF U_PM or U_EMAIL or U_WWW or U_MSN or U_ICQ or U_YIM or U_AIM or U_JABBER -->
<dd>
<ul class="profile-icons">
<!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
- <!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_EMAIL}"><span>{L_EMAIL}</span></a></li><!-- ENDIF -->
+ <!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF -->
<!-- IF U_WWW --><li class="web-icon"><a href="{U_WWW}" title="{L_VISIT_WEBSITE}: {U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
<!-- IF U_MSN --><li class="msnm-icon"><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
<!-- IF U_ICQ --><li class="icq-icon"><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index b21b8ae1f2..1bee179715 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -75,7 +75,7 @@
<span class="corners-bottom"><span></span></span></div>
</div>
- <!-- IF not S_USER_LOGGED_IN -->
+ <!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
<form action="{S_LOGIN_ACTION}" method="post">
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index a32c4004ca..ecd9d5295a 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -200,7 +200,7 @@
<dd>
<ul class="profile-icons">
<!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
- <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_EMAIL}"><span>{L_EMAIL}</span></a></li><!-- ENDIF -->
+ <!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
<!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index a5327bd0d1..561bba0717 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -719,4 +719,7 @@
* tweaks.css
*/
-
+/** Reference: Bug #27155 */
+.rtl #wrap, .rtl .headerbar, .rtl #site-description, .rtl .navbar {
+ position: relative;
+}
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 06a05b5616..815ccb9f13 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -882,7 +882,7 @@ dl.mini dt {
border-color: #5D8FBD;
}
-pmlist li.pm_foe_colour, .pm_foe_colour {
+.pmlist li.pm_foe_colour, .pm_foe_colour {
border-color: #000000;
}
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 3a26ceac06..7178fa6e42 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -599,7 +599,7 @@ div.rules {
font-size: 1.1em;
}
-div.rules ul {
+div.rules ul, div.rules ol {
margin-left: 20px;
}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index c32ec18a6b..bb337e95ba 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -612,7 +612,8 @@ if (sizeof($topic_list))
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
// Generate all the URIs ...
- $view_topic_url = append_sid('viewtopic', 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&amp;t=' . $topic_id);
+ $view_topic_url_params = 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&amp;t=' . $topic_id;
+ $view_topic_url = append_sid('viewtopic', $view_topic_url_params);
$topic_unapproved = (!$row['topic_approved'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
@@ -664,8 +665,8 @@ if (sizeof($topic_list))
'S_TOPIC_LOCKED' => ($row['topic_status'] == ITEM_LOCKED) ? true : false,
'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,
- 'U_NEWEST_POST' => $view_topic_url . '&amp;view=unread#unread',
- 'U_LAST_POST' => $view_topic_url . '&amp;p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
+ 'U_NEWEST_POST' => append_sid('viewtopic', $view_topic_url_params . '&amp;view=unread') . '#unread',
+ 'U_LAST_POST' => append_sid('viewtopic', $view_topic_url_params . '&amp;p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
'U_VIEW_TOPIC' => $view_topic_url,
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index d252716d56..5d0192dd13 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -186,7 +186,7 @@ while ($row = phpbb::$db->sql_fetchrow($result))
continue;
}
- preg_match('#^([a-z/]+)#i', $row['session_page'], $on_page);
+ preg_match('#^([a-z/_]+)#i', $row['session_page'], $on_page);
if (!sizeof($on_page))
{
$on_page[1] = '';
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 7f20a7f4b3..e66e1a7021 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -262,9 +262,9 @@ phpbb::$db->sql_freeresult($result);
if (!$topic_data)
{
// If post_id was submitted, we try at least to display the topic as a last resort...
- if ($post_id && $forum_id && $topic_id)
+ if ($post_id && $topic_id)
{
- redirect(append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id"));
+ redirect(append_sid('viewtopic', "t=$topic_id" . (($forum_id) ? "&amp;f=$forum_id" : '')));
}
trigger_error('NO_TOPIC');
@@ -605,7 +605,7 @@ phpbb::$template->assign_vars(array(
'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
'S_TOPIC_ACTION' => append_sid('viewtopic', "f=$forum_id&amp;t=$topic_id&amp;start=$start"),
'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action" id="quick-mod-select">' . $topic_mod . '</select>' : '',
- 'S_MOD_ACTION' => append_sid('mcp', "f=$forum_id&amp;t=$topic_id&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, phpbb::$user->session_id),
+ 'S_MOD_ACTION' => append_sid('mcp', "f=$forum_id&amp;t=$topic_id&amp;start=$start&amp;quickmod=1&amp;redirect=" . urlencode(str_replace('&amp;', '&', $viewtopic_url)), true, $user->session_id),
'S_VIEWTOPIC' => true,
'S_DISPLAY_SEARCHBOX' => (phpbb::$acl->acl_get('u_search') && phpbb::$acl->acl_get('f_search', $forum_id) && phpbb::$config['load_search']) ? true : false,
@@ -1144,7 +1144,10 @@ phpbb::$db->sql_freeresult($result);
// Load custom profile fields
if (phpbb::$config['load_cpf_viewtopic'])
{
- include(PHPBB_ROOT_PATH . 'includes/functions_profile_fields.' . PHP_EXT);
+ if (!class_exists('custom_profile'))
+ {
+ include(PHPBB_ROOT_PATH . 'includes/functions_profile_fields.' . PHP_EXT);
+ }
$cp = new custom_profile();
// Grab all profile fields from users in id cache for later use - similar to the poster cache
@@ -1422,7 +1425,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'POSTER_WARNINGS' => $user_cache[$poster_id]['warnings'],
'POSTER_AGE' => $user_cache[$poster_id]['age'],
- 'POST_DATE' => phpbb::$user->format_date($row['post_time']),
+ 'POST_DATE' => phpbb::$user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
'POST_SUBJECT' => $row['post_subject'],
'MESSAGE' => $message,
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
@@ -1515,7 +1518,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
unset($rowset, $user_cache);
// Update topic view and if necessary attachment view counters ... but only for humans and if this is the first 'page view'
-if (isset(phpbb::$user->data['session_page']) && !phpbb::$user->is_bot && strpos(phpbb::$user->data['session_page'], '&t=' . $topic_id) === false)
+if (isset(phpbb::$user->data['session_page']) && !phpbb::$user->is_bot && (strpos(phpbb::$user->data['session_page'], '&t=' . $topic_id) === false || isset(phpbb::$user->data['session_created'])))
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "