aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/CHANGELOG.html13
-rw-r--r--phpBB/includes/acp/acp_prune.php2
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_display.php2
-rw-r--r--phpBB/includes/message_parser.php4
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php6
-rw-r--r--phpBB/index.php2
-rw-r--r--phpBB/language/en/posting.php2
-rw-r--r--phpBB/posting.php24
-rw-r--r--phpBB/styles/prosilver/template/index_body.html2
-rw-r--r--phpBB/styles/prosilver/template/viewforum_body.html6
-rw-r--r--phpBB/styles/subsilver2/template/forumlist_body.html2
-rw-r--r--phpBB/styles/subsilver2/template/viewforum_body.html2
-rw-r--r--phpBB/viewforum.php4
14 files changed, 49 insertions, 24 deletions
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 {
<li>[Fix] Proper sync of data on topic copy (Bug #11335)</li>
<li>[Fix] Introduced ORDER BY clauses to converter queries (Bug #10697)</li>
<li>[Fix] Stopped bots from getting added to the registered users group during conversion (Bug #11283)</li>
- <li>[Fix] Filled "SMILIEYS_DISABLED" template variable (Bug #11257)</li>
+ <li>[Fix] Filled &quot;SMILIEYS_DISABLED&quot; template variable (Bug #11257)</li>
<li>[Fix] Properly escaped the delimiter in disallowed username comparisons (Bug #11339)</li>
<li>[Fix] Check global purge setting (Bug #11555)</li>
<li>[Fix] Improper magic url parsing applied to already parsed [url=] bbcode tag (Bug #11429)</li>
<li>[Fix] Renamed two indicies for Oracle support (Bug #11457)</li>
<li>[Fix] Added support for ISO-8859-8(-i) in the character set convertor (Bug #11265, #12039)</li>
- <li>[Fix] Added support for Oracle's "easy connect naming"</li>
+ <li>[Fix] Added support for Oracle's &quot;easy connect naming&quot;</li>
<li>[Fix] Let Mark/Unmark All work in Manage Drafts (Bug #11679)</li>
<li>[Fix] Display correct message if no attachments found in user administration (Bug #11629)</li>
- <li>[Fix] Let the "Delete all board cookies" being displayed for guests too (only prosilver) (Bug #11603)</li>
+ <li>[Fix] Let the &quot;Delete all board cookies&quot; being displayed for guests too (only prosilver) (Bug #11603)</li>
<li>[Fix] Do not display view topic link in MCP while there is no link present (Bug #11573)</li>
<li>[Fix] MySQL now properly sorts by post_subject (Bug #11637)</li>
<li>[Fix] Introduced checks to stop negative postcounts (Bug #11561, #11421)</li>
@@ -262,6 +262,13 @@ p a {
<li>[Fix] Set the Admin group as founder_manage during conversion (Bug #12287)</li>
<li>[Fix] Fixed a special quote BBCode case (Bug #12189)</li>
<li>[Fix] Correctly parse BBCodes in a post when a poll is being used (Bug #11833)</li>
+ <li>[Fix] Remember attached files on PM edit (Bug #12019)</li>
+ <li>[Fix] Correctly display poll ending on preview (Bug #12303)</li>
+ <li>[Feature] Display the success message on posting longer for posts awaiting approval (Bug #12053)</li>
+ <li>[Fix] Display maximum and entered number of characters for the &quot;maximum number of characters exceeded&quot; error messages (Bug #11981)</li>
+ <li>[Fix] Wrongly applied setting for allowing links in private messages (used the signature setting instead of the post setting) (Bug #11945)</li>
+ <li>[Fix] Unread flag for multipage topic wrongly set under some conditions (Bug #12127) - fix provided by asinshesq</li>
+ <li>[Fix] Able to delete posts within user prune panel (Bug #11849)</li>
</ul>
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'] . '&amp;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'] . '&amp;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&amp;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] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
+ }
- $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'])) ? '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>') : '');
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']) . '">', '</a>');
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 @@
<!-- IF S_DISPLAY_SEARCH -->
<li><a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><!-- IF S_USER_LOGGED_IN --> &bull; <a href="{U_SEARCH_NEW}">{L_SEARCH_NEW}</a><!-- ENDIF --> &bull; <a href="{U_SEARCH_ACTIVE_TOPICS}">{L_SEARCH_ACTIVE_TOPICS}</a></li>
<!-- ENDIF -->
- <!-- IF S_USER_LOGGED_IN and not S_IS_BOT --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
+ <!-- IF not S_IS_BOT and U_MARK_FORUMS --><li class="rightside"><a href="{U_MARK_FORUMS}" accesskey="m">{L_MARK_FORUMS_READ}</a></li><!-- ENDIF -->
</ul>
<!-- ENDIF -->
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 @@
<!-- ENDIF -->
<!-- IF S_HAS_SUBFORUM -->
-<!-- IF not S_IS_BOT -->
+<!-- IF not S_IS_BOT and U_MARK_FORUMS -->
<ul class="linklist">
<li class="rightside"><a href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a></li>
</ul>
@@ -59,7 +59,7 @@
<!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
<div class="pagination">
- <!-- IF not S_IS_BOT --><a href="{U_MARK_TOPICS}" accesskey="m">{L_MARK_TOPICS_READ}</a><!-- ENDIF --><!-- IF TOTAL_TOPICS --> &bull; {TOTAL_TOPICS}<!-- ENDIF -->
+ <!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}" accesskey="m">{L_MARK_TOPICS_READ}</a><!-- ENDIF --><!-- IF TOTAL_TOPICS --> &bull; {TOTAL_TOPICS}<!-- ENDIF -->
<!-- IF PAGE_NUMBER -->
<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> &bull; <span>{PAGINATION}</span><!-- ELSE --> &bull; {PAGE_NUMBER}<!-- ENDIF -->
<!-- ENDIF -->
@@ -191,7 +191,7 @@
<!-- IF PAGINATION or TOTAL_POSTS or TOTAL_TOPICS -->
<div class="pagination">
- <!-- IF S_USER_LOGGED_IN and not U_POST_REPLY_TOPIC and TOTAL_TOPICS and not S_IS_BOT --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
+ <!-- IF not U_POST_REPLY_TOPIC and TOTAL_TOPICS and not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a> &bull; <!-- ENDIF -->
<!-- IF TOTAL_POSTS and not NEWEST_USER --> {TOTAL_POSTS}<!-- ELSEIF TOTAL_TOPICS and not NEWEST_USER --> {TOTAL_TOPICS}<!-- ENDIF -->
<!-- IF TOTAL_USERS -->{TOTAL_USERS}<!-- ENDIF -->
<!-- IF PAGINATION --> &bull; <a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a>
diff --git a/phpBB/styles/subsilver2/template/forumlist_body.html b/phpBB/styles/subsilver2/template/forumlist_body.html
index 5454e63ffe..f850af6a30 100644
--- a/phpBB/styles/subsilver2/template/forumlist_body.html
+++ b/phpBB/styles/subsilver2/template/forumlist_body.html
@@ -1,6 +1,6 @@
<table class="tablebg" cellspacing="1" width="100%">
<tr>
- <td class="cat" colspan="5" align="{S_CONTENT_FLOW_END}"><!-- IF not S_IS_BOT --><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a><!-- ENDIF -->&nbsp;</td>
+ <td class="cat" colspan="5" align="{S_CONTENT_FLOW_END}"><!-- IF not S_IS_BOT and U_MARK_FORUMS --><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a><!-- ENDIF -->&nbsp;</td>
</tr>
<tr>
<th colspan="2">&nbsp;{L_FORUM}&nbsp;</th>
diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html
index 5e56042dd1..6aa444d20e 100644
--- a/phpBB/styles/subsilver2/template/viewforum_body.html
+++ b/phpBB/styles/subsilver2/template/viewforum_body.html
@@ -155,7 +155,7 @@
<table width="100%" cellspacing="0">
<tr class="nav">
<td valign="middle">&nbsp;<!-- IF S_WATCH_FORUM_LINK and not S_IS_BOT --><a href="{S_WATCH_FORUM_LINK}">{S_WATCH_FORUM_TITLE}</a><!-- ENDIF --></td>
- <td align="{S_CONTENT_FLOW_END}" valign="middle"><!-- IF not S_IS_BOT --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a><!-- ENDIF -->&nbsp;</td>
+ <td align="{S_CONTENT_FLOW_END}" valign="middle"><!-- IF not S_IS_BOT and U_MARK_TOPICS --><a href="{U_MARK_TOPICS}">{L_MARK_TOPICS_READ}</a><!-- ENDIF -->&nbsp;</td>
</tr>
</table>
</td>
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index 00a302cef4..9709b85752 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -292,8 +292,8 @@ $template->assign_vars(array(
'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&amp;i=main&amp;mode=forum_view", true, $user->session_id) : '',
'U_POST_NEW_TOPIC' => append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&amp;f=' . $forum_id),
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;$u_sort_param&amp;start=$start"),
- 'U_MARK_TOPICS' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;mark=topics"))
-);
+ 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id&amp;mark=topics") : '',
+));
// Grab icons
$icons = $cache->obtain_icons();