aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-06-11 00:12:42 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-06-11 00:12:42 +0000
commit13a02f6cc5bcdb0654642135b2981633ac3996b5 (patch)
tree50e01ff1d2a73834c26fb72d229d46b02ec3da52 /phpBB/includes
parent056ab23bb65aea43aeb0918e7d7992a8987890a8 (diff)
downloadforums-13a02f6cc5bcdb0654642135b2981633ac3996b5.tar
forums-13a02f6cc5bcdb0654642135b2981633ac3996b5.tar.gz
forums-13a02f6cc5bcdb0654642135b2981633ac3996b5.tar.bz2
forums-13a02f6cc5bcdb0654642135b2981633ac3996b5.tar.xz
forums-13a02f6cc5bcdb0654642135b2981633ac3996b5.zip
my round of bug fixes
git-svn-id: file:///svn/phpbb/trunk@7749 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-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
5 files changed, 8 insertions, 8 deletions
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,