aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/adm/style/acp_ban.html6
-rw-r--r--phpBB/adm/style/editor.js15
-rwxr-xr-xphpBB/develop/set_permissions.sh9
-rw-r--r--phpBB/docs/coding-guidelines.html2
-rw-r--r--phpBB/docs/nginx.conf.sample70
-rw-r--r--phpBB/download/file.php10
-rw-r--r--phpBB/feed.php4
-rw-r--r--phpBB/includes/acp/acp_ban.php4
-rw-r--r--phpBB/includes/acp/acp_board.php2
-rw-r--r--phpBB/includes/acp/acp_captcha.php4
-rw-r--r--phpBB/includes/acp/acp_forums.php8
-rw-r--r--phpBB/includes/acp/acp_php_info.php4
-rw-r--r--phpBB/includes/acp/acp_prune.php8
-rw-r--r--phpBB/includes/acp/acp_users.php7
-rw-r--r--phpBB/includes/acp/info/acp_board.php2
-rw-r--r--phpBB/includes/auth/auth_ldap.php2
-rw-r--r--phpBB/includes/cache.php9
-rw-r--r--phpBB/includes/constants.php1
-rw-r--r--phpBB/includes/db/firebird.php11
-rw-r--r--phpBB/includes/db/mssql.php7
-rw-r--r--phpBB/includes/db/mssql_odbc.php7
-rwxr-xr-x[-rw-r--r--]phpBB/includes/db/mssqlnative.php15
-rw-r--r--phpBB/includes/db/mysql.php7
-rw-r--r--phpBB/includes/db/mysqli.php8
-rw-r--r--phpBB/includes/db/oracle.php15
-rw-r--r--phpBB/includes/db/postgres.php12
-rw-r--r--phpBB/includes/db/sqlite.php11
-rw-r--r--phpBB/includes/functions.php63
-rw-r--r--phpBB/includes/functions_admin.php8
-rw-r--r--phpBB/includes/functions_convert.php3
-rw-r--r--phpBB/includes/functions_display.php13
-rw-r--r--phpBB/includes/functions_messenger.php7
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/includes/functions_privmsgs.php4
-rw-r--r--phpBB/includes/functions_user.php19
-rw-r--r--phpBB/includes/mcp/mcp_post.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php21
-rw-r--r--phpBB/includes/mcp/mcp_reports.php2
-rw-r--r--phpBB/includes/mcp/mcp_topic.php2
-rw-r--r--phpBB/includes/search/fulltext_mysql.php2
-rw-r--r--phpBB/includes/search/fulltext_native.php13
-rw-r--r--phpBB/includes/session.php4
-rw-r--r--phpBB/includes/ucp/ucp_main.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_viewfolder.php26
-rw-r--r--phpBB/includes/ucp/ucp_profile.php2
-rw-r--r--phpBB/index.php8
-rw-r--r--phpBB/install/database_update.php66
-rw-r--r--phpBB/install/install_convert.php2
-rw-r--r--phpBB/install/install_install.php1
-rw-r--r--phpBB/install/install_update.php11
-rw-r--r--phpBB/language/en/acp/board.php15
-rw-r--r--phpBB/language/en/acp/styles.php44
-rw-r--r--phpBB/language/en/acp/users.php1
-rw-r--r--phpBB/language/en/common.php11
-rw-r--r--phpBB/language/en/help_faq.php2
-rw-r--r--phpBB/language/en/viewforum.php13
-rw-r--r--phpBB/search.php19
-rw-r--r--phpBB/style.php21
-rw-r--r--phpBB/styles/prosilver/template/editor.js6
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js13
-rw-r--r--phpBB/styles/prosilver/template/posting_topic_review.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_history.html4
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewfolder.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_signature.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html8
-rw-r--r--phpBB/styles/prosilver/theme/bidi.css1
-rw-r--r--phpBB/styles/prosilver/theme/forms.css5
-rw-r--r--phpBB/styles/subsilver2/template/attachment.html4
-rw-r--r--phpBB/styles/subsilver2/template/editor.js11
-rw-r--r--phpBB/styles/subsilver2/template/index_body.html6
-rw-r--r--phpBB/styles/subsilver2/template/posting_buttons.html1
-rw-r--r--phpBB/styles/subsilver2/template/posting_topic_review.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_history.html4
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_message_footer.html1
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html3
-rw-r--r--phpBB/styles/subsilver2/template/ucp_profile_signature.html2
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html18
-rw-r--r--phpBB/styles/subsilver2/template/viewtopic_body.html2
-rw-r--r--phpBB/viewforum.php17
-rw-r--r--phpBB/viewtopic.php2
80 files changed, 573 insertions, 214 deletions
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html
index 539e8032dd..cf44f4aaa7 100644
--- a/phpBB/adm/style/acp_ban.html
+++ b/phpBB/adm/style/acp_ban.html
@@ -31,9 +31,9 @@
function display_details(option)
{
- document.getElementById('acp_unban').unbangivereason.value = ban_give_reason[option];
- document.getElementById('acp_unban').unbanreason.value = ban_reason[option];
- document.getElementById('acp_unban').unbanlength.value = ban_length[option];
+ document.getElementById('acp_unban').unbangivereason.innerHTML = ban_give_reason[option];
+ document.getElementById('acp_unban').unbanreason.innerHTML = ban_reason[option];
+ document.getElementById('acp_unban').unbanlength.innerHTML = ban_length[option];
}
// ]]>
diff --git a/phpBB/adm/style/editor.js b/phpBB/adm/style/editor.js
index 7e3ce1c708..217aa699e2 100644
--- a/phpBB/adm/style/editor.js
+++ b/phpBB/adm/style/editor.js
@@ -46,7 +46,11 @@ function initInsertions()
{
textarea.focus();
baseHeight = doc.selection.createRange().duplicate().boundingHeight;
- // document.body.focus();
+
+ if (!document.forms[form_name])
+ {
+ document.body.focus();
+ }
}
}
@@ -230,6 +234,7 @@ function addquote(post_id, username)
theSelection = theSelection.replace(/&lt\;/ig, '<');
theSelection = theSelection.replace(/&gt\;/ig, '>');
theSelection = theSelection.replace(/&amp\;/ig, '&');
+ theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
}
else if (document.all)
{
@@ -273,8 +278,8 @@ function mozWrap(txtarea, open, close)
var s3 = (txtarea.value).substring(selEnd, selLength);
txtarea.value = s1 + open + s2 + close + s3;
- txtarea.selectionStart = selEnd + open.length + close.length;
- txtarea.selectionEnd = txtarea.selectionStart;
+ txtarea.selectionStart = selStart + open.length;
+ txtarea.selectionEnd = selEnd + open.length;
txtarea.focus();
txtarea.scrollTop = scrollTop;
@@ -327,8 +332,8 @@ function colorPalette(dir, width, height)
for (b = 0; b < 5; b++)
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td bgcolor="#' + color + '">');
- document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}
diff --git a/phpBB/develop/set_permissions.sh b/phpBB/develop/set_permissions.sh
new file mode 100755
index 0000000000..879b94e518
--- /dev/null
+++ b/phpBB/develop/set_permissions.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+# set permissions required for installation
+
+dir=$(dirname $0)
+
+for file in cache files store config.php images/avatars/upload
+do
+ chmod a+w $dir/../$file
+done
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 7f747e09e2..1978a0a307 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -288,7 +288,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
<div class="content">
- <p>Please note that these Guidelines applies to all php, html, javascript and css files.</p>
+ <p>Please note that these guidelines apply to all php, html, javascript and css files.</p>
<a name="namingvars"></a><h3>2.i. Variable/Function Naming</h3>
diff --git a/phpBB/docs/nginx.conf.sample b/phpBB/docs/nginx.conf.sample
new file mode 100644
index 0000000000..a22a126ff4
--- /dev/null
+++ b/phpBB/docs/nginx.conf.sample
@@ -0,0 +1,70 @@
+# Sample nginx configuration file for phpBB.
+# Global settings have been removed, copy them
+# from your system's nginx.conf.
+# Tested with nginx 0.8.35.
+
+http {
+ # Compression - requires gzip and gzip static modules.
+ gzip on;
+ gzip_static on;
+ gzip_vary on;
+ gzip_http_version 1.1;
+ gzip_min_length 700;
+ gzip_comp_level 6;
+ gzip_disable "MSIE [1-6]\.";
+
+ # Catch-all server for requests to invalid hosts.
+ # Also catches vulnerability scanners probing IP addresses.
+ # Should be first.
+ server {
+ listen 80;
+ server_name bogus;
+ return 444;
+ root /var/empty;
+ }
+
+ # If you have domains with and without www prefix,
+ # redirect one to the other.
+ server {
+ listen 80;
+ server_name myforums.com;
+ rewrite ^(.*)$ http://www.myforums.com$1 permanent;
+ }
+
+ # The actual board domain.
+ server {
+ listen 80;
+ server_name www.myforums.com;
+
+ root /path/to/phpbb;
+
+ location / {
+ # phpbb uses index.htm
+ index index.php index.html index.htm;
+ }
+
+ # Deny access to internal phpbb files.
+ location ~ /(config\.php|common\.php|includes|cache|files|store|images/avatars/upload) {
+ deny all;
+ }
+
+ # Pass the php scripts to fastcgi server specified in upstream declaration.
+ location ~ \.php$ {
+ fastcgi_pass php;
+ # Necessary for php.
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ # Unmodified fastcgi_params from nginx distribution.
+ include fastcgi_params;
+ }
+
+ # Deny access to version control system directories.
+ location ~ /\.svn|/\.git {
+ deny all;
+ }
+ }
+
+ # If running php as fastcgi, specify php upstream.
+ upstream php {
+ server unix:/tmp/php.sock;
+ }
+}
diff --git a/phpBB/download/file.php b/phpBB/download/file.php
index 00b8e2e656..2154847865 100644
--- a/phpBB/download/file.php
+++ b/phpBB/download/file.php
@@ -670,15 +670,7 @@ function set_modified_headers($stamp, $browser)
{
if ($last_load !== false && $last_load >= $stamp)
{
- 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
- {
- header('HTTP/1.0 304 Not Modified', true, 304);
- }
+ send_status_line(304, 'Not Modified');
// seems that we need those too ... browsers
header('Pragma: public');
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 31536000));
diff --git a/phpBB/feed.php b/phpBB/feed.php
index 88c30c5d4f..c4b71f3a26 100644
--- a/phpBB/feed.php
+++ b/phpBB/feed.php
@@ -276,8 +276,8 @@ function feed_generate_content($content, $uid, $bitfield, $options)
// Add newlines
$content = str_replace('<br />', '<br />' . "\n", $content);
- // Relative Path to Absolute path, Windows style
- $content = str_replace('./', $board_url . '/', $content);
+ // Convert smiley Relative paths to Absolute path, Windows style
+ $content = str_replace($phpbb_root_path . $config['smilies_path'], $board_url . '/' . $config['smilies_path'], $content);
// Remove "Select all" link and mouse events
$content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $user->lang['SELECT_ALL_CODE'] . '</a>', '', $content);
diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php
index 3198376584..a7ea57b753 100644
--- a/phpBB/includes/acp/acp_ban.php
+++ b/phpBB/includes/acp/acp_ban.php
@@ -224,7 +224,7 @@ class acp_ban
$template->assign_block_vars('ban_reason', array(
'BAN_ID' => $ban_id,
'REASON' => $reason,
- 'A_REASON' => addslashes(htmlspecialchars_decode($reason)),
+ 'A_REASON' => addslashes($reason),
));
}
}
@@ -236,7 +236,7 @@ class acp_ban
$template->assign_block_vars('ban_give_reason', array(
'BAN_ID' => $ban_id,
'REASON' => $reason,
- 'A_REASON' => addslashes(htmlspecialchars_decode($reason)),
+ 'A_REASON' => addslashes($reason),
));
}
}
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 7680d8996c..927e72010e 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -58,7 +58,7 @@ class acp_board
'board_disable_msg' => false,
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
- 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => false),
+ 'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'string', 'type' => 'select', 'function' => 'tz_select', 'params' => array('{CONFIG_VALUE}', 1), 'explain' => true),
'board_dst' => array('lang' => 'SYSTEM_DST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php
index 56a57e319c..1893eed14f 100644
--- a/phpBB/includes/acp/acp_captcha.php
+++ b/phpBB/includes/acp/acp_captcha.php
@@ -89,14 +89,14 @@ class acp_captcha
}
else
{
- trigger_error($user->lang['CAPTCHA_UNAVAILABLE'] . adm_back_link($this->u_action));
+ trigger_error($user->lang['CAPTCHA_UNAVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
}
}
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
}
else if ($submit)
{
- trigger_error($user->lang['FORM_INVALID'] . adm_back_link());
+ trigger_error($user->lang['FORM_INVALID'] . adm_back_link(), E_USER_WARNING);
}
else
{
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index 541a514bef..f2f1bd80e2 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -190,12 +190,14 @@ class acp_forums
$forum_perm_from = request_var('forum_perm_from', 0);
$cache->destroy('sql', FORUMS_TABLE);
+ $copied_permissions = false;
// Copy permissions?
if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] &&
($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
{
copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
cache_moderators();
+ $copied_permissions = true;
}
/* Commented out because of questionable UI workflow - re-visit for 3.0.7
else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))
@@ -211,13 +213,13 @@ class acp_forums
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
// Redirect to permissions
- if ($auth->acl_get('a_fauth'))
+ if ($auth->acl_get('a_fauth') && !$copied_permissions)
{
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
}
// redirect directly to permission settings screen if authed
- if ($action == 'add' && !$forum_perm_from && $auth->acl_get('a_fauth'))
+ if ($action == 'add' && !$copied_permissions && $auth->acl_get('a_fauth'))
{
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
}
@@ -981,7 +983,7 @@ class acp_forums
if (!$row)
{
- trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;' . $this->parent_id), E_USER_WARNING);
+ trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
if ($row['forum_type'] == FORUM_LINK)
diff --git a/phpBB/includes/acp/acp_php_info.php b/phpBB/includes/acp/acp_php_info.php
index 9935c0466e..0499095004 100644
--- a/phpBB/includes/acp/acp_php_info.php
+++ b/phpBB/includes/acp/acp_php_info.php
@@ -35,9 +35,9 @@ class acp_php_info
$this->tpl_name = 'acp_php_info';
$this->page_title = 'ACP_PHP_INFO';
-
+
ob_start();
- @phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
+ phpinfo(INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES | INFO_VARIABLES);
$phpinfo = ob_get_clean();
$phpinfo = trim($phpinfo);
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index 7eeb37133f..ffe20f86f5 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -315,8 +315,8 @@ class acp_prune
'mode' => $mode,
'prune' => 1,
- 'users' => request_var('users', '', true),
- 'username' => request_var('username', '', true),
+ 'users' => utf8_normalize_nfc(request_var('users', '', true)),
+ 'username' => utf8_normalize_nfc(request_var('username', '', true)),
'email' => request_var('email', ''),
'joined_select' => request_var('joined_select', ''),
'joined' => request_var('joined', ''),
@@ -369,7 +369,7 @@ class acp_prune
{
global $user, $db;
- $users = request_var('users', '', true);
+ $users = utf8_normalize_nfc(request_var('users', '', true));
if ($users)
{
@@ -378,7 +378,7 @@ class acp_prune
}
else
{
- $username = request_var('username', '', true);
+ $username = utf8_normalize_nfc(request_var('username', '', true));
$email = request_var('email', '');
$joined_select = request_var('joined_select', 'lt');
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index cc0f3d4cde..9e8a4c80b9 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -231,6 +231,11 @@ class acp_users
trigger_error($user->lang['CANNOT_BAN_YOURSELF'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
+ if ($user_id == ANONYMOUS)
+ {
+ trigger_error($user->lang['CANNOT_BAN_ANONYMOUS'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
+ }
+
if ($user_row['user_type'] == USER_FOUNDER)
{
trigger_error($user->lang['CANNOT_BAN_FOUNDER'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
@@ -1703,7 +1708,7 @@ class acp_users
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
- if (avatar_process_user($error, $user_row))
+ if (avatar_process_user($error, $user_row, $can_upload))
{
trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&amp;u=' . $user_row['user_id']));
}
diff --git a/phpBB/includes/acp/info/acp_board.php b/phpBB/includes/acp/info/acp_board.php
index 58b650650c..3e18f55940 100644
--- a/phpBB/includes/acp/info/acp_board.php
+++ b/phpBB/includes/acp/info/acp_board.php
@@ -24,7 +24,7 @@ class acp_board_info
'features' => array('title' => 'ACP_BOARD_FEATURES', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
'avatar' => array('title' => 'ACP_AVATAR_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
'message' => array('title' => 'ACP_MESSAGE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')),
- 'post' => array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
+ 'post' => array('title' => 'ACP_POST_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION', 'ACP_MESSAGES')),
'signature' => array('title' => 'ACP_SIGNATURE_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
'feed' => array('title' => 'ACP_FEED_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
'registration' => array('title' => 'ACP_REGISTER_SETTINGS', 'auth' => 'acl_a_board', 'cat' => array('ACP_BOARD_CONFIGURATION')),
diff --git a/phpBB/includes/auth/auth_ldap.php b/phpBB/includes/auth/auth_ldap.php
index a6092baba5..e8c957aaa3 100644
--- a/phpBB/includes/auth/auth_ldap.php
+++ b/phpBB/includes/auth/auth_ldap.php
@@ -74,7 +74,7 @@ function init_ldap()
if ($search === false)
{
- return $user->lang['LDAP_NO_SERVER_CONNECTION'];
+ return $user->lang['LDAP_SEARCH_FAILED'];
}
$result = @ldap_get_entries($ldap, $search);
diff --git a/phpBB/includes/cache.php b/phpBB/includes/cache.php
index 6b1e078ca4..b50fab4ca2 100644
--- a/phpBB/includes/cache.php
+++ b/phpBB/includes/cache.php
@@ -88,7 +88,14 @@ class cache extends acm
{
if ($unicode)
{
- $censors['match'][] = '#(?<![\p{Nd}\p{L}_])(' . str_replace('\*', '[\p{Nd}\p{L}_]*?', preg_quote($row['word'], '#')) . ')(?![\p{Nd}\p{L}_])#iu';
+ // Unescape the asterisk to simplify further conversions
+ $row['word'] = str_replace('\*', '*', preg_quote($row['word'], '#'));
+
+ // Replace the asterisk inside the pattern, at the start and at the end of it with regexes
+ $row['word'] = preg_replace(array('#(?<=[\p{Nd}\p{L}_])\*(?=[\p{Nd}\p{L}_])#iu', '#^\*#', '#\*$#'), array('([\x20]*?|[\p{Nd}\p{L}_-]*?)', '[\p{Nd}\p{L}_-]*?', '[\p{Nd}\p{L}_-]*?'), $row['word']);
+
+ // Generate the final substitution
+ $censors['match'][] = '#(?<![\p{Nd}\p{L}_-])(' . $row['word'] . ')(?![\p{Nd}\p{L}_-])#iu';
}
else
{
diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php
index a3da196cf8..ff572869e2 100644
--- a/phpBB/includes/constants.php
+++ b/phpBB/includes/constants.php
@@ -121,7 +121,6 @@ define('NOTIFY_BOTH', 2);
define('NOTIFY_YES', 0);
define('NOTIFY_NO', 1);
-
// Email Priority Settings
define('MAIL_LOW_PRIORITY', 4);
define('MAIL_NORMAL_PRIORITY', 3);
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index e554b0f2fb..6f60dd5dad 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -63,10 +63,19 @@ class dbal_firebird extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache forced to false for Interbase
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
+ /**
+ * force $use_cache false. I didn't research why the caching code there is no caching code
+ * but I assume its because the IB extension provides a direct method to access it
+ * without a query.
+ */
+
+ $use_cache = false;
+
if ($this->service_handle !== false && function_exists('ibase_server_info'))
{
return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION);
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index 7134574691..6899a73902 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -65,13 +65,14 @@ class dbal_mssql extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false)
{
$result_id = @mssql_query("SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')", $this->db_connect_id);
@@ -84,7 +85,7 @@ class dbal_mssql extends dbal
$this->sql_server_version = ($row) ? trim(implode(' ', $row)) : 0;
- if (!empty($cache))
+ if (!empty($cache) && $use_cache)
{
$cache->put('mssql_version', $this->sql_server_version);
}
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
index 14c4831010..75a080b1b7 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -76,13 +76,14 @@ class dbal_mssql_odbc extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('mssqlodbc_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mssqlodbc_version')) === false)
{
$result_id = @odbc_exec($this->db_connect_id, "SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')");
@@ -95,7 +96,7 @@ class dbal_mssql_odbc extends dbal
$this->sql_server_version = ($row) ? trim(implode(' ', $row)) : 0;
- if (!empty($cache))
+ if (!empty($cache) && $use_cache)
{
$cache->put('mssqlodbc_version', $this->sql_server_version);
}
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php
index 08ee70907c..44d5722e4f 100644..100755
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/mssqlnative.php
@@ -232,18 +232,19 @@ class dbal_mssqlnative extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false)
{
$arr_server_info = sqlsrv_server_info($this->db_connect_id);
$this->sql_server_version = $arr_server_info['SQLServerVersion'];
- if (!empty($cache))
+ if (!empty($cache) && $use_cache)
{
$cache->put('mssql_version', $this->sql_server_version);
}
@@ -502,6 +503,7 @@ class dbal_mssqlnative extends dbal
{
$errors = @sqlsrv_errors(SQLSRV_ERR_ERRORS);
$error_message = '';
+ $code = 0;
if ($errors != null)
{
@@ -509,6 +511,7 @@ class dbal_mssqlnative extends dbal
{
$error_message .= "SQLSTATE: ".$error[ 'SQLSTATE']."\n";
$error_message .= "code: ".$error[ 'code']."\n";
+ $code = $error['code'];
$error_message .= "message: ".$error[ 'message']."\n";
}
$this->last_error_result = $error_message;
@@ -518,7 +521,11 @@ class dbal_mssqlnative extends dbal
{
$error = (isset($this->last_error_result) && $this->last_error_result) ? $this->last_error_result : array();
}
- return $error;
+
+ return array(
+ 'message' => $error,
+ 'code' => $code,
+ );
}
/**
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 0487dfa6d2..1e24c79577 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -96,13 +96,14 @@ class dbal_mysql extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('mysql_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mysql_version')) === false)
{
$result = @mysql_query('SELECT VERSION() AS version', $this->db_connect_id);
$row = @mysql_fetch_assoc($result);
@@ -110,7 +111,7 @@ class dbal_mysql extends dbal
$this->sql_server_version = $row['version'];
- if (!empty($cache))
+ if (!empty($cache) && $use_cache)
{
$cache->put('mysql_version', $this->sql_server_version);
}
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index f0e58fd148..862d62f4ba 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -80,14 +80,14 @@ class dbal_mysqli extends dbal
/**
* Version information about used database
- * @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('mysqli_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mysqli_version')) === false)
{
$result = @mysqli_query($this->db_connect_id, 'SELECT VERSION() AS version');
$row = @mysqli_fetch_assoc($result);
@@ -95,7 +95,7 @@ class dbal_mysqli extends dbal
$this->sql_server_version = $row['version'];
- if (!empty($cache))
+ if (!empty($cache) && $use_cache)
{
$cache->put('mysqli_version', $this->sql_server_version);
}
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index 55b3599800..c8a9a5f604 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -56,10 +56,18 @@ class dbal_oracle extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache forced to false for Oracle
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
+ /**
+ * force $use_cache false. I didn't research why the caching code below is commented out
+ * but I assume its because the Oracle extension provides a direct method to access it
+ * without a query.
+ */
+
+ $use_cache = false;
/*
global $cache;
@@ -261,6 +269,10 @@ class dbal_oracle extends dbal
{
$cols = explode(', ', $regs[2]);
+/* The code inside this comment block breaks clob handling, but does allow the
+ database restore script to work. If you want to allow no posts longer than 4KB
+ and/or need the db restore script, uncomment this.
+
preg_match_all('/\'(?:[^\']++|\'\')*+\'|[\d-.]+/', $regs[3], $vals, PREG_PATTERN_ORDER);
if (sizeof($cols) !== sizeof($vals))
@@ -310,6 +322,7 @@ class dbal_oracle extends dbal
$vals = array(0 => $vals);
}
+*/
$inserts = $vals[0];
unset($vals);
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index b3139b3d79..4360c790a1 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -46,7 +46,10 @@ class dbal_postgres extends dbal
if ($sqlserver)
{
- if (strpos($sqlserver, ':') !== false)
+ // $sqlserver can carry a port separated by : for compatibility reasons
+ // If $sqlserver has more than one : it's probably an IPv6 address.
+ // In this case we only allow passing a port via the $port variable.
+ if (substr_count($sqlserver, ':') === 1)
{
list($sqlserver, $port) = explode(':', $sqlserver);
}
@@ -105,13 +108,14 @@ class dbal_postgres extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache If true, it is safe to retrieve the value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('pgsql_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('pgsql_version')) === false)
{
$query_id = @pg_query($this->db_connect_id, 'SELECT VERSION() AS version');
$row = @pg_fetch_assoc($query_id, null);
@@ -119,7 +123,7 @@ class dbal_postgres extends dbal
$this->sql_server_version = (!empty($row['version'])) ? trim(substr($row['version'], 10)) : 0;
- if (!empty($cache))
+ if (!empty($cache) && $use_cache)
{
$cache->put('pgsql_version', $this->sql_server_version);
}
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index 288f6e0992..8de72fd394 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -50,19 +50,24 @@ class dbal_sqlite extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
+ * @param bool $use_cache if true, it is safe to retrieve the stored value from the cache
* @return string sql server version
*/
- function sql_server_info($raw = false)
+ function sql_server_info($raw = false, $use_cache = true)
{
global $cache;
- if (empty($cache) || ($this->sql_server_version = $cache->get('sqlite_version')) === false)
+ if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('sqlite_version')) === false)
{
$result = @sqlite_query('SELECT sqlite_version() AS version', $this->db_connect_id);
$row = @sqlite_fetch_array($result, SQLITE_ASSOC);
$this->sql_server_version = (!empty($row['version'])) ? $row['version'] : 0;
- $cache->put('sqlite_version', $this->sql_server_version);
+
+ if (!empty($cache) && $use_cache)
+ {
+ $cache->put('sqlite_version', $this->sql_server_version);
+ }
}
return ($raw) ? $this->sql_server_version : 'SQLite ' . $this->sql_server_version;
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index cd8447a2a3..4c461b5ee8 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1660,10 +1660,11 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
* @param string $sql_extra Extra WHERE SQL statement
* @param string $sql_sort ORDER BY SQL sorting statement
* @param string $sql_limit Limits the size of unread topics list, 0 for unlimited query
+* @param string $sql_limit_offset Sets the offset of the first row to search, 0 to search from the start
*
* @return array[int][int] Topic ids as keys, mark_time of topic as value
*/
-function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001)
+function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
{
global $config, $db, $user;
@@ -1709,7 +1710,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
);
$sql = $db->sql_build_query('SELECT', $sql_array);
- $result = $db->sql_query_limit($sql, $sql_limit);
+ $result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset);
while ($row = $db->sql_fetchrow($result))
{
@@ -1742,7 +1743,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
WHERE t.topic_last_post_time > ' . $user_lastmark . "
$sql_extra
$sql_sort";
- $result = $db->sql_query_limit($sql, $sql_limit);
+ $result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset);
while ($row = $db->sql_fetchrow($result))
{
@@ -2518,6 +2519,11 @@ function build_url($strip_vars = false)
$key = $arguments[0];
unset($arguments[0]);
+ if ($key === '')
+ {
+ continue;
+ }
+
$query[$key] = implode('=', $arguments);
}
@@ -2578,6 +2584,47 @@ function meta_refresh($time, $url, $disable_cd_check = false)
return $url;
}
+/**
+* Outputs correct status line header.
+*
+* Depending on php sapi one of the two following forms is used:
+*
+* Status: 404 Not Found
+*
+* HTTP/1.x 404 Not Found
+*
+* HTTP version is taken from HTTP_VERSION environment variable,
+* and defaults to 1.0.
+*
+* Sample usage:
+*
+* send_status_line(404, 'Not Found');
+*
+* @param int $code HTTP status code
+* @param string $message Message for the status code
+* @return void
+*/
+function send_status_line($code, $message)
+{
+ 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: $code $message", true, $code);
+ }
+ else
+ {
+ if (isset($_SERVER['HTTP_VERSION']))
+ {
+ $version = $_SERVER['HTTP_VERSION'];
+ }
+ else
+ {
+ $version = 'HTTP/1.0';
+ }
+ header("$version $code $message", true, $code);
+ }
+}
+
//Form validation
@@ -3313,7 +3360,9 @@ function get_preg_expression($mode)
switch ($mode)
{
case 'email':
- return '(?:[a-z0-9\'\.\-_\+\|]++|&amp;)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+';
+ // Regex written by James Watts and Francisco Jose Martin Moreno
+ // http://fightingforalostcause.net/misc/2006/compare-email-regex.php
+ return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&amp;)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
break;
case 'bbcode_htm':
@@ -3621,9 +3670,9 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
$user->setup();
}
- if ($msg_text == 'NO_FORUM' || $msg_text == 'NO_TOPIC' || $msg_text == 'NO_USER')
+ if ($msg_text == 'ERROR_NO_ATTACHMENT' || $msg_text == 'NO_FORUM' || $msg_text == 'NO_TOPIC' || $msg_text == 'NO_USER')
{
- header("HTTP/1.x 404 Not Found");
+ send_status_line(404, 'Not Found');
}
$msg_text = (!empty($user->lang[$msg_text])) ? $user->lang[$msg_text] : $msg_text;
@@ -4276,7 +4325,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
- 'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&amp;lang=' . $user->data['user_lang'], true, $user->session_id),
+ '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_NAME' => $user->theme['theme_name'],
'T_THEME_NAME' => $user->theme['theme_path'],
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 4cd2962e3b..89892feb30 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -573,8 +573,8 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
while ($row = $db->sql_fetchrow($result))
{
- $forum_ids[] = $row['forum_id'];
- $topic_ids[] = $row['topic_id'];
+ $forum_ids[] = (int) $row['forum_id'];
+ $topic_ids[] = (int) $row['topic_id'];
}
$db->sql_freeresult($result);
@@ -591,7 +591,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
}
$sql = 'UPDATE ' . POSTS_TABLE . '
- SET forum_id = ' . $forum_row['forum_id'] . ", topic_id = $topic_id
+ SET forum_id = ' . (int) $forum_row['forum_id'] . ", topic_id = $topic_id
WHERE " . $db->sql_in_set('post_id', $post_ids);
$db->sql_query($sql);
@@ -602,7 +602,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
if ($auto_sync)
{
- $forum_ids[] = $forum_row['forum_id'];
+ $forum_ids[] = (int) $forum_row['forum_id'];
sync('topic_reported', 'topic_id', $topic_ids);
sync('topic_attachment', 'topic_id', $topic_ids);
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index 0fdae9b274..c035fd3739 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -1025,6 +1025,9 @@ function set_user_options()
'bbcode' => array('bit' => 8, 'default' => 1),
'smilies' => array('bit' => 9, 'default' => 1),
'popuppm' => array('bit' => 10, 'default' => 0),
+ 'sig_bbcode' => array('bit' => 15, 'default' => 1),
+ 'sig_smilies' => array('bit' => 16, 'default' => 1),
+ 'sig_links' => array('bit' => 17, 'default' => 1),
);
$option_field = 0;
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ec348138f5..2de7e1b169 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -396,7 +396,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
else
{
- $folder_alt = ($forum_unread) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
+ $folder_alt = ($forum_unread) ? 'UNREAD_POSTS' : 'NO_UNREAD_POSTS';
}
// Create last post link information, if appropriate
@@ -425,7 +425,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$s_subforums_list = array();
foreach ($subforums_list as $subforum)
{
- $s_subforums_list[] = '<a href="' . $subforum['link'] . '" class="subforum ' . (($subforum['unread']) ? 'unread' : 'read') . '" title="' . (($subforum['unread']) ? $user->lang['NEW_POSTS'] : $user->lang['NO_NEW_POSTS']) . '">' . $subforum['name'] . '</a>';
+ $s_subforums_list[] = '<a href="' . $subforum['link'] . '" class="subforum ' . (($subforum['unread']) ? 'unread' : 'read') . '" title="' . (($subforum['unread']) ? $user->lang['UNREAD_POSTS'] : $user->lang['NO_UNREAD_POSTS']) . '">' . $subforum['name'] . '</a>';
}
$s_subforums_list = (string) implode(', ', $s_subforums_list);
$catless = ($row['parent_id'] == $root_data['forum_id']) ? true : false;
@@ -854,7 +854,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
$folder_img = ($unread_topic) ? $folder_new : $folder;
- $folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($topic_row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
+ $folder_alt = ($unread_topic) ? 'UNREAD_POSTS' : (($topic_row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_UNREAD_POSTS');
// Posted image?
if (!empty($topic_row['topic_posted']) && $topic_row['topic_posted'])
@@ -969,11 +969,16 @@ function display_user_activity(&$userdata)
$forum_ary = array_unique($forum_ary);
$forum_sql = (sizeof($forum_ary)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary, true) : '';
+ $fid_m_approve = $auth->acl_getf('m_approve', true);
+ $sql_m_approve = (!empty($fid_m_approve)) ? 'OR ' . $db->sql_in_set('forum_id', array_keys($fid_m_approve)) : '';
+
// Obtain active forum
$sql = 'SELECT forum_id, COUNT(post_id) AS num_posts
FROM ' . POSTS_TABLE . '
WHERE poster_id = ' . $userdata['user_id'] . "
AND post_postcount = 1
+ AND (post_approved = 1
+ $sql_m_approve)
$forum_sql
GROUP BY forum_id
ORDER BY num_posts DESC";
@@ -996,6 +1001,8 @@ function display_user_activity(&$userdata)
FROM ' . POSTS_TABLE . '
WHERE poster_id = ' . $userdata['user_id'] . "
AND post_postcount = 1
+ AND (post_approved = 1
+ $sql_m_approve)
$forum_sql
GROUP BY topic_id
ORDER BY num_posts DESC";
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index 99883cd9ca..bb0d88ec1b 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -671,11 +671,18 @@ class queue
$package_size = $data_ary['package_size'];
$num_items = (!$package_size || sizeof($data_ary['data']) < $package_size) ? sizeof($data_ary['data']) : $package_size;
+ /*
+ * This code is commented out because it causes problems on some web hosts.
+ * The core problem is rather restrictive email sending limits.
+ * This code is nly useful if you have no such restrictions from the
+ * web host and the package size setting is wrong.
+
// If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs...
if (sizeof($data_ary['data']) > $package_size * 2.5)
{
$num_items = sizeof($data_ary['data']);
}
+ */
switch ($object)
{
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 7242e7987b..f6f90575d4 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -348,7 +348,7 @@ function posting_gen_topic_types($forum_id, $cur_topic_type = POST_NORMAL)
{
$topic_type_array = array_merge(array(0 => array(
'VALUE' => POST_NORMAL,
- 'S_CHECKED' => ($topic_type == POST_NORMAL) ? ' checked="checked"' : '',
+ 'S_CHECKED' => ($cur_topic_type == POST_NORMAL) ? ' checked="checked"' : '',
'L_TOPIC_TYPE' => $user->lang['POST_NORMAL'])),
$topic_type_array
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index 4fc5034f7b..c4cbb7ca1e 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1751,6 +1751,8 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
return false;
}
+ $title = $row['message_subject'];
+
$rowset = array();
$bbcode_bitfield = '';
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&amp;folder=';
@@ -1774,8 +1776,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
- $title = $row['message_subject'];
-
if (sizeof($rowset) == 1 && !$in_post_mode)
{
return false;
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 21e82030ee..0b26f28864 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -297,6 +297,7 @@ function user_add($user_row, $cp_data = false)
if ($config['new_member_group_default'])
{
group_user_add($add_group_id, $user_id, false, false, true);
+ $user_row['group_id'] = $add_group_id;
}
else
{
@@ -527,7 +528,7 @@ function user_delete($mode, $user_id, $post_username = false)
$db->sql_transaction('begin');
- $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE);
+ $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE);
foreach ($table_ary as $table)
{
@@ -836,14 +837,15 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
FROM ' . USERS_TABLE . '
WHERE ' . $db->sql_in_set('username_clean', $sql_usernames);
- // Do not allow banning yourself
+ // Do not allow banning yourself, the guest account, or founders.
+ $non_bannable = array($user->data['user_id'], ANONYMOUS);
if (sizeof($founder))
{
- $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true);
+ $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), $non_bannable), true);
}
else
{
- $sql .= ' AND user_id <> ' . $user->data['user_id'];
+ $sql .= ' AND ' . $db->sql_in_set('user_id', $non_bannable, true);
}
$result = $db->sql_query($sql);
@@ -2283,7 +2285,7 @@ function avatar_get_dimensions($avatar, $avatar_type, &$error, $current_x = 0, $
/**
* Uploading/Changing user avatar
*/
-function avatar_process_user(&$error, $custom_userdata = false)
+function avatar_process_user(&$error, $custom_userdata = false, $can_upload = null)
{
global $config, $phpbb_root_path, $auth, $user, $db;
@@ -2322,7 +2324,10 @@ function avatar_process_user(&$error, $custom_userdata = false)
$avatar_select = basename(request_var('avatar_select', ''));
// Can we upload?
- $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+ if (is_null($can_upload))
+ {
+ $can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && @is_writable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
+ }
if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload)
{
@@ -2347,7 +2352,7 @@ function avatar_process_user(&$error, $custom_userdata = false)
}
else
{
- list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $sql_ary['user_avatar']);
+ list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . urldecode($sql_ary['user_avatar']));
$sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar'];
}
}
diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php
index fa44e006dd..1fbedbac4f 100644
--- a/phpBB/includes/mcp/mcp_post.php
+++ b/phpBB/includes/mcp/mcp_post.php
@@ -200,7 +200,7 @@ function mcp_post_details($id, $mode, $action)
'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;p=' . $post_info['post_id'] . '#p' . $post_info['post_id']),
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
- 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_info['forum_id']}&amp;p=$post_id") . "#p$post_id\">", '</a>'),
'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", "f={$post_info['forum_id']}&amp;start={$start}") . '">', '</a>'),
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 8d9ece5205..e43881fab2 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -196,7 +196,7 @@ class mcp_queue
'U_VIEW_POST' => $post_url,
'U_VIEW_TOPIC' => $topic_url,
- 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&amp;mode=unapproved_topics' : '&amp;mode=unapproved_posts')) . "&amp;start=$start\">", '</a>'),
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'),
@@ -691,16 +691,19 @@ function approve_post($post_id_list, $id, $mode)
{
$show_notify = false;
- foreach ($post_info as $post_data)
+ if ($config['email_enable'] || $config['jab_enable'])
{
- if ($post_data['poster_id'] == ANONYMOUS)
- {
- continue;
- }
- else
+ foreach ($post_info as $post_data)
{
- $show_notify = true;
- break;
+ if ($post_data['poster_id'] == ANONYMOUS)
+ {
+ continue;
+ }
+ else
+ {
+ $show_notify = true;
+ break;
+ }
}
}
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index e19fe96963..39d9fbd4af 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -205,7 +205,7 @@ class mcp_reports
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']),
'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']),
- 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', $user->lang['POST_UNAPPROVED']),
'RETURN_REPORTS' => sprintf($user->lang['RETURN_REPORTS'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports' . (($post_info['post_reported']) ? '&amp;mode=reports' : '&amp;mode=reports_closed') . '&amp;start=' . $start . '&amp;f=' . $post_info['forum_id']) . '">', '</a>'),
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 9779478330..76cd9beb92 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -237,7 +237,7 @@ function mcp_topic_view($id, $mode, $action)
'POST_ID' => $row['post_id'],
'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) . '">', '</a>'),
- 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'S_POST_REPORTED' => ($row['post_reported']) ? true : false,
'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php
index da3833754e..0be3a10e5f 100644
--- a/phpBB/includes/search/fulltext_mysql.php
+++ b/phpBB/includes/search/fulltext_mysql.php
@@ -122,7 +122,7 @@ class fulltext_mysql extends search_backend
if ($terms == 'all')
{
- $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#\+#', '#-#', '#\|#');
+ $match = array('#\sand\s#iu', '#\sor\s#iu', '#\snot\s#iu', '#(^|\s)\+#', '#(^|\s)-#', '#(^|\s)\|#');
$replace = array(' +', ' |', ' -', ' +', ' -', ' |');
$keywords = preg_replace($match, $replace, $keywords);
diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php
index c89e92711e..727e3aaffb 100644
--- a/phpBB/includes/search/fulltext_native.php
+++ b/phpBB/includes/search/fulltext_native.php
@@ -83,7 +83,9 @@ class fulltext_native extends search_backend
{
global $db, $user, $config;
- $keywords = trim($this->cleanup($keywords, '+-|()*'));
+ $tokens = '+-|()*';
+
+ $keywords = trim($this->cleanup($keywords, $tokens));
// allow word|word|word without brackets
if ((strpos($keywords, ' ') === false) && (strpos($keywords, '|') !== false) && (strpos($keywords, '(') === false))
@@ -114,6 +116,15 @@ class fulltext_native extends search_backend
case ' ':
$keywords[$i] = '|';
break;
+ case '*':
+ if ($i === 0 || ($keywords[$i - 1] !== '*' && strcspn($keywords[$i - 1], $tokens) === 0))
+ {
+ if ($i === $n - 1 || ($keywords[$i + 1] !== '*' && strcspn($keywords[$i + 1], $tokens) === 0))
+ {
+ $keywords = substr($keywords, 0, $i) . substr($keywords, $i + 1);
+ }
+ }
+ break;
}
}
else
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 0a01b4e73b..e157053e61 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -2134,9 +2134,9 @@ class user extends session
// Zone offset
$zone_offset = $this->timezone + $this->dst;
- // Show date <= 1 hour ago as 'xx min ago'
+ // Show date <= 1 hour ago as 'xx min ago' but not greater than 60 seconds in the future
// A small tolerence is given for times in the future but in the same minute are displayed as '< than a minute ago'
- if ($delta <= 3600 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
+ if ($delta <= 3600 && $delta > -60 && ($delta >= -5 || (($now / 60) % 60) == (($gmepoch / 60) % 60)) && $date_cache[$format]['is_short'] !== false && !$forcedate && isset($this->lang['datetime']['AGO']))
{
return $this->lang(array('datetime', 'AGO'), max(0, (int) floor($delta / 60)));
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index 6ac2412ef0..a6f71669ce 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -119,7 +119,7 @@ class ucp_main
$unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false;
$folder_img = ($unread_topic) ? $folder_new : $folder;
- $folder_alt = ($unread_topic) ? 'NEW_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_NEW_POSTS');
+ $folder_alt = ($unread_topic) ? 'UNREAD_POSTS' : (($row['topic_status'] == ITEM_LOCKED) ? 'TOPIC_LOCKED' : 'NO_UNREAD_POSTS');
if ($row['topic_status'] == ITEM_LOCKED)
{
@@ -318,7 +318,7 @@ class ucp_main
else
{
$folder_image = ($unread_forum) ? 'forum_unread' : 'forum_read';
- $folder_alt = ($unread_forum) ? 'NEW_POSTS' : 'NO_NEW_POSTS';
+ $folder_alt = ($unread_forum) ? 'UNREAD_POSTS' : 'NO_UNREAD_POSTS';
}
// Create last post link information, if appropriate
diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php
index 665dd2c83f..6b7172ca2b 100644
--- a/phpBB/includes/ucp/ucp_pm_viewfolder.php
+++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php
@@ -170,10 +170,12 @@ function view_folder($id, $mode, $folder_id, $folder)
'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
'S_PM_DELETED' => ($row['pm_deleted']) ? true : false,
+ 'S_PM_REPORTED' => (isset($row['report_id'])) ? true : false,
'S_AUTHOR_DELETED' => ($row['author_id'] == ANONYMOUS) ? true : false,
'U_VIEW_PM' => ($row['pm_deleted']) ? '' : $view_message_url,
'U_REMOVE_PM' => ($row['pm_deleted']) ? $remove_message_url : '',
+ 'U_MCP_REPORT' => (isset($row['report_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&amp;mode=pm_report_details&amp;r=' . $row['report_id']) : '',
'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '')
);
}
@@ -183,6 +185,7 @@ function view_folder($id, $mode, $folder_id, $folder)
'S_SHOW_RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? true : false,
'S_SHOW_COLOUR_LEGEND' => true,
+ 'REPORTED_IMG' => $user->img('icon_topic_reported', 'PM_REPORTED'),
'S_PM_ICONS' => ($config['enable_pm_icons']) ? true : false)
);
}
@@ -502,7 +505,7 @@ function get_pm_from($folder_id, $folder, $user_id)
$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
}
- $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.username_clean, u.user_colour
+ $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.username_clean, u.user_colour, p.message_reported
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u
WHERE t.user_id = $user_id
AND p.author_id = u.user_id
@@ -512,13 +515,34 @@ function get_pm_from($folder_id, $folder, $user_id)
ORDER BY $sql_sort_order";
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
+ $pm_reported = array();
while ($row = $db->sql_fetchrow($result))
{
$rowset[$row['msg_id']] = $row;
$pm_list[] = $row['msg_id'];
+ if ($row['message_reported'])
+ {
+ $pm_reported[] = $row['msg_id'];
+ }
}
$db->sql_freeresult($result);
+ // Fetch the report_ids, if there are any reported pms.
+ if (!empty($pm_reported) && $auth->acl_getf_global('m_report'))
+ {
+ $sql = 'SELECT pm_id, report_id
+ FROM ' . REPORTS_TABLE . '
+ WHERE report_closed = 0
+ AND ' . $db->sql_in_set('pm_id', $pm_reported);
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $rowset[$row['pm_id']]['report_id'] = $row['report_id'];
+ }
+ $db->sql_freeresult($result);
+ }
+
$pm_list = ($store_reverse) ? array_reverse($pm_list) : $pm_list;
return array(
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 6b255e81a0..4fd25b7d1c 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -569,7 +569,7 @@ class ucp_profile
{
if (check_form_key('ucp_avatar'))
{
- if (avatar_process_user($error))
+ if (avatar_process_user($error, false, $can_upload))
{
meta_refresh(3, $this->u_action);
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
diff --git a/phpBB/index.php b/phpBB/index.php
index c3dbbd346e..cc83641acd 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -115,10 +115,10 @@ $template->assign_vars(array(
'LEGEND' => $legend,
'BIRTHDAY_LIST' => $birthday_list,
- 'FORUM_IMG' => $user->img('forum_read', 'NO_NEW_POSTS'),
- 'FORUM_NEW_IMG' => $user->img('forum_unread', 'NEW_POSTS'),
- 'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_NEW_POSTS_LOCKED'),
- 'FORUM_NEW_LOCKED_IMG' => $user->img('forum_unread_locked', 'NO_NEW_POSTS_LOCKED'),
+ 'FORUM_IMG' => $user->img('forum_read', 'NO_UNREAD_POSTS'),
+ 'FORUM_UNREAD_IMG' => $user->img('forum_unread', 'UNREAD_POSTS'),
+ 'FORUM_LOCKED_IMG' => $user->img('forum_read_locked', 'NO_UNREAD_POSTS_LOCKED'),
+ 'FORUM_UNREAD_LOCKED_IMG' => $user->img('forum_unread_locked', 'UNREAD_POSTS_LOCKED'),
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 47d261dc46..83bbbf4577 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -685,7 +685,6 @@ function _add_modules($modules_to_install)
WHERE module_class = '" . $db->sql_escape($module_data['class']) . "'
AND parent_id = {$parent_id}
AND left_id BETWEEN {$first_left_id} AND {$module_row['left_id']}
- GROUP BY left_id
ORDER BY left_id";
$result = $db->sql_query($sql);
$steps = (int) $db->sql_fetchfield('num_modules');
@@ -1684,6 +1683,71 @@ function change_database_data(&$no_updates, $version)
}
$db->sql_freeresult($result);
+ // Install modules
+ $modules_to_install = array(
+ 'post' => array(
+ 'base' => 'board',
+ 'class' => 'acp',
+ 'title' => 'ACP_POST_SETTINGS',
+ 'auth' => 'acl_a_board',
+ 'cat' => 'ACP_MESSAGES',
+ 'after' => array('message', 'ACP_MESSAGE_SETTINGS')
+ ),
+ );
+
+ _add_modules($modules_to_install);
+
+ // add Bing Bot
+ $sql = 'SELECT group_id, group_colour
+ FROM ' . GROUPS_TABLE . "
+ WHERE group_name = 'BOTS'";
+ $result = $db->sql_query($sql);
+ $group_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$group_row)
+ {
+ // default fallback, should never get here
+ $group_row['group_id'] = 6;
+ $group_row['group_colour'] = '9E8DA7';
+ }
+
+ if (!function_exists('user_add'))
+ {
+ include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
+ }
+
+ $bot_name = 'Bing [Bot]';
+ $bot_agent = 'bingbot/';
+ $bot_ip = '';
+
+ $user_row = array(
+ 'user_type' => USER_IGNORE,
+ 'group_id' => $group_row['group_id'],
+ 'username' => $bot_name,
+ 'user_regdate' => time(),
+ 'user_password' => '',
+ 'user_colour' => $group_row['group_colour'],
+ 'user_email' => '',
+ 'user_lang' => $config['default_lang'],
+ 'user_style' => $config['default_style'],
+ 'user_timezone' => 0,
+ 'user_dateformat' => $config['default_dateformat'],
+ 'user_allow_massemail' => 0,
+ );
+
+ $user_id = user_add($user_row);
+
+ $sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
+ 'bot_active' => 1,
+ 'bot_name' => (string) $bot_name,
+ 'user_id' => (int) $user_id,
+ 'bot_agent' => (string) $bot_agent,
+ 'bot_ip' => (string) $bot_ip,
+ ));
+
+ _sql($sql, $errored, $error_ary);
+ // end Bing Bot addition
$no_updates = false;
break;
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php
index 06c3a8b4a6..8c3ffd61a8 100644
--- a/phpBB/install/install_convert.php
+++ b/phpBB/install/install_convert.php
@@ -685,7 +685,7 @@ class install_convert extends module
// Thanks MySQL, for silently converting...
case 'mysql':
case 'mysql4':
- if (version_compare($src_db->sql_server_info(true), '4.1.3', '>='))
+ if (version_compare($src_db->sql_server_info(true, false), '4.1.3', '>='))
{
$convert->mysql_convert = true;
}
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index f4989b5bd7..4c22db07b2 100644
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -2108,6 +2108,7 @@ class install_install extends module
'Alta Vista [Bot]' => array('Scooter/', ''),
'Ask Jeeves [Bot]' => array('Ask Jeeves', ''),
'Baidu [Spider]' => array('Baiduspider+(', ''),
+ 'Bing [Bot]' => array('bingbot/', ''),
'Exabot [Bot]' => array('Exabot/', ''),
'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php
index e717fe3dd4..6184cbbc33 100644
--- a/phpBB/install/install_update.php
+++ b/phpBB/install/install_update.php
@@ -192,6 +192,17 @@ class install_update extends module
return;
}
+ // Check if the update files are actually meant to update from the current version
+ if ($config['version'] != $this->update_info['version']['from'])
+ {
+ $this->unequal_version = true;
+
+ $template->assign_vars(array(
+ 'S_ERROR' => true,
+ 'ERROR_MSG' => sprintf($user->lang['INCOMPATIBLE_UPDATE_FILES'], $config['version'], $this->update_info['version']['from'], $this->update_info['version']['to']),
+ ));
+ }
+
// Check if the update files stored are for the latest version...
if ($this->latest_version != $this->update_info['version']['to'])
{
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index 52389d85b9..ac0ddf1b73 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -50,7 +50,8 @@ $lang = array_merge($lang, array(
'SITE_DESC' => 'Site description',
'SITE_NAME' => 'Site name',
'SYSTEM_DST' => 'Enable Summer Time/<abbr title="Daylight Saving Time">DST</abbr>',
- 'SYSTEM_TIMEZONE' => 'System timezone',
+ 'SYSTEM_TIMEZONE' => 'Guest timezone',
+ 'SYSTEM_TIMEZONE_EXPLAIN' => 'Timezone to use for displaying times to users who are not logged in (guests, bots). Logged in users set their timezone during registration and can change it in user control panel.',
'WARNINGS_EXPIRE' => 'Warning duration',
'WARNINGS_EXPIRE_EXPLAIN' => 'Number of days that will elapse before the warning will automatically expire from a user’s record.',
));
@@ -176,8 +177,8 @@ $lang = array_merge($lang, array(
'MIN_CHAR_LIMIT_EXPLAIN' => 'The minimum number of characters the user need to enter within a post/private message.',
'POSTING' => 'Posting',
'POSTS_PER_PAGE' => 'Posts per page',
- 'QUOTE_DEPTH_LIMIT' => 'Maximum nested quotes per post',
- 'QUOTE_DEPTH_LIMIT_EXPLAIN' => 'Maximum number of nested quotes in a post. Set to 0 for unlimited depth.',
+ 'QUOTE_DEPTH_LIMIT' => 'Maximum nesting depth for quotes',
+ 'QUOTE_DEPTH_LIMIT_EXPLAIN' => 'Maximum quote nesting depth in a post. Set to 0 for unlimited depth.',
'SMILIES_LIMIT' => 'Maximum smilies per post',
'SMILIES_LIMIT_EXPLAIN' => 'Maximum number of smilies in a post. Set to 0 for unlimited smilies.',
'SMILIES_PER_PAGE' => 'Smilies per page',
@@ -359,7 +360,7 @@ $lang = array_merge($lang, array(
'RECOMPILE_STYLES' => 'Recompile stale style components',
'RECOMPILE_STYLES_EXPLAIN' => 'Check for updated style components on filesystem and recompile.',
'YES_ANON_READ_MARKING' => 'Enable topic marking for guests',
- 'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled posts are always read for guests.',
+ 'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled, posts are always marked read for guests.',
'YES_BIRTHDAYS' => 'Enable birthday listing',
'YES_BIRTHDAYS_EXPLAIN' => 'If disabled the birthday listing is no longer displayed. To let this setting take effect the birthday feature needs to be enabled too.',
'YES_JUMPBOX' => 'Enable display of jumpbox',
@@ -392,7 +393,7 @@ $lang = array_merge($lang, array(
'LDAP_NO_EMAIL' => 'The specified e-mail attribute does not exist.',
'LDAP_NO_IDENTITY' => 'Could not find a login identity for %s.',
'LDAP_PASSWORD' => 'LDAP password',
- 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database visible to everybody who can access your database or who can view this configuration page.</em>',
+ 'LDAP_PASSWORD_EXPLAIN' => 'Leave blank to use anonymous binding. Else fill in the password for the above user. Required for Active Directory Servers.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'LDAP_PORT' => 'LDAP server port',
'LDAP_PORT_EXPLAIN' => 'Optionally you can specify a port which should be used to connect to the LDAP server instead of the default port 389.',
'LDAP_SERVER' => 'LDAP server name',
@@ -504,7 +505,7 @@ $lang = array_merge($lang, array(
'SMTP_DIGEST_MD5' => 'DIGEST-MD5',
'SMTP_LOGIN' => 'LOGIN',
'SMTP_PASSWORD' => 'SMTP password',
- 'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database visible to everybody who can access your database or who can view this configuration page.</em>',
+ 'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.<br /><em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'SMTP_PLAIN' => 'PLAIN',
'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
'SMTP_PORT' => 'SMTP server port',
@@ -527,7 +528,7 @@ $lang = array_merge($lang, array(
'JAB_PACKAGE_SIZE' => 'Jabber package size',
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.',
'JAB_PASSWORD' => 'Jabber password',
- 'JAB_PASSWORD_EXPLAIN' => '<em><strong>Warning:</strong> This password will be stored as plain text in the database visible to everybody who can access your database or who can view this configuration page.</em>',
+ 'JAB_PASSWORD_EXPLAIN' => '<em><strong>Warning:</strong> This password will be stored as plain text in the database, visible to everybody who can access your database or who can view this configuration page.</em>',
'JAB_PORT' => 'Jabber port',
'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.',
'JAB_SERVER' => 'Jabber server',
diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php
index 247d8a4140..951c69f915 100644
--- a/phpBB/language/en/acp/styles.php
+++ b/phpBB/language/en/acp/styles.php
@@ -165,11 +165,11 @@ $lang = array_merge($lang, array(
'IMG_FORUM_READ' => 'Forum',
'IMG_FORUM_READ_LOCKED' => 'Forum locked',
'IMG_FORUM_READ_SUBFORUM' => 'Subforum',
- 'IMG_FORUM_UNREAD' => 'Forum new posts',
- 'IMG_FORUM_UNREAD_LOCKED' => 'Forum new posts locked',
- 'IMG_FORUM_UNREAD_SUBFORUM' => 'Subforum new posts',
+ 'IMG_FORUM_UNREAD' => 'Forum unread posts',
+ 'IMG_FORUM_UNREAD_LOCKED' => 'Forum unread posts locked',
+ 'IMG_FORUM_UNREAD_SUBFORUM' => 'Subforum unread posts',
'IMG_SUBFORUM_READ' => 'Legend subforum',
- 'IMG_SUBFORUM_UNREAD' => 'Legend subforum new posts',
+ 'IMG_SUBFORUM_UNREAD' => 'Legend subforum unread posts',
'IMG_TOPIC_MOVED' => 'Topic moved',
@@ -180,39 +180,39 @@ $lang = array_merge($lang, array(
'IMG_TOPIC_READ_LOCKED' => 'Topic locked',
'IMG_TOPIC_READ_LOCKED_MINE' => 'Topic locked posted to',
- 'IMG_TOPIC_UNREAD' => 'Topic new posts',
- 'IMG_TOPIC_UNREAD_MINE' => 'Topic posted to new',
- 'IMG_TOPIC_UNREAD_HOT' => 'Topic popular new posts',
- 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic popular posted to new',
- 'IMG_TOPIC_UNREAD_LOCKED' => 'Topic locked new',
- 'IMG_TOPIC_UNREAD_LOCKED_MINE' => 'Topic locked posted to new',
+ 'IMG_TOPIC_UNREAD' => 'Topic unread posts',
+ 'IMG_TOPIC_UNREAD_MINE' => 'Topic posted to unread',
+ 'IMG_TOPIC_UNREAD_HOT' => 'Topic popular unread posts',
+ 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic popular posted to unread',
+ 'IMG_TOPIC_UNREAD_LOCKED' => 'Topic locked unread',
+ 'IMG_TOPIC_UNREAD_LOCKED_MINE' => 'Topic locked posted to unread',
'IMG_STICKY_READ' => 'Sticky topic',
'IMG_STICKY_READ_MINE' => 'Sticky topic posted to',
'IMG_STICKY_READ_LOCKED' => 'Sticky topic locked',
'IMG_STICKY_READ_LOCKED_MINE' => 'Sticky topic locked posted to',
- 'IMG_STICKY_UNREAD' => 'Sticky topic new posts',
- 'IMG_STICKY_UNREAD_MINE' => 'Sticky topic posted to new',
- 'IMG_STICKY_UNREAD_LOCKED' => 'Sticky topic locked new posts',
- 'IMG_STICKY_UNREAD_LOCKED_MINE' => 'Sticky topic locked posted to new',
+ 'IMG_STICKY_UNREAD' => 'Sticky topic unread posts',
+ 'IMG_STICKY_UNREAD_MINE' => 'Sticky topic posted to unread',
+ 'IMG_STICKY_UNREAD_LOCKED' => 'Sticky topic locked unread posts',
+ 'IMG_STICKY_UNREAD_LOCKED_MINE' => 'Sticky topic locked posted to unread',
'IMG_ANNOUNCE_READ' => 'Announcement',
'IMG_ANNOUNCE_READ_MINE' => 'Announcement posted to',
'IMG_ANNOUNCE_READ_LOCKED' => 'Announcement locked',
'IMG_ANNOUNCE_READ_LOCKED_MINE' => 'Announcement locked posted to',
- 'IMG_ANNOUNCE_UNREAD' => 'Announcement new posts',
- 'IMG_ANNOUNCE_UNREAD_MINE' => 'Announcement posted to new',
- 'IMG_ANNOUNCE_UNREAD_LOCKED' => 'Announcement locked new posts',
- 'IMG_ANNOUNCE_UNREAD_LOCKED_MINE' => 'Announcement locked posted to new',
+ 'IMG_ANNOUNCE_UNREAD' => 'Announcement unread posts',
+ 'IMG_ANNOUNCE_UNREAD_MINE' => 'Announcement posted to unread',
+ 'IMG_ANNOUNCE_UNREAD_LOCKED' => 'Announcement locked unread posts',
+ 'IMG_ANNOUNCE_UNREAD_LOCKED_MINE' => 'Announcement locked posted to unread',
'IMG_GLOBAL_READ' => 'Global',
'IMG_GLOBAL_READ_MINE' => 'Global posted to',
'IMG_GLOBAL_READ_LOCKED' => 'Global locked',
'IMG_GLOBAL_READ_LOCKED_MINE' => 'Global locked posted to',
- 'IMG_GLOBAL_UNREAD' => 'Global new posts',
- 'IMG_GLOBAL_UNREAD_MINE' => 'Global posted to new',
- 'IMG_GLOBAL_UNREAD_LOCKED' => 'Global locked new posts',
- 'IMG_GLOBAL_UNREAD_LOCKED_MINE' => 'Global locked posted to new',
+ 'IMG_GLOBAL_UNREAD' => 'Global unread posts',
+ 'IMG_GLOBAL_UNREAD_MINE' => 'Global posted to unread',
+ 'IMG_GLOBAL_UNREAD_LOCKED' => 'Global locked unread posts',
+ 'IMG_GLOBAL_UNREAD_LOCKED_MINE' => 'Global locked posted to unread',
'IMG_PM_READ' => 'Read private message',
'IMG_PM_UNREAD' => 'Unread private message',
diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php
index 8d9bf0d486..eda9659795 100644
--- a/phpBB/language/en/acp/users.php
+++ b/phpBB/language/en/acp/users.php
@@ -42,6 +42,7 @@ $lang = array_merge($lang, array(
'BAN_ALREADY_ENTERED' => 'The ban had been previously entered successfully. The ban list has not been updated.',
'BAN_SUCCESSFUL' => 'Ban entered successfully.',
+ 'CANNOT_BAN_ANONYMOUS' => 'You are not allowed to ban the anonymous account. Permissions for anonymous users can be set under the Permissions tab.',
'CANNOT_BAN_FOUNDER' => 'You are not allowed to ban founder accounts.',
'CANNOT_BAN_YOURSELF' => 'You are not allowed to ban yourself.',
'CANNOT_DEACTIVATE_BOT' => 'You are not allowed to deactivate bot accounts. Please deactivate the bot within the bots page instead.',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index a3d47b5b59..bc38c1563d 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -295,6 +295,7 @@ $lang = array_merge($lang, array(
'LAST_VISIT' => 'Last visit',
'LDAP_NO_LDAP_EXTENSION' => 'LDAP extension not available.',
'LDAP_NO_SERVER_CONNECTION' => 'Could not connect to LDAP server.',
+ 'LDAP_SEARCH_FAILED' => 'An error occured while searching the LDAP directory.',
'LEGEND' => 'Legend',
'LOCATION' => 'Location',
'LOCK_POST' => 'Lock post',
@@ -346,8 +347,8 @@ $lang = array_merge($lang, array(
'NEW_MESSAGES' => 'New messages',
'NEW_PM' => '<strong>%d</strong> new message',
'NEW_PMS' => '<strong>%d</strong> new messages',
- 'NEW_POST' => 'New post',
- 'NEW_POSTS' => 'New posts',
+ 'NEW_POST' => 'New post', // Not used anymore
+ 'NEW_POSTS' => 'New posts', // Not used anymore
'NEXT' => 'Next', // Used in pagination
'NEXT_STEP' => 'Next',
'NEVER' => 'Never',
@@ -380,7 +381,7 @@ $lang = array_merge($lang, array(
'NO_MODERATORS' => 'There are no moderators.',
'NO_NEW_MESSAGES' => 'No new messages',
'NO_NEW_PM' => '<strong>0</strong> new messages',
- 'NO_NEW_POSTS' => 'No new posts',
+ 'NO_NEW_POSTS' => 'No new posts', // Not used anymore
'NO_ONLINE_USERS' => 'No registered users',
'NO_POSTS' => 'No posts',
'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
@@ -394,6 +395,7 @@ $lang = array_merge($lang, array(
'NO_TOPICS' => 'There are no topics or posts in this forum.',
'NO_TOPICS_TIME_FRAME' => 'No topics exist inside this forum for the selected time frame.',
'NO_UNREAD_PM' => '<strong>0</strong> unread messages',
+ 'NO_UNREAD_POSTS' => 'No unread posts',
'NO_UPLOAD_FORM_FOUND' => 'Upload initiated but no valid file upload form found.',
'NO_USER' => 'The requested user does not exist.',
'NO_USERS' => 'The requested users do not exist.',
@@ -420,6 +422,7 @@ $lang = array_merge($lang, array(
'PIXEL' => 'px',
'PLAY_QUICKTIME_FILE' => 'Play Quicktime file',
'PM' => 'PM',
+ 'PM_REPORTED' => 'Click to view report',
'POSTING_MESSAGE' => 'Posting message in %s',
'POSTING_PRIVATE_MESSAGE' => 'Composing private message',
'POST' => 'Post',
@@ -639,6 +642,8 @@ $lang = array_merge($lang, array(
'UNREAD_MESSAGES' => 'Unread messages',
'UNREAD_PM' => '<strong>%d</strong> unread message',
'UNREAD_PMS' => '<strong>%d</strong> unread messages',
+ 'UNREAD_POST' => 'Unread post',
+ 'UNREAD_POSTS' => 'Unread posts',
'UNWATCHED_FORUMS' => 'You are no longer subscribed to the selected forums.',
'UNWATCHED_TOPICS' => 'You are no longer subscribed to the selected topics.',
'UNWATCHED_FORUMS_TOPICS' => 'You are no longer subscribed to the selected entries.',
diff --git a/phpBB/language/en/help_faq.php b/phpBB/language/en/help_faq.php
index c76c281df5..3b7dc02d3f 100644
--- a/phpBB/language/en/help_faq.php
+++ b/phpBB/language/en/help_faq.php
@@ -128,7 +128,7 @@ $help = array(
),
array(
0 => 'Why can’t I add more poll options?',
- 1 => 'The limit for poll options is set by the board administrator. If you feel you need to add more options to your poll then the allowed amount, contact the board administrator.'
+ 1 => 'The limit for poll options is set by the board administrator. If you feel you need to add more options to your poll than the allowed amount, contact the board administrator.'
),
array(
0 => 'How do I edit or delete a poll?',
diff --git a/phpBB/language/en/viewforum.php b/phpBB/language/en/viewforum.php
index 546f91587d..d2fae20c62 100644
--- a/phpBB/language/en/viewforum.php
+++ b/phpBB/language/en/viewforum.php
@@ -48,16 +48,21 @@ $lang = array_merge($lang, array(
'MARK_TOPICS_READ' => 'Mark topics read',
- 'NEW_POSTS_HOT' => 'New posts [ Popular ]',
- 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]',
- 'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]',
- 'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]',
+ 'NEW_POSTS_HOT' => 'New posts [ Popular ]', // Not used anymore
+ 'NEW_POSTS_LOCKED' => 'New posts [ Locked ]', // Not used anymore
+ 'NO_NEW_POSTS_HOT' => 'No new posts [ Popular ]', // Not used anymore
+ 'NO_NEW_POSTS_LOCKED' => 'No new posts [ Locked ]', // Not used anymore
'NO_READ_ACCESS' => 'You do not have the required permissions to read topics within this forum.',
+ 'NO_UNREAD_POSTS_HOT' => 'No unread posts [ Popular ]',
+ 'NO_UNREAD_POSTS_LOCKED' => 'No unread posts [ Locked ]',
'POST_FORUM_LOCKED' => 'Forum is locked',
'TOPICS_MARKED' => 'The topics for this forum have now been marked read.',
+ 'UNREAD_POSTS_HOT' => 'Unread posts [ Popular ]',
+ 'UNREAD_POSTS_LOCKED' => 'Unread posts [ Locked ]',
+
'VIEW_FORUM' => 'View forum',
'VIEW_FORUM_TOPIC' => '1 topic',
'VIEW_FORUM_TOPICS' => '%d topics',
diff --git a/phpBB/search.php b/phpBB/search.php
index 7a9ab82f93..1e1e42d01f 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -387,18 +387,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
$s_sort_key = $s_sort_dir = $u_sort_param = $s_limit_days = '';
-
- $unread_list = array();
- $unread_list = get_unread_topics($user->data['user_id'], $sql_where, $sql_sort);
-
- if (!empty($unread_list))
- {
- $sql = 'SELECT t.topic_id
- FROM ' . TOPICS_TABLE . ' t
- WHERE ' . $db->sql_in_set('t.topic_id', array_keys($unread_list)) . "
- $sql_sort";
- $field = 'topic_id';
- }
break;
case 'newposts':
@@ -476,6 +464,13 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$total_match_count = sizeof($id_ary) + $start;
$id_ary = array_slice($id_ary, 0, $per_page);
}
+ else if ($search_id == 'unreadposts')
+ {
+ $id_ary = array_keys(get_unread_topics($user->data['user_id'], $sql_where, $sql_sort, 1001 - $start, $start));
+
+ $total_match_count = sizeof($id_ary) + $start;
+ $id_ary = array_slice($id_ary, 0, $per_page);
+ }
else
{
$search_id = '';
diff --git a/phpBB/style.php b/phpBB/style.php
index fa77815670..8ca1751391 100644
--- a/phpBB/style.php
+++ b/phpBB/style.php
@@ -45,15 +45,8 @@ if (!empty($load_extensions) && function_exists('dl'))
}
}
-
-$sid = (isset($_GET['sid']) && !is_array($_GET['sid'])) ? htmlspecialchars($_GET['sid']) : '';
$id = (isset($_GET['id'])) ? intval($_GET['id']) : 0;
-if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
-{
- $sid = '';
-}
-
// This is a simple script to grab and output the requested CSS data stored in the DB
// We include a session_id check to try and limit 3rd party linking ... unless they
// happen to have a current session it will output nothing. We will also cache the
@@ -81,6 +74,20 @@ if ($id)
$config = $cache->obtain_config();
$user = false;
+ // try to get a session ID from REQUEST array
+ $sid = request_var('sid', '');
+
+ if (!$sid)
+ {
+ // if that failed, then look in the cookies
+ $sid = request_var($config['cookie_name'] . '_sid', '', false, true);
+ }
+
+ if (strspn($sid, 'abcdefABCDEF0123456789') !== strlen($sid))
+ {
+ $sid = '';
+ }
+
if ($sid)
{
$sql = 'SELECT u.user_id, u.user_lang
diff --git a/phpBB/styles/prosilver/template/editor.js b/phpBB/styles/prosilver/template/editor.js
index c4c3483766..ddc862bb8c 100644
--- a/phpBB/styles/prosilver/template/editor.js
+++ b/phpBB/styles/prosilver/template/editor.js
@@ -200,6 +200,12 @@ function addquote(post_id, username, l_wrote)
var theSelection = '';
var divarea = false;
+ if (l_wrote === undefined)
+ {
+ // Backwards compatibility
+ l_wrote = 'wrote';
+ }
+
if (document.all)
{
divarea = document.all[message_name];
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 6fb3778952..4a85858df5 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -98,16 +98,21 @@ function viewableArea(e, itself)
/**
* Set display of page element
* s[-1,0,1] = hide,toggle display,show
+* type = string: inline, block, inline-block or other CSS "display" type
*/
-function dE(n, s)
+function dE(n, s, type)
{
- var e = document.getElementById(n);
+ if (!type)
+ {
+ type = 'block';
+ }
+ var e = document.getElementById(n);
if (!s)
{
- s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1;
+ s = (e.style.display == '' || e.style.display == type) ? -1 : 1;
}
- e.style.display = (s == 1) ? 'block' : 'none';
+ e.style.display = (s == 1) ? type : 'none';
}
/**
diff --git a/phpBB/styles/prosilver/template/posting_topic_review.html b/phpBB/styles/prosilver/template/posting_topic_review.html
index 879e6bb7fc..a05f057e21 100644
--- a/phpBB/styles/prosilver/template/posting_topic_review.html
+++ b/phpBB/styles/prosilver/template/posting_topic_review.html
@@ -24,7 +24,7 @@
<div class="postbody" id="pr{topic_review_row.POST_ID}">
<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
<ul class="profile-icons">
- <li class="quote-icon"><a href="#postingbox" onclick="addquote({topic_review_row.POST_ID}, '{topic_review_row.POSTER_QUOTE}', '{L_WROTE}');" title="{L_QUOTE} {topic_review_row.POST_AUTHOR}"><span>{L_QUOTE} {topic_review_row.POST_AUTHOR}</span></a></li>
+ <li class="quote-icon"><a href="#postingbox" onclick="addquote({topic_review_row.POST_ID}, '{topic_review_row.POSTER_QUOTE}', '{LA_WROTE}');" title="{L_QUOTE} {topic_review_row.POST_AUTHOR}"><span>{L_QUOTE} {topic_review_row.POST_AUTHOR}</span></a></li>
</ul>
<!-- ENDIF -->
<!-- IF topic_review_row.U_MCP_DETAILS --><div class="right-box"><a href="{topic_review_row.U_MCP_DETAILS}">{L_POST_DETAILS}</a></div><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html
index 32b8072082..9051eb2ee0 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_history.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_history.html
@@ -1,7 +1,7 @@
<h3 id="review">
<span class="right-box"><a href="#review" onclick="viewableArea(getElementById('topicreview'), true); var rev_text = getElementById('review').getElementsByTagName('a').item(0).firstChild; if (rev_text.data == '{LA_EXPAND_VIEW}'){rev_text.data = '{LA_COLLAPSE_VIEW}'; } else if (rev_text.data == '{LA_COLLAPSE_VIEW}'){rev_text.data = '{LA_EXPAND_VIEW}'};">{L_EXPAND_VIEW}</a></span>
- {L_MESSAGE_HISTORY}: {HISTORY_TITLE}
+ {L_MESSAGE_HISTORY}:
</h3>
<div id="topicreview">
@@ -17,7 +17,7 @@
<div class="postbody" id="pr{history_row.MSG_ID}">
<!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE -->
<ul class="profile-icons">
- <li class="quote-icon"><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#postingbox" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{L_WROTE}');"<!-- ENDIF --> title="{L_QUOTE} {history_row.MESSAGE_AUTHOR}"><span>{L_QUOTE} {history_row.MESSAGE_AUTHOR}</span></a></li>
+ <li class="quote-icon"><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#postingbox" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{LA_WROTE}');"<!-- ENDIF --> title="{L_QUOTE} {history_row.MESSAGE_AUTHOR}"><span>{L_QUOTE} {history_row.MESSAGE_AUTHOR}</span></a></li>
</ul>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
index 7b309a74f7..d7e02e405e 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html
@@ -71,7 +71,7 @@
<br /><em class="small">{L_PM_FROM_REMOVED_AUTHOR}</em>
<!-- ENDIF -->
- <!-- IF messagerow.S_TOPIC_REPORTED --><a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> {messagerow.ATTACH_ICON_IMG}<br />
+ <!-- IF messagerow.S_PM_REPORTED --><a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --> {messagerow.ATTACH_ICON_IMG}<br />
<!-- IF S_SHOW_RECIPIENTS -->{L_MESSAGE_TO} {messagerow.RECIPIENTS}<!-- ELSE -->{L_MESSAGE_BY_AUTHOR} {messagerow.MESSAGE_AUTHOR_FULL} &raquo; {messagerow.SENT_TIME}<!-- ENDIF -->
</dt>
<!-- IF S_SHOW_RECIPIENTS --><dd class="info"><span>{L_SENT_AT}: {messagerow.SENT_TIME}</span></dd><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_profile_signature.html b/phpBB/styles/prosilver/template/ucp_profile_signature.html
index 5d25d2d9f4..ab23b84076 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_signature.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_signature.html
@@ -4,7 +4,7 @@
<h2>{L_TITLE}</h2>
-<!-- IF SIGNATURE_PREVIEW -->
+<!-- IF SIGNATURE_PREVIEW != '' -->
<div class="panel">
<div class="inner"><span class="corners-top"><span></span></span>
<h3>{L_SIGNATURE_PREVIEW}</h3>
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index cc38ed9d2b..12073a39d2 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -39,7 +39,7 @@
<!-- IF not S_IS_BOT and S_DISPLAY_POST_INFO -->
<div class="buttons">
- <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
+ <div class="<!-- IF S_IS_LOCKED -->locked-icon<!-- ELSE -->post-icon<!-- ENDIF -->" title="<!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF -->"><a href="{U_POST_NEW_TOPIC}"><span></span><!-- IF S_IS_LOCKED -->{L_FORUM_LOCKED}<!-- ELSE -->{L_POST_TOPIC}<!-- ENDIF --></a></div>
</div>
<!-- ENDIF -->
@@ -122,12 +122,12 @@
<!-- ENDIF -->
<!-- IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH -->
- <div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH --> announcement<!-- ENDIF -->">
+ <div class="forumbg<!-- IF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) --> announcement<!-- ENDIF -->">
<div class="inner"><span class="corners-top"><span></span></span>
<ul class="topiclist">
<li class="header">
<dl class="icon">
- <dt><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and topicrow.S_TOPIC_TYPE gt 1 -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
+ <dt><!-- IF S_DISPLAY_ACTIVE -->{L_ACTIVE_TOPICS}<!-- ELSEIF topicrow.S_TOPIC_TYPE_SWITCH and (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL) -->{L_ANNOUNCEMENTS}<!-- ELSE -->{L_TOPICS}<!-- ENDIF --></dt>
<dd class="posts">{L_REPLIES}</dd>
<dd class="views">{L_VIEWS}</dd>
<dd class="lastpost"><span>{L_LAST_POST}</span></dd>
@@ -137,7 +137,7 @@
<ul class="topiclist topics">
<!-- ENDIF -->
- <li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
+ <li class="row<!-- IF topicrow.S_ROW_COUNT is even --> bg1<!-- ELSE --> bg2<!-- ENDIF --><!-- IF topicrow.S_POST_GLOBAL --> global-announce<!-- ENDIF --><!-- IF topicrow.S_POST_ANNOUNCE --> announce<!-- ENDIF --><!-- IF topicrow.S_POST_STICKY --> sticky<!-- ENDIF --><!-- IF topicrow.S_TOPIC_REPORTED --> reported<!-- ENDIF -->">
<dl class="icon" style="background-image: url({topicrow.TOPIC_FOLDER_IMG_SRC}); background-repeat: no-repeat;">
<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css
index 109312ac1b..f441784d85 100644
--- a/phpBB/styles/prosilver/theme/bidi.css
+++ b/phpBB/styles/prosilver/theme/bidi.css
@@ -236,6 +236,7 @@
}
.rtl a.top2 {
+ background-position: 100% 50%;
padding-left: 0;
padding-right: 15px;
}
diff --git a/phpBB/styles/prosilver/theme/forms.css b/phpBB/styles/prosilver/theme/forms.css
index 4db342661c..4e48a93a55 100644
--- a/phpBB/styles/prosilver/theme/forms.css
+++ b/phpBB/styles/prosilver/theme/forms.css
@@ -96,6 +96,11 @@ fieldset.fields1 div {
margin-bottom: 3px;
}
+/* Set it back to 0px for the reCaptcha divs: PHPBB3-9587 */
+fieldset.fields1 #recaptcha_widget_div div {
+ margin-bottom: 0;
+}
+
/* Specific layout 2 */
fieldset.fields2 dt {
width: 15em;
diff --git a/phpBB/styles/subsilver2/template/attachment.html b/phpBB/styles/subsilver2/template/attachment.html
index d54994fe67..833bd4d55f 100644
--- a/phpBB/styles/subsilver2/template/attachment.html
+++ b/phpBB/styles/subsilver2/template/attachment.html
@@ -58,13 +58,13 @@
<!-- ELSEIF _file.S_FLASH_FILE -->
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{_file.WIDTH}" height="{_file.HEIGHT}">
- <param name="movie" value="{_file.U_DOWNLOAD_LINK}" />
+ <param name="movie" value="{_file.U_VIEW_LINK}" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="never" />
<param name="allowNetworking" value="internal" />
- <embed src="{_file.U_DOWNLOAD_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
+ <embed src="{_file.U_VIEW_LINK}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{_file.WIDTH}" height="{_file.HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never" allownetworking="internal"></embed>
</object>
<!-- ELSEIF _file.S_QUICKTIME_FILE -->
<object id="qtstream_{_file.ATTACH_ID}" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0" width="0" height="16">
diff --git a/phpBB/styles/subsilver2/template/editor.js b/phpBB/styles/subsilver2/template/editor.js
index 54bd3450d0..cd22812bab 100644
--- a/phpBB/styles/subsilver2/template/editor.js
+++ b/phpBB/styles/subsilver2/template/editor.js
@@ -202,6 +202,12 @@ function addquote(post_id, username, l_wrote)
var theSelection = '';
var divarea = false;
+ if (l_wrote === undefined)
+ {
+ // Backwards compatibility
+ l_wrote = 'wrote';
+ }
+
if (document.all)
{
divarea = document.all[message_name];
@@ -234,6 +240,7 @@ function addquote(post_id, username, l_wrote)
theSelection = theSelection.replace(/&lt\;/ig, '<');
theSelection = theSelection.replace(/&gt\;/ig, '>');
theSelection = theSelection.replace(/&amp\;/ig, '&');
+ theSelection = theSelection.replace(/&nbsp\;/ig, ' ');
}
else if (document.all)
{
@@ -381,8 +388,8 @@ function colorPalette(dir, width, height)
for (b = 0; b < 5; b++)
{
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
- document.write('<td bgcolor="#' + color + '">');
- document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;" onmouseover="helpline(\'s\');" onmouseout="helpline(\'tip\');"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
+ document.write('<td bgcolor="#' + color + '" style="width: ' + width + 'px; height: ' + height + 'px;">');
+ document.write('<a href="#" onclick="bbfontstyle(\'[color=#' + color + ']\', \'[/color]\'); return false;"><img src="images/spacer.gif" width="' + width + '" height="' + height + '" alt="#' + color + '" title="#' + color + '" /></a>');
document.writeln('</td>');
}
diff --git a/phpBB/styles/subsilver2/template/index_body.html b/phpBB/styles/subsilver2/template/index_body.html
index 863e4f7bee..8faf76e9ee 100644
--- a/phpBB/styles/subsilver2/template/index_body.html
+++ b/phpBB/styles/subsilver2/template/index_body.html
@@ -89,11 +89,11 @@
<table class="legend">
<tr>
- <td width="20" align="center">{FORUM_NEW_IMG}</td>
- <td><span class="gensmall">{L_NEW_POSTS}</span></td>
+ <td width="20" align="center">{FORUM_UNREAD_IMG}</td>
+ <td><span class="gensmall">{L_UNREAD_POSTS}</span></td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center">{FORUM_IMG}</td>
- <td><span class="gensmall">{L_NO_NEW_POSTS}</span></td>
+ <td><span class="gensmall">{L_NO_UNREAD_POSTS}</span></td>
<td>&nbsp;&nbsp;</td>
<td width="20" align="center">{FORUM_LOCKED_IMG}</td>
<td><span class="gensmall">{L_FORUM_LOCKED}</span></td>
diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html
index 0aab79b7aa..2fff9c1991 100644
--- a/phpBB/styles/subsilver2/template/posting_buttons.html
+++ b/phpBB/styles/subsilver2/template/posting_buttons.html
@@ -19,6 +19,7 @@
o: '{LA_BBCODE_O_HELP}',
p: '{LA_BBCODE_P_HELP}',
w: '{LA_BBCODE_W_HELP}',
+ a: '{LA_BBCODE_A_HELP}',
s: '{LA_BBCODE_S_HELP}',
f: '{LA_BBCODE_F_HELP}',
e: '{LA_BBCODE_E_HELP}',
diff --git a/phpBB/styles/subsilver2/template/posting_topic_review.html b/phpBB/styles/subsilver2/template/posting_topic_review.html
index 5456ad09b6..54bbf6e553 100644
--- a/phpBB/styles/subsilver2/template/posting_topic_review.html
+++ b/phpBB/styles/subsilver2/template/posting_topic_review.html
@@ -36,7 +36,7 @@
<td>&nbsp;</td>
<td class="gensmall" valign="middle" nowrap="nowrap"><b>{L_POST_SUBJECT}:</b>&nbsp;</td>
<td class="gensmall" width="100%" valign="middle">{topic_review_row.POST_SUBJECT}</td>
- <td valign="top" nowrap="nowrap">&nbsp;<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE --><a href="#" onclick="addquote({topic_review_row.POST_ID},'{topic_review_row.POSTER_QUOTE}', '{L_WROTE}'); return false;">{QUOTE_IMG}</a><!-- ENDIF --></td>
+ <td valign="top" nowrap="nowrap">&nbsp;<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE --><a href="#" onclick="addquote({topic_review_row.POST_ID},'{topic_review_row.POSTER_QUOTE}', '{LA_WROTE}'); return false;">{QUOTE_IMG}</a><!-- ENDIF --></td>
</tr>
</table>
</td>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html
index d11822cc39..8754acaaa2 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_history.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html
@@ -6,7 +6,7 @@
<table class="tablebg" width="100%" cellspacing="1">
<tr>
- <th align="center">{L_MESSAGE_HISTORY} - {HISTORY_TITLE}</th>
+ <th align="center">{L_MESSAGE_HISTORY}</th>
</tr>
<tr>
<td class="row1"><div style="overflow: auto; width: 100%; height: 300px;">
@@ -59,7 +59,7 @@
<!-- IF history_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td class="gensmall"><a href="{history_row.U_VIEW_MESSAGE}">{L_VIEW_PM}</a></td>
- <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF history_row.U_PROFILE --><a href="{history_row.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_EMAIL --><a href="{history_row.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE --><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{L_WROTE}'); return false;"<!-- ENDIF -->>{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_POST_REPLY_PM --><a href="{history_row.U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
+ <td><div class="gensmall" style="float: {S_CONTENT_FLOW_BEGIN};">&nbsp;<!-- IF history_row.U_PROFILE --><a href="{history_row.U_PROFILE}">{PROFILE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_EMAIL --><a href="{history_row.U_EMAIL}">{EMAIL_IMG}</a> <!-- ENDIF -->&nbsp;</div> <div class="gensmall" style="float: {S_CONTENT_FLOW_END};"><!-- IF history_row.U_QUOTE or history_row.MESSAGE_AUTHOR_QUOTE --><a <!-- IF history_row.U_QUOTE -->href="{history_row.U_QUOTE}"<!-- ELSE -->href="#" onclick="addquote({history_row.MSG_ID}, '{history_row.MESSAGE_AUTHOR_QUOTE}', '{LA_WROTE}'); return false;"<!-- ENDIF -->>{QUOTE_IMG}</a> <!-- ENDIF --> <!-- IF history_row.U_POST_REPLY_PM --><a href="{history_row.U_POST_REPLY_PM}">{REPLY_IMG}</a><!-- ENDIF -->&nbsp;</div></td>
</tr>
<tr>
<td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
index 314d03caf3..d1ef5ebd10 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_message_footer.html
@@ -14,6 +14,7 @@
<span class="gensmall">
<!-- IF U_PRINT_PM --><a href="{U_PRINT_PM}" title="{L_PRINT_PM}">{L_PRINT_PM}</a><!-- IF U_FORWARD_PM --> | <!-- ENDIF --><!-- ENDIF -->
<!-- IF U_FORWARD_PM --><a href="{U_FORWARD_PM}" title="{L_FORWARD_PM}">{L_FORWARD_PM}</a><!-- ENDIF -->
+ <!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 --><!-- IF U_PRINT_PM or U_FORWARD_PM --> | <!-- ENDIF --><a title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">{L_REPLY_TO_ALL}</a><!-- ENDIF -->
</span>
<!-- ENDIF -->
</td>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
index 1663502865..f0b076edb2 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html
@@ -81,6 +81,9 @@
<!-- ELSE -->
<a href="{messagerow.U_VIEW_PM}">{messagerow.SUBJECT}</a>
<!-- ENDIF -->
+ <!-- IF messagerow.S_PM_REPORTED -->
+ <a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a>&nbsp;
+ <!-- ENDIF -->
<!-- IF messagerow.S_AUTHOR_DELETED -->
<br /><em class="gensmall">{L_PM_FROM_REMOVED_AUTHOR}</em>
<!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/ucp_profile_signature.html b/phpBB/styles/subsilver2/template/ucp_profile_signature.html
index 2b396ea0df..a33726e166 100644
--- a/phpBB/styles/subsilver2/template/ucp_profile_signature.html
+++ b/phpBB/styles/subsilver2/template/ucp_profile_signature.html
@@ -93,7 +93,7 @@
</td>
</tr>
-<!-- IF SIGNATURE_PREVIEW -->
+<!-- IF SIGNATURE_PREVIEW != '' -->
<tr>
<th colspan="2" valign="middle">{L_SIGNATURE_PREVIEW}</th>
</tr>
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index 387a749e24..6511fa5349 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -281,31 +281,31 @@
<td align="{S_CONTENT_FLOW_BEGIN}" valign="top">
<table cellspacing="3" cellpadding="0" border="0">
<tr>
- <td width="20" style="text-align: center;">{FOLDER_NEW_IMG}</td>
- <td class="gensmall">{L_NEW_POSTS}</td>
+ <td width="20" style="text-align: center;">{FOLDER_UNREAD_IMG}</td>
+ <td class="gensmall">{L_UNREAD_POSTS}</td>
<td>&nbsp;&nbsp;</td>
<td width="20" style="text-align: center;">{FOLDER_IMG}</td>
- <td class="gensmall">{L_NO_NEW_POSTS}</td>
+ <td class="gensmall">{L_NO_UNREAD_POSTS}</td>
<td>&nbsp;&nbsp;</td>
<td width="20" style="text-align: center;">{FOLDER_ANNOUNCE_IMG}</td>
<td class="gensmall">{L_ICON_ANNOUNCEMENT}</td>
</tr>
<tr>
- <td style="text-align: center;">{FOLDER_HOT_NEW_IMG}</td>
- <td class="gensmall">{L_NEW_POSTS_HOT}</td>
+ <td style="text-align: center;">{FOLDER_HOT_UNREAD_IMG}</td>
+ <td class="gensmall">{L_UNREAD_POSTS_HOT}</td>
<td>&nbsp;&nbsp;</td>
<td style="text-align: center;">{FOLDER_HOT_IMG}</td>
- <td class="gensmall">{L_NO_NEW_POSTS_HOT}</td>
+ <td class="gensmall">{L_NO_UNREAD_POSTS_HOT}</td>
<td>&nbsp;&nbsp;</td>
<td style="text-align: center;">{FOLDER_STICKY_IMG}</td>
<td class="gensmall">{L_ICON_STICKY}</td>
</tr>
<tr>
- <td style="text-align: center;">{FOLDER_LOCKED_NEW_IMG}</td>
- <td class="gensmall">{L_NEW_POSTS_LOCKED}</td>
+ <td style="text-align: center;">{FOLDER_LOCKED_UNREAD_IMG}</td>
+ <td class="gensmall">{L_UNREAD_POSTS_LOCKED}</td>
<td>&nbsp;&nbsp;</td>
<td style="text-align: center;">{FOLDER_LOCKED_IMG}</td>
- <td class="gensmall">{L_NO_NEW_POSTS_LOCKED}</td>
+ <td class="gensmall">{L_NO_UNREAD_POSTS_LOCKED}</td>
<td>&nbsp;&nbsp;</td>
<td style="text-align: center;">{FOLDER_MOVED_IMG}</td>
<td class="gensmall">{L_TOPIC_MOVED}</td>
diff --git a/phpBB/styles/subsilver2/template/viewtopic_body.html b/phpBB/styles/subsilver2/template/viewtopic_body.html
index 8f01c64c0e..bba00ce685 100644
--- a/phpBB/styles/subsilver2/template/viewtopic_body.html
+++ b/phpBB/styles/subsilver2/template/viewtopic_body.html
@@ -238,7 +238,7 @@
<span class="gensmall error"><br /><br />{L_DOWNLOAD_NOTICE}</span>
<!-- ENDIF -->
<!-- IF postrow.SIGNATURE -->
- <span class="postbody"><br />_________________<br />{postrow.SIGNATURE}</span>
+ <div class="postbody"><br />_________________<br />{postrow.SIGNATURE}</div>
<!-- ENDIF -->
<!-- IF postrow.EDITED_MESSAGE or postrow.EDIT_REASON -->
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index d18508ccbc..9cfa93f880 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -273,16 +273,16 @@ $template->assign_vars(array(
'POST_IMG' => ($forum_data['forum_status'] == ITEM_LOCKED) ? $user->img('button_topic_locked', $post_alt) : $user->img('button_topic_new', $post_alt),
'NEWEST_POST_IMG' => $user->img('icon_topic_newest', 'VIEW_NEWEST_POST'),
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'),
- 'FOLDER_IMG' => $user->img('topic_read', 'NO_NEW_POSTS'),
- 'FOLDER_NEW_IMG' => $user->img('topic_unread', 'NEW_POSTS'),
- 'FOLDER_HOT_IMG' => $user->img('topic_read_hot', 'NO_NEW_POSTS_HOT'),
- 'FOLDER_HOT_NEW_IMG' => $user->img('topic_unread_hot', 'NEW_POSTS_HOT'),
- 'FOLDER_LOCKED_IMG' => $user->img('topic_read_locked', 'NO_NEW_POSTS_LOCKED'),
- 'FOLDER_LOCKED_NEW_IMG' => $user->img('topic_unread_locked', 'NEW_POSTS_LOCKED'),
+ 'FOLDER_IMG' => $user->img('topic_read', 'NO_UNREAD_POSTS'),
+ 'FOLDER_UNREAD_IMG' => $user->img('topic_unread', 'UNREAD_POSTS'),
+ 'FOLDER_HOT_IMG' => $user->img('topic_read_hot', 'NO_UNREAD_POSTS_HOT'),
+ 'FOLDER_HOT_UNREAD_IMG' => $user->img('topic_unread_hot', 'UNREAD_POSTS_HOT'),
+ 'FOLDER_LOCKED_IMG' => $user->img('topic_read_locked', 'NO_UNREAD_POSTS_LOCKED'),
+ 'FOLDER_LOCKED_UNREAD_IMG' => $user->img('topic_unread_locked', 'UNREAD_POSTS_LOCKED'),
'FOLDER_STICKY_IMG' => $user->img('sticky_read', 'POST_STICKY'),
- 'FOLDER_STICKY_NEW_IMG' => $user->img('sticky_unread', 'POST_STICKY'),
+ 'FOLDER_STICKY_UNREAD_IMG' => $user->img('sticky_unread', 'POST_STICKY'),
'FOLDER_ANNOUNCE_IMG' => $user->img('announce_read', 'POST_ANNOUNCEMENT'),
- 'FOLDER_ANNOUNCE_NEW_IMG' => $user->img('announce_unread', 'POST_ANNOUNCEMENT'),
+ 'FOLDER_ANNOUNCE_UNREAD_IMG'=> $user->img('announce_unread', 'POST_ANNOUNCEMENT'),
'FOLDER_MOVED_IMG' => $user->img('topic_moved', 'TOPIC_MOVED'),
'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
@@ -508,6 +508,7 @@ if (sizeof($shadow_topic_list))
'topic_moved_id' => $rowset[$orig_topic_id]['topic_moved_id'],
'topic_status' => $rowset[$orig_topic_id]['topic_status'],
'topic_type' => $rowset[$orig_topic_id]['topic_type'],
+ 'topic_title' => $rowset[$orig_topic_id]['topic_title'],
));
// Shadow topics are never reported
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 8e0521522d..8926d5a40b 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1513,7 +1513,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'EDIT_REASON' => $row['post_edit_reason'],
'BUMPED_MESSAGE' => $l_bumped_by,
- 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'UNREAD_POST') : $user->img('icon_post_target', 'POST'),
'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '',
'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '',
'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '',