aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-11-13 13:04:54 +0000
committerChris Smith <toonarmy@phpbb.com>2008-11-13 13:04:54 +0000
commitef0c0d4c82dadfb856357f6ae906263420d84791 (patch)
treeb3df38203ab6a4f77e493bd9eb74623655e23ce9 /phpBB
parent1739da933574ff2cd68120d7c6ac0dae914943a6 (diff)
downloadforums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar.gz
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar.bz2
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.tar.xz
forums-ef0c0d4c82dadfb856357f6ae906263420d84791.zip
been a while :( ... merge in r8997, r8998, r8999, r9000, r9001, r9002, r9003, r9004, r9005, r9007, r9008, r9009, r9010, r9011, r9012, r9013, r9014, r9015, r9022, r9023, r9029, r9030, r9034, r9048, r9049, r9054, r9056
git-svn-id: file:///svn/phpbb/trunk@9064 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/docs/coding-guidelines.html6
-rw-r--r--phpBB/includes/acp/acp_main.php2
-rw-r--r--phpBB/includes/acp/acp_styles.php2
-rw-r--r--phpBB/includes/acp/info/acp_email.php2
-rw-r--r--phpBB/includes/functions_posting.php4
-rw-r--r--phpBB/includes/mcp/mcp_forum.php2
-rw-r--r--phpBB/includes/mcp/mcp_front.php15
-rw-r--r--phpBB/includes/mcp/mcp_logs.php2
-rw-r--r--phpBB/includes/mcp/mcp_queue.php11
-rw-r--r--phpBB/includes/mcp/mcp_reports.php11
-rw-r--r--phpBB/includes/mcp/mcp_topic.php10
-rw-r--r--phpBB/includes/mcp/mcp_warn.php42
-rw-r--r--phpBB/includes/message_parser.php4
-rw-r--r--phpBB/includes/ucp/ucp_main.php5
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php2
-rw-r--r--phpBB/language/en/acp/common.php5
-rw-r--r--phpBB/language/en/common.php2
-rw-r--r--phpBB/language/en/ucp.php3
-rw-r--r--phpBB/mcp.php8
-rw-r--r--phpBB/memberlist.php16
-rw-r--r--phpBB/posting.php2
-rw-r--r--phpBB/styles/prosilver/template/mcp_front.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_header.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_post.html2
-rw-r--r--phpBB/styles/prosilver/template/mcp_warn_user.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_main_subscribed.html2
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_viewmessage.html2
-rw-r--r--phpBB/styles/prosilver/template/viewtopic_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_front.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_post.html2
-rw-r--r--phpBB/styles/subsilver2/template/mcp_warn_user.html2
-rw-r--r--phpBB/styles/subsilver2/template/ucp_main_subscribed.html2
-rw-r--r--phpBB/viewforum.php4
-rw-r--r--phpBB/viewtopic.php4
34 files changed, 139 insertions, 47 deletions
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 649ddc2988..942769b57a 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -517,7 +517,7 @@ switch ($mode)
break;
default:
- // Always assume that the case got not catched
+ // Always assume that a case was not caught
break;
}
</pre></div>
@@ -540,7 +540,7 @@ switch ($mode)
default:
- // Always assume that the case got not catched
+ // Always assume that a case was not caught
break;
}
@@ -568,7 +568,7 @@ switch ($mode)
default:
- // Always assume that the case got not catched
+ // Always assume that a case was not caught
break;
}
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index e122273284..caaeb31404 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -481,7 +481,7 @@ class acp_main
$template->assign_var('S_REMOVE_INSTALL', true);
}
- if (file_exists(PHPBB_ROOT_PATH . 'config.' . PHP_EXT) && is_writable(PHPBB_ROOT_PATH . 'config.' . PHP_EXT))
+ if (!defined('PHPBB_DISABLE_CONFIG_CHECK') && file_exists(PHPBB_ROOT_PATH . 'config.' . PHP_EXT) && is_writable(PHPBB_ROOT_PATH . 'config.' . PHP_EXT))
{
$template->assign_var('S_WRITABLE_CONFIG', true);
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 2fb4a80943..e205b15892 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -633,7 +633,7 @@ parse_css_file = {PARSE_CSS_FILE}
{
global $config, $db, $cache, $user, $template, $safe_mode;
- if (defined('DISABLE_ACP_EDITOR'))
+ if (defined('PHPBB_DISABLE_ACP_EDITOR'))
{
trigger_error($user->lang['EDITOR_DISABLED'] . adm_back_link($this->u_action));
}
diff --git a/phpBB/includes/acp/info/acp_email.php b/phpBB/includes/acp/info/acp_email.php
index f2270892e0..4ad7bca58b 100644
--- a/phpBB/includes/acp/info/acp_email.php
+++ b/phpBB/includes/acp/info/acp_email.php
@@ -20,7 +20,7 @@ class acp_email_info
'title' => 'ACP_MASS_EMAIL',
'version' => '1.0.0',
'modes' => array(
- 'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email', 'cat' => array('ACP_GENERAL_TASKS')),
+ 'email' => array('title' => 'ACP_MASS_EMAIL', 'auth' => 'acl_a_email && cfg_email_enable', 'cat' => array('ACP_GENERAL_TASKS')),
),
);
}
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index ad24758aee..635f6f80c5 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1603,7 +1603,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$post_approval = 1;
// Check the permissions for post approval, as well as the queue trigger where users are put on approval with a post count lower than specified. Moderators are not affected.
- if (($config['enable_queue_trigger'] && $user->data['user_posts'] < $config['queue_trigger_posts'] && !$auth->acl_get('m_approve', $data['forum_id'])) || !$auth->acl_get('f_noapprove', $data['forum_id']))
+ if ((($config['enable_queue_trigger'] && $user->data['user_posts'] < $config['queue_trigger_posts']) || !$auth->acl_get('f_noapprove', $data['forum_id'])) && !$auth->acl_get('m_approve', $data['forum_id']))
{
$post_approval = 0;
}
@@ -2101,7 +2101,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// we need to update the last forum information
// only applicable if the topic is not global and it is approved
// we also check to make sure we are not dealing with globaling the latest topic (pretty rare but still needs to be checked)
- if ($topic_type != POST_GLOBAL && !$make_global && ($post_approved || !$data['post_approved']))
+ if ($topic_type != POST_GLOBAL && !$make_global && ($post_approved != $data['post_approved']))
{
// the last post makes us update the forum table. This can happen if...
// We make a new topic
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 568239b000..66a2e2ad9d 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -245,7 +245,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
'LAST_POST_SUBJECT' => $row['topic_last_post_subject'],
'LAST_VIEW_TIME' => $user->format_date($row['topic_last_view_time']),
- 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
+ 'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && empty($row['topic_moved_id']) && $auth->acl_get('m_report', $row['forum_id'])) ? true : false,
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
'S_POSTS_UNAPPROVED' => $posts_unapproved,
'S_UNREAD_TOPIC' => $unread_topic,
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php
index 4905640754..4b229c616f 100644
--- a/phpBB/includes/mcp/mcp_front.php
+++ b/phpBB/includes/mcp/mcp_front.php
@@ -26,7 +26,7 @@ function mcp_front_view($id, $mode, $action)
// Latest 5 unapproved
if ($module->loaded('queue'))
{
- $forum_list = get_forum_list('m_approve');
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_approve')));
$post_list = array();
$forum_names = array();
@@ -80,7 +80,7 @@ function mcp_front_view($id, $mode, $action)
if ($total)
{
- $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
+ $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, u.user_colour, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u
WHERE ' . $db->sql_in_set('p.post_id', $post_list) . '
AND t.topic_id = p.topic_id
@@ -102,12 +102,15 @@ function mcp_front_view($id, $mode, $action)
'U_MCP_TOPIC' => append_sid('mcp', 'i=main&amp;mode=topic_view&amp;f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_FORUM' => (!$global_topic) ? append_sid('viewforum', 'f=' . $row['forum_id']) : '',
'U_TOPIC' => append_sid('viewtopic', 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
- 'U_AUTHOR' => ($row['poster_id'] == ANONYMOUS) ? '' : append_sid('memberlist', 'mode=viewprofile&amp;u=' . $row['poster_id']),
+
+ 'AUTHOR_FULL' => get_username_string('full', $row['poster_id'], $row['username'], $row['user_colour']),
+ 'AUTHOR' => get_username_string('username', $row['poster_id'], $row['username'], $row['user_colour']),
+ 'AUTHOR_COLOUR' => get_username_string('colour', $row['poster_id'], $row['username'], $row['user_colour']),
+ 'U_AUTHOR' => get_username_string('profile', $row['poster_id'], $row['username'], $row['user_colour']),
'FORUM_NAME' => (!$global_topic) ? $forum_names[$row['forum_id']] : $user->lang['GLOBAL_ANNOUNCEMENT'],
'POST_ID' => $row['post_id'],
'TOPIC_TITLE' => $row['topic_title'],
- 'AUTHOR' => ($row['poster_id'] == ANONYMOUS) ? (($row['post_username']) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],
'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'],
'POST_TIME' => $user->format_date($row['post_time']))
);
@@ -139,7 +142,7 @@ function mcp_front_view($id, $mode, $action)
// Latest 5 reported
if ($module->loaded('reports'))
{
- $forum_list = get_forum_list('m_report');
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_report')));
$template->assign_var('S_SHOW_REPORTS', (!empty($forum_list)) ? true : false);
@@ -242,7 +245,7 @@ function mcp_front_view($id, $mode, $action)
// Latest 5 logs
if ($module->loaded('logs'))
{
- $forum_list = get_forum_list('m_');
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
if (!empty($forum_list))
{
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 3816d2eb17..22b413279f 100644
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -62,7 +62,7 @@ class mcp_logs
$this->tpl_name = 'mcp_logs';
$this->page_title = 'MCP_LOGS';
- $forum_list = get_forum_list('m_');
+ $forum_list = array_values(array_intersect(get_forum_list('f_read'), get_forum_list('m_')));
$forum_list[] = 0;
$forum_id = $topic_id = 0;
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 3ada0539f1..48bcd044f5 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -242,6 +242,17 @@ class mcp_queue
}
$forum_list_approve = get_forum_list('m_approve', false, true);
+ $forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
+
+ // Remove forums we cannot read
+ foreach ($forum_list_approve as $k => $forum_data)
+ {
+ if (!isset($forum_list_read[$forum_data['forum_id']]))
+ {
+ unset($forum_list_approve[$k]);
+ }
+ }
+ unset($forum_list_read);
if (!$forum_id)
{
diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php
index df6c399abb..7e6bae1dc1 100644
--- a/phpBB/includes/mcp/mcp_reports.php
+++ b/phpBB/includes/mcp/mcp_reports.php
@@ -246,6 +246,17 @@ class mcp_reports
$forum_info = array();
$forum_list_reports = get_forum_list('m_report', false, true);
+ $forum_list_read = array_flip(get_forum_list('f_read', true, true)); // Flipped so we can isset() the forum IDs
+
+ // Remove forums we cannot read
+ foreach ($forum_list_reports as $k => $forum_data)
+ {
+ if (!isset($forum_list_read[$forum_data['forum_id']]))
+ {
+ unset($forum_list_reports[$k]);
+ }
+ }
+ unset($forum_list_read);
if ($topic_id && $forum_id)
{
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 83f2aaf8d1..18aacd53a9 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -113,11 +113,18 @@ function mcp_topic_view($id, $mode, $action)
{
$posts_per_page = $total;
}
+
if ((!empty($sort_days_old) && $sort_days_old != $sort_days) || $total <= $posts_per_page)
{
$start = 0;
}
+ // Make sure $start is set to the last page if it exceeds the amount
+ if ($start < 0 || $start >= $total)
+ {
+ $start = ($start < 0) ? 0 : floor(($total - 1) / $posts_per_page) * $posts_per_page;
+ }
+
$sql = 'SELECT u.username, u.username_clean, u.user_colour, p.*
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
@@ -492,6 +499,9 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$success_msg = 'TOPIC_SPLIT_SUCCESS';
+ // Update forum statistics
+ set_config('num_topics', $config['num_topics'] + 1, true);
+
// Link back to both topics
$return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $post_info['forum_id'] . '&amp;t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid('viewtopic', 'f=' . $to_forum_id . '&amp;t=' . $to_topic_id) . '">', '</a>');
}
diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php
index 4d38d05b57..d91b8b690a 100644
--- a/phpBB/includes/mcp/mcp_warn.php
+++ b/phpBB/includes/mcp/mcp_warn.php
@@ -245,6 +245,25 @@ class mcp_warn
$this->u_action .= "&amp;f=$forum_id&amp;p=$post_id";
}
+ // Check if can send a notification
+ if ($config['allow_privmsg'])
+ {
+ $auth2 = new auth();
+ $auth2->acl($user_row);
+ $s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
+ unset($auth2);
+ }
+ else
+ {
+ $s_can_notify = false;
+ }
+
+ // Prevent against clever people
+ if ($notify && !$s_can_notify)
+ {
+ $notify = false;
+ }
+
if ($warning && $action == 'add_warning')
{
if (check_form_key('mcp_warn'))
@@ -303,6 +322,8 @@ class mcp_warn
'RANK_IMG' => $rank_img,
'L_WARNING_POST_DEFAULT' => sprintf($user->lang['WARNING_POST_DEFAULT'], generate_board_url() . '/viewtopic.' . PHP_EXT . "?f=$forum_id&amp;p=$post_id#p$post_id"),
+
+ 'S_CAN_NOTIFY' => $s_can_notify,
));
}
@@ -347,6 +368,25 @@ class mcp_warn
$this->u_action .= "&amp;u=$user_id";
}
+ // Check if can send a notification
+ if ($config['allow_privmsg'])
+ {
+ $auth2 = new auth();
+ $auth2->acl($user_row);
+ $s_can_notify = ($auth2->acl_get('u_readpm')) ? true : false;
+ unset($auth2);
+ }
+ else
+ {
+ $s_can_notify = false;
+ }
+
+ // Prevent against clever people
+ if ($notify && !$s_can_notify)
+ {
+ $notify = false;
+ }
+
if ($warning && $action == 'add_warning')
{
if (check_form_key('mcp_warn'))
@@ -385,6 +425,8 @@ class mcp_warn
'AVATAR_IMG' => $avatar_img,
'RANK_IMG' => $rank_img,
+
+ 'S_CAN_NOTIFY' => $s_can_notify,
));
return $user_id;
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index d3b0c87c9a..abcab9c000 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -604,10 +604,10 @@ class bbcode_firstpass extends bbcode
$out .= array_pop($list_end_tags) . ']';
$tok = '[';
}
- else if (preg_match('#^list(=[0-9a-z])?$#i', $buffer, $m))
+ else if (preg_match('#^list(=[0-9a-z]+)?$#i', $buffer, $m))
{
// sub-list, add a closing tag
- if (empty($m[1]) || preg_match('/^(?:disc|square|circle)$/i', $m[1]))
+ if (empty($m[1]) || preg_match('/^=(?:disc|square|circle)$/i', $m[1]))
{
array_push($list_end_tags, '/list:u:' . $this->bbcode_uid);
}
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php
index da110e4ac6..b52878509e 100644
--- a/phpBB/includes/ucp/ucp_main.php
+++ b/phpBB/includes/ucp/ucp_main.php
@@ -237,7 +237,10 @@ class ucp_main
$l_unwatch .= '_TOPICS';
}
$msg = $user->lang['UNWATCHED' . $l_unwatch];
-
+ }
+ else
+ {
+ $msg = $user->lang['NO_WATCHED_SELECTED'];
}
}
else
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 05cda4d6b9..f236baa456 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -457,7 +457,7 @@ function phpbb_get_birthday($birthday = '')
}
// The birthday mod from niels is using this code to transform to day/month/year
- return gmdate('d-m-Y', $birthday * 86400 + 1);
+ return sprintf('%2d-%2d-%4d', gmdate('n', $birthday * 86400 + 1), gmdate('j', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1));
}
}
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 146cc7a654..8b936979ed 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -689,9 +689,4 @@ $lang = array_merge($lang, array(
'LOG_WORD_EDIT' => '<strong>Edited word censor</strong><br />ยป %s',
));
-// Two language keys with the same text were used in different locations
-// LOG_DELETE_TOPIC is the correct one, this line is here so that existing
-// log entries are not broken. Ensure it is included in your language file.
-$lang['LOG_TOPIC_DELETED'] = $lang['LOG_DELETE_TOPIC'];
-
?> \ No newline at end of file
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index cc8859d851..7c8de35264 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -545,7 +545,7 @@ $lang = array_merge($lang, array(
'THE_TEAM' => 'The team',
'TIME' => 'Time',
- 'TOO_LONG' => 'The value you entered is too long',
+ 'TOO_LONG' => 'The value you entered is too long.',
'TOO_LONG_AIM' => 'The screenname you entered is too long.',
'TOO_LONG_CONFIRM_CODE' => 'The confirm code you entered is too long.',
diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php
index 3cf8d8cce3..f18ebbaf8b 100644
--- a/phpBB/language/en/ucp.php
+++ b/phpBB/language/en/ucp.php
@@ -292,7 +292,7 @@ $lang = array_merge($lang, array(
'NO_AUTH_READ_HOLD_MESSAGE' => 'You are not authorised to read private messages that are on hold.',
'NO_AUTH_READ_MESSAGE' => 'You are not authorised to read private messages.',
'NO_AUTH_READ_REMOVED_MESSAGE' => 'You are not able to read this message because it was removed by the author.',
- 'NO_AUTH_SEND_MESSAGE' => 'You are not authorised sending private messages.',
+ 'NO_AUTH_SEND_MESSAGE' => 'You are not authorised to send private messages.',
'NO_AUTH_SIGNATURE' => 'You are not authorised to define a signature.',
'NO_BCC_RECIPIENT' => 'None',
@@ -316,6 +316,7 @@ $lang = array_merge($lang, array(
'NO_SAVED_DRAFTS' => 'No drafts saved.',
'NO_TO_RECIPIENT' => 'None',
'NO_WATCHED_FORUMS' => 'You are not subscribed to any forums.',
+ 'NO_WATCHED_SELECTED' => 'You have not selected any subscribed topics or forums.',
'NO_WATCHED_TOPICS' => 'You are not subscribed to any topics.',
'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$d and %2$d characters long, must contain letters in mixed case and must contain numbers.',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 2632ec21e5..299e8332ab 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -612,7 +612,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(post_id) AS total
FROM ' . POSTS_TABLE . "
- $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_approve')) . '
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
AND post_approved = 0';
if ($min_time)
@@ -628,7 +628,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(topic_id) AS total
FROM ' . TOPICS_TABLE . "
- $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_approve')) . '
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_approve'))) . '
AND topic_approved = 0';
if ($min_time)
@@ -654,7 +654,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
}
else
{
- $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list('!m_report'), true, true);
+ $where_sql .= ' ' . $db->sql_in_set('p.forum_id', get_forum_list(array('!f_read', '!m_report')), true, true);
}
if ($mode == 'reports')
@@ -680,7 +680,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql,
$sql = 'SELECT COUNT(log_id) AS total
FROM ' . LOG_TABLE . "
- $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : get_forum_list('m_')) . '
+ $where_sql " . $db->sql_in_set('forum_id', ($forum_id) ? array($forum_id) : array_intersect(get_forum_list('f_read'), get_forum_list('m_'))) . '
AND log_time >= ' . $min_time . '
AND log_type = ' . LOG_MOD;
break;
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 7ae305f90f..b8de2ee2d6 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -942,10 +942,13 @@ switch ($mode)
$field = request_var('field', '');
$select_single = request_var('select_single', false);
+ // Search URL parameters, if any of these are in the URL we do a search
+ $search_params = array('username', 'email', 'icq', 'aim', 'yahoo', 'msn', 'jabber', 'search_group_id', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'ip');
+
// We validate form and field here, only id/class allowed
$form = (!preg_match('/^[a-z0-9_-]+$/i', $form)) ? '' : $form;
$field = (!preg_match('/^[a-z0-9_-]+$/i', $field)) ? '' : $field;
- if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
+ if (($mode == 'searchuser' || sizeof(array_intersect(array_keys($_GET), $search_params)) > 0) && ($config['load_search'] || $auth->acl_get('a_')))
{
$username = request_var('username', '', true);
$email = strtolower(request_var('email', ''));
@@ -1249,14 +1252,17 @@ switch ($mode)
$sort_params[] = $param;
}
}
- $u_hide_find_member = append_sid('memberlist', "start=$start" . implode('&amp;', $params));
+ $u_hide_find_member = append_sid('memberlist', "start=$start" . (!empty($params) ? '&amp;' . implode('&amp;', $params) : ''));
- $params[] = "mode=$mode";
+ if ($mode)
+ {
+ $params[] = "mode=$mode";
+ }
$sort_params[] = "mode=$mode";
$pagination_url = append_sid('memberlist', implode('&amp;', $params));
$sort_url = append_sid('memberlist', implode('&amp;', $sort_params));
- unset($params, $sort_params);
+ unset($search_params, $sort_params);
// Some search user specific data
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
@@ -1463,7 +1469,7 @@ switch ($mode)
'JABBER_IMG' => $user->img('icon_contact_jabber', $user->lang['JABBER']),
'SEARCH_IMG' => $user->img('icon_user_search', $user->lang['SEARCH']),
- 'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid('memberlist', 'mode=searchuser' . (($start) ? "&amp;start=$start" : '')) : '',
+ 'U_FIND_MEMBER' => ($config['load_search'] || $auth->acl_get('a_')) ? append_sid('memberlist', 'mode=searchuser' . (($start) ? "&amp;start=$start" : '') . (!empty($params) ? '&amp;' . implode('&amp;', $params) : '')) : '',
'U_HIDE_FIND_MEMBER' => ($mode == 'searchuser') ? $u_hide_find_member : '',
'U_SORT_USERNAME' => $sort_url . '&amp;sk=a&amp;sd=' . (($sort_key == 'a' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_FROM' => $sort_url . '&amp;sk=b&amp;sd=' . (($sort_key == 'b' && $sort_dir == 'a') ? 'd' : 'a'),
diff --git a/phpBB/posting.php b/phpBB/posting.php
index 32b03fb2f3..9aec127873 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -999,7 +999,7 @@ if ($submit || $preview || $refresh)
$captcha->reset();
}
// Check the permissions for post approval, as well as the queue trigger where users are put on approval with a post count lower than specified. Moderators are not affected.
- if (($config['enable_queue_trigger'] && $user->data['user_posts'] < $config['queue_trigger_posts'] && !$auth->acl_get('m_approve', $data['forum_id'])) || !$auth->acl_get('f_noapprove', $data['forum_id']))
+ if ((($config['enable_queue_trigger'] && $user->data['user_posts'] < $config['queue_trigger_posts']) || !$auth->acl_get('f_noapprove', $data['forum_id'])) && !$auth->acl_get('m_approve', $data['forum_id']))
{
meta_refresh(10, $redirect_url);
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
diff --git a/phpBB/styles/prosilver/template/mcp_front.html b/phpBB/styles/prosilver/template/mcp_front.html
index a186d95970..484179e2ac 100644
--- a/phpBB/styles/prosilver/template/mcp_front.html
+++ b/phpBB/styles/prosilver/template/mcp_front.html
@@ -29,7 +29,7 @@
<dt>
<a href="{unapproved.U_POST_DETAILS}" class="topictitle">{unapproved.SUBJECT}</a> {unapproved.ATTACH_ICON_IMG}<br />
<!-- IF report.PAGINATION --><strong class="pagination"><span>{report.PAGINATION}</span></strong><!-- ENDIF -->
- {L_POSTED} {L_POST_BY_AUTHOR} <!-- IF unapproved.U_AUTHOR --><a href="{unapproved.U_AUTHOR}">{unapproved.AUTHOR}</a><!-- ELSE -->{unapproved.AUTHOR}<!-- ENDIF --> {L_POSTED_ON_DATE} {unapproved.POST_TIME}
+ {L_POSTED} {L_POST_BY_AUTHOR} {unapproved.AUTHOR_FULL} {L_POSTED_ON_DATE} {unapproved.POST_TIME}
</dt>
<dd class="moderation"><span>
{L_TOPIC}: <a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a> [<a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a>]<br />
diff --git a/phpBB/styles/prosilver/template/mcp_header.html b/phpBB/styles/prosilver/template/mcp_header.html
index 9af0f4c4e6..13cc7e12cf 100644
--- a/phpBB/styles/prosilver/template/mcp_header.html
+++ b/phpBB/styles/prosilver/template/mcp_header.html
@@ -45,7 +45,7 @@
<!-- IF MESSAGE -->
<div class="content">
<h2>{L_MESSAGE}</h2>
- <p>{MESSAGE}</p>
+ <p class="error">{MESSAGE}</p>
<p><!-- BEGIN return_links -->{return_links.MESSAGE_LINK}<br /><br /><!-- END return_links --></p>
</div>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/mcp_warn_post.html b/phpBB/styles/prosilver/template/mcp_warn_post.html
index 5937598a52..d09209f5a4 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_post.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_post.html
@@ -52,11 +52,13 @@
<fieldset>
<textarea name="warning" id="warning" class="inputbox" cols="40" rows="3">{L_WARNING_POST_DEFAULT}</textarea>
+ <!-- IF S_CAN_NOTIFY -->
<br /><br />
<dl class="panel">
<dt>&nbsp;</dt>
<dd><label><input type="checkbox" name="notify_user" checked="checked" /> {L_NOTIFY_USER_WARN}</label></dd>
</dl>
+ <!-- ENDIF -->
</fieldset>
<span class="corners-bottom"><span></span></span></div>
diff --git a/phpBB/styles/prosilver/template/mcp_warn_user.html b/phpBB/styles/prosilver/template/mcp_warn_user.html
index c807a6b640..5b5156f3a1 100644
--- a/phpBB/styles/prosilver/template/mcp_warn_user.html
+++ b/phpBB/styles/prosilver/template/mcp_warn_user.html
@@ -36,11 +36,13 @@
<fieldset>
<textarea name="warning" id="warning" class="inputbox" cols="40" rows="3"></textarea>
+ <!-- IF S_CAN_NOTIFY -->
<br /><br />
<dl class="panel">
<dt>&nbsp;</dt>
<dd><label><input type="checkbox" name="notify_user" checked="checked" /> {L_NOTIFY_USER_WARN}</label></dd>
</dl>
+ <!-- ENDIF -->
</fieldset>
<span class="corners-bottom"><span></span></span></div>
diff --git a/phpBB/styles/prosilver/template/ucp_main_subscribed.html b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
index f2cd843a6b..582ee37459 100644
--- a/phpBB/styles/prosilver/template/ucp_main_subscribed.html
+++ b/phpBB/styles/prosilver/template/ucp_main_subscribed.html
@@ -80,7 +80,7 @@
<!-- IF .topicrow or .forumrow -->
<fieldset class="display-actions">
<input type="submit" name="unwatch" value="{L_UNWATCH_MARKED}" class="button2" />
- <div><a href="#" onclick="marklist('ucp', 't', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 't', false); return false;">{L_UNMARK_ALL}</a></div>
+ <div><a href="#" onclick="marklist('ucp', 't', true); marklist('ucp', 'f', true); return false;">{L_MARK_ALL}</a> &bull; <a href="#" onclick="marklist('ucp', 't', false); marklist('ucp', 'f', false); return false;">{L_UNMARK_ALL}</a></div>
{S_FORM_TOKEN}
</fieldset>
<!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
index ebb4514a29..535641f33b 100644
--- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
+++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html
@@ -71,7 +71,7 @@
<!-- IF AUTHOR_JOINED --><dd><strong>{L_JOINED}:</strong> {AUTHOR_JOINED}</dd><!-- ENDIF -->
<!-- IF AUTHOR_FROM --><dd><strong>{L_LOCATION}:</strong> {AUTHOR_FROM}</dd><!-- ENDIF -->
- <!-- IF U_PM or U_EMAIL or U_WWW or U_MSN or U_ICQ or U_YIM or U_AIM -->
+ <!-- IF U_PM or U_EMAIL or U_WWW or U_MSN or U_ICQ or U_YIM or U_AIM or U_JABBER -->
<dd>
<ul class="profile-icons">
<!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
diff --git a/phpBB/styles/prosilver/template/viewtopic_body.html b/phpBB/styles/prosilver/template/viewtopic_body.html
index 5231d7934f..d949ba55e3 100644
--- a/phpBB/styles/prosilver/template/viewtopic_body.html
+++ b/phpBB/styles/prosilver/template/viewtopic_body.html
@@ -196,7 +196,7 @@
<!-- END custom_fields -->
<!-- IF not S_IS_BOT -->
- <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_WWW or postrow.U_MSN or postrow.U_ICQ or postrow.U_YIM or postrow.U_AIM -->
+ <!-- IF postrow.U_PM or postrow.U_EMAIL or postrow.U_WWW or postrow.U_MSN or postrow.U_ICQ or postrow.U_YIM or postrow.U_AIM or postrow.U_JABBER -->
<dd>
<ul class="profile-icons">
<!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
diff --git a/phpBB/styles/subsilver2/template/mcp_front.html b/phpBB/styles/subsilver2/template/mcp_front.html
index 122f5283ae..029ba3cb3c 100644
--- a/phpBB/styles/subsilver2/template/mcp_front.html
+++ b/phpBB/styles/subsilver2/template/mcp_front.html
@@ -20,7 +20,7 @@
<td class="row1" width="15%" valign="top"><span class="gen"><!-- IF unapproved.U_FORUM --><a href="{unapproved.U_FORUM}">{unapproved.FORUM_NAME}</a><!-- ELSE -->{unapproved.FORUM_NAME}<!-- ENDIF --></span><!-- IF unapproved.U_MCP_FORUM --><br /><span class="gensmall">[ <a href="{unapproved.U_MCP_FORUM}">{L_MODERATE}</a> ]</span><!-- ENDIF --></td>
<td class="row2" valign="top"><span class="gen"><a href="{unapproved.U_TOPIC}">{unapproved.TOPIC_TITLE}</a></span><br /><span class="gensmall">[ <a href="{unapproved.U_MCP_TOPIC}">{L_MODERATE}</a> ]</span></td>
<td class="row1" valign="top"><span class="gen">{unapproved.SUBJECT}</span><br /><span class="gensmall">[ <a href="{unapproved.U_POST_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td>
- <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen"><!-- IF unapproved.U_AUTHOR --><a href="{unapproved.U_AUTHOR}">{unapproved.AUTHOR}</a><!-- ELSE -->{unapproved.AUTHOR}<!-- ENDIF --></span></td>
+ <td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{unapproved.AUTHOR_FULL}</span></td>
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{unapproved.POST_TIME}</span></td>
<td class="row2" align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{unapproved.POST_ID}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_post.html b/phpBB/styles/subsilver2/template/mcp_warn_post.html
index 1ad5757f15..ef0595e48e 100644
--- a/phpBB/styles/subsilver2/template/mcp_warn_post.html
+++ b/phpBB/styles/subsilver2/template/mcp_warn_post.html
@@ -45,9 +45,11 @@
<tr>
<td class="row1" align="center"><textarea name="warning" rows="10" cols="76">{L_WARNING_POST_DEFAULT}</textarea></td>
</tr>
+<!-- IF S_CAN_NOTIFY -->
<tr>
<td class="row1" align="center"><input type="checkbox" class="radio" name="notify_user" checked="checked" /><span class="genmed">{L_NOTIFY_USER_WARN}</span></td>
</tr>
+<!-- ENDIF -->
<tr>
<td class="cat" align="center"><input class="btnmain" type="submit" name="action[add_warning]" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/mcp_warn_user.html b/phpBB/styles/subsilver2/template/mcp_warn_user.html
index 5e8c350935..bb77c91654 100644
--- a/phpBB/styles/subsilver2/template/mcp_warn_user.html
+++ b/phpBB/styles/subsilver2/template/mcp_warn_user.html
@@ -58,9 +58,11 @@
<tr>
<td class="row1" align="center"><textarea name="warning" rows="10" cols="76"></textarea></td>
</tr>
+<!-- IF S_CAN_NOTIFY -->
<tr>
<td class="row1" align="center"><input type="checkbox" class="radio" name="notify_user" checked="checked" /><span class="genmed">{L_NOTIFY_USER_WARN}</span></td>
</tr>
+<!-- ENDIF -->
<tr>
<td class="cat" align="center"><input class="btnmain" type="submit" name="action[add_warning]" value="{L_SUBMIT}" />&nbsp;&nbsp;<input class="btnlite" type="reset" value="{L_RESET}" /></td>
</tr>
diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
index 844a90f3e6..9335d01f12 100644
--- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
+++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html
@@ -78,7 +78,7 @@
<!-- ENDIF -->
</table>
<!-- IF .topicrow or .forumrow -->
-<div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="marklist('ucp', 't', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 't', false); return false;">{L_UNMARK_ALL}</a></b></div>
+<div class="gensmall" style="float: {S_CONTENT_FLOW_END}; padding-top: 2px;"><b><a href="#" onclick="marklist('ucp', 't', true); marklist('ucp', 'f', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('ucp', 't', false);marklist('ucp', 'f', false); return false;">{L_UNMARK_ALL}</a></b></div>
<!-- ENDIF -->
<!-- INCLUDE ucp_footer.html --> \ No newline at end of file
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 1d851edb3e..ae40b92349 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -506,9 +506,11 @@ 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_reported' => $rowset[$orig_topic_id]['topic_reported'],
));
+ // Shadow topics are never reported
+ $row['topic_reported'] = 0;
+
$rowset[$orig_topic_id] = $row;
}
$db->sql_freeresult($result);
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 307a8c0854..de64de5734 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -446,7 +446,7 @@ if ($hilit_words)
}
// Make sure $start is set to the last page if it exceeds the amount
-if ($start < 0 || $start > $total_posts)
+if ($start < 0 || $start >= $total_posts)
{
$start = ($start < 0) ? 0 : floor(($total_posts - 1) / $config['posts_per_page']) * $config['posts_per_page'];
}
@@ -820,7 +820,7 @@ if (!empty($topic_data['poll_start']))
foreach ($poll_info as $poll_option)
{
$option_pct = ($poll_total > 0) ? $poll_option['poll_option_total'] / $poll_total : 0;
- $option_pct_txt = sprintf("%.1d%%", ($option_pct * 100));
+ $option_pct_txt = sprintf("%.1d%%", round($option_pct * 100));
$template->assign_block_vars('poll_option', array(
'POLL_OPTION_ID' => $poll_option['poll_option_id'],