diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index c5d3ca86a7..e7570d1169 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -197,16 +197,16 @@ p a {
[Fix] Proper sync of data on topic copy (Bug #11335)
[Fix] Introduced ORDER BY clauses to converter queries (Bug #10697)
[Fix] Stopped bots from getting added to the registered users group during conversion (Bug #11283)
- [Fix] Filled "SMILIEYS_DISABLED" template variable (Bug #11257)
+ [Fix] Filled "SMILIEYS_DISABLED" template variable (Bug #11257)
[Fix] Properly escaped the delimiter in disallowed username comparisons (Bug #11339)
[Fix] Check global purge setting (Bug #11555)
[Fix] Improper magic url parsing applied to already parsed [url=] bbcode tag (Bug #11429)
[Fix] Renamed two indicies for Oracle support (Bug #11457)
[Fix] Added support for ISO-8859-8(-i) in the character set convertor (Bug #11265, #12039)
- [Fix] Added support for Oracle's "easy connect naming"
+ [Fix] Added support for Oracle's "easy connect naming"
[Fix] Let Mark/Unmark All work in Manage Drafts (Bug #11679)
[Fix] Display correct message if no attachments found in user administration (Bug #11629)
- [Fix] Let the "Delete all board cookies" being displayed for guests too (only prosilver) (Bug #11603)
+ [Fix] Let the "Delete all board cookies" being displayed for guests too (only prosilver) (Bug #11603)
[Fix] Do not display view topic link in MCP while there is no link present (Bug #11573)
[Fix] MySQL now properly sorts by post_subject (Bug #11637)
[Fix] Introduced checks to stop negative postcounts (Bug #11561, #11421)
@@ -262,6 +262,13 @@ p a {
[Fix] Set the Admin group as founder_manage during conversion (Bug #12287)
[Fix] Fixed a special quote BBCode case (Bug #12189)
[Fix] Correctly parse BBCodes in a post when a poll is being used (Bug #11833)
+ [Fix] Remember attached files on PM edit (Bug #12019)
+ [Fix] Correctly display poll ending on preview (Bug #12303)
+ [Feature] Display the success message on posting longer for posts awaiting approval (Bug #12053)
+ [Fix] Display maximum and entered number of characters for the "maximum number of characters exceeded" error messages (Bug #11981)
+ [Fix] Wrongly applied setting for allowing links in private messages (used the signature setting instead of the post setting) (Bug #11945)
+ [Fix] Unread flag for multipage topic wrongly set under some conditions (Bug #12127) - fix provided by asinshesq
+ [Fix] Able to delete posts within user prune panel (Bug #11849)
diff --git a/phpBB/includes/acp/acp_prune.php b/phpBB/includes/acp/acp_prune.php
index e4defd9d42..7405a271ed 100644
--- a/phpBB/includes/acp/acp_prune.php
+++ b/phpBB/includes/acp/acp_prune.php
@@ -230,6 +230,7 @@ class acp_prune
if ($prune)
{
$action = request_var('action', 'deactivate');
+ $deleteposts = request_var('deleteposts', 0);
if (confirm_box(true))
{
@@ -361,7 +362,6 @@ class acp_prune
global $user, $db;
$users = request_var('users', '', true);
- $deleteposts = request_var('deleteposts', 0);
if ($users)
{
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index fc1e173600..b096c7319e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1272,7 +1272,7 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
WHERE t.forum_id = ' . $forum_id . '
AND t.topic_last_post_time > ' . $mark_time_forum . '
AND t.topic_moved_id = 0
- AND tt.topic_id IS NULL
+ AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)
GROUP BY t.forum_id';
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index b87cf31d04..92e636af01 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -420,7 +420,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
}
$template->assign_vars(array(
- 'U_MARK_FORUMS' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $root_data['forum_id'] . '&mark=forums'),
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $root_data['forum_id'] . '&mark=forums') : '',
'S_HAS_SUBFORUM' => ($visible_forums) ? true : false,
'L_SUBFORUM' => ($visible_forums == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'],
'LAST_POST_IMG' => $user->img('icon_topic_latest', 'VIEW_LATEST_POST'))
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 8b043271bc..1a70a7fd80 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -367,7 +367,7 @@ class bbcode_firstpass extends bbcode
* Parse code text from code tag
* @private
*/
- function bbcode_parse_code($stx, $code)
+ function bbcode_parse_code($stx, &$code)
{
switch (strtolower($stx))
{
@@ -1041,7 +1041,7 @@ class parse_message extends bbcode_firstpass
if ((!$msg_len && $mode !== 'sig') || $config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars'])
{
- $this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : $user->lang['TOO_MANY_CHARS'];
+ $this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $msg_len, $config['max_' . $mode . '_chars']);
return $this->warn_msg;
}
}
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 6718094c75..105dda1d8c 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -245,7 +245,7 @@ function compose_pm($id, $mode, $action)
$enable_urls = $post['enable_magic_url'];
$enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
- $message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
+ $message_attachment = (isset($post['message_attachment'])) ? $post['message_attachment'] : 0;
$message_subject = $post['message_subject'];
$message_time = $post['message_time'];
$bbcode_uid = $post['bbcode_uid'];
@@ -538,7 +538,7 @@ function compose_pm($id, $mode, $action)
}
// Parse message
- $message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_sig_links']);
+ $message_parser->parse($enable_bbcode, ($config['allow_post_links']) ? $enable_urls : false, $enable_smilies, $img_status, $flash_status, true, $config['allow_post_links']);
// On a refresh we do not care about message parsing errors
if (sizeof($message_parser->warn_msg) && !$refresh)
@@ -929,7 +929,7 @@ function compose_pm($id, $mode, $action)
'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '',
'S_LINKS_ALLOWED' => $url_status,
'S_MAGIC_URL_CHECKED' => ($urls_checked) ? ' checked="checked"' : '',
- 'S_SAVE_ALLOWED' => $auth->acl_get('u_savedrafts'),
+ 'S_SAVE_ALLOWED' => ($auth->acl_get('u_savedrafts') && $action != 'edit') ? true : false,
'S_HAS_DRAFTS' => ($auth->acl_get('u_savedrafts') && $drafts),
'S_FORM_ENCTYPE' => $form_enctype,
diff --git a/phpBB/index.php b/phpBB/index.php
index 209bcfc2bd..56840df70f 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -116,7 +116,7 @@ $template->assign_vars(array(
'S_LOGIN_ACTION' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false,
- 'U_MARK_FORUMS' => append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums'),
+ 'U_MARK_FORUMS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}index.$phpEx", 'mark=forums') : '',
'U_MCP' => ($auth->acl_get('m_') || $auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=front', true, $user->session_id) : '')
);
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index ef3f2fb985..37334c961a 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -183,6 +183,8 @@ $lang = array_merge($lang, array(
'TOO_FEW_POLL_OPTIONS' => 'You must enter at least two poll options.',
'TOO_MANY_ATTACHMENTS' => 'Cannot add another attachment, %d is the maximum.',
'TOO_MANY_CHARS' => 'Your message contains too many characters.',
+ 'TOO_MANY_CHARS_POST' => 'Your message contains %1$d characters. The maximum number of allowed characters is %2$d.',
+ 'TOO_MANY_CHARS_SIG' => 'Your signature contains %1$d characters. The maximum number of allowed characters is %2$d.',
'TOO_MANY_POLL_OPTIONS' => 'You have tried to enter too many poll options.',
'TOO_MANY_SMILIES' => 'Your message contains too many smilies. The maximum number of smilies allowed is %d.',
'TOO_MANY_URLS' => 'Your message contains too many URLs. The maximum number of URLs allowed is %d.',
diff --git a/phpBB/posting.php b/phpBB/posting.php
index eb6483ffd3..7524ef41a5 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -975,11 +975,22 @@ if ($submit || $preview || $refresh)
unset($message_parser);
$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message);
+ $post_need_approval = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? true : false;
- meta_refresh(3, $redirect_url);
+ // If the post need approval we will wait a lot longer.
+ if ($post_need_approval)
+ {
+ meta_refresh(10, $redirect_url);
+ $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
+ }
+ else
+ {
+ meta_refresh(3, $redirect_url);
+
+ $message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
+ $message = $user->lang[$message] . '
' . sprintf($user->lang['VIEW_MESSAGE'], '', '');
+ }
- $message = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? (($mode == 'edit') ? 'POST_EDITED_MOD' : 'POST_STORED_MOD') : (($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED');
- $message = $user->lang[$message] . (($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? '
' . sprintf($user->lang['VIEW_MESSAGE'], '', '') : '');
$message .= '
' . sprintf($user->lang['RETURN_FORUM'], '', '');
trigger_error($message);
}
@@ -1026,13 +1037,18 @@ if (!sizeof($error) && $preview)
$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
+ if ($post_data['poll_length'])
+ {
+ $poll_end = ($post_data['poll_length'] * 86400) + (($post_data['poll_start']) ? $post_data['poll_start'] : time());
+ }
+
$template->assign_vars(array(
'S_HAS_POLL_OPTIONS' => (sizeof($post_data['poll_options'])),
'S_IS_MULTI_CHOICE' => ($post_data['poll_max_options'] > 1) ? true : false,
'POLL_QUESTION' => $parse_poll->message,
- 'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($post_data['poll_length'] + $post_data['poll_start'])) : '',
+ 'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_end)) : '',
'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']))
);
diff --git a/phpBB/styles/prosilver/template/index_body.html b/phpBB/styles/prosilver/template/index_body.html
index bda83dcc82..fbfdaa7e62 100644
--- a/phpBB/styles/prosilver/template/index_body.html
+++ b/phpBB/styles/prosilver/template/index_body.html
@@ -8,7 +8,7 @@
{L_SEARCH_UNANSWERED} • {L_SEARCH_NEW} • {L_SEARCH_ACTIVE_TOPICS}
- {L_MARK_FORUMS_READ}
+ {L_MARK_FORUMS_READ}
diff --git a/phpBB/styles/prosilver/template/viewforum_body.html b/phpBB/styles/prosilver/template/viewforum_body.html
index e92a359ca8..d7ba9e7669 100644
--- a/phpBB/styles/prosilver/template/viewforum_body.html
+++ b/phpBB/styles/prosilver/template/viewforum_body.html
@@ -26,7 +26,7 @@
-
+
@@ -59,7 +59,7 @@