Фиксы черновиков и мелких багов. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@501 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
gemini_13@torba.su 2013-05-22 20:06:05 +00:00
commit aeb1bfbc51
16 changed files with 152 additions and 81 deletions

View file

@ -139,6 +139,10 @@ switch($this->request['type'])
}
}
DB()->query("UPDATE ". BB_POSTS_TEXT ." SET post_text = '". DB()->escape($text) ."' WHERE post_id = $post_id LIMIT 1");
if ($post['topic_last_post_id'] != $post['post_id'] && $userdata['user_id'] == $post['poster_id'])
{
DB()->query("UPDATE ". BB_POSTS ." SET post_edit_time = '". TIMENOW ."', post_edit_count = post_edit_count + 1 WHERE post_id = $post_id LIMIT 1");
}
$s_text = str_replace('\n', "\n", $text);
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
add_search_words($post_id, stripslashes($s_text), stripslashes($s_topic_title));

View file

@ -142,34 +142,12 @@ switch ($mode)
$this->response['active_torrents'] = '
<a name="torrent"></a>
<div class="spacer_8"></div>
<h1 class="pagetitle tCenter">'. $lang['CUR_ACTIVE_DLS'] .'</h1>
<div class="bold tCenter">'. $lang['RELEASING'] .': <span class="dlComplete">'. $releasing_count .'</span> :: '. $lang['SEEDING'] .': <span class="dlComplete">' . $seeding_count .'</span> :: '. $lang['LEECHING'] .': <span class="dlDown">' . $leeching_count .'</span></div>
<div class="spacer_8"></div>
<div class="fon2">
<table class="forumline">
<tr>
<th><b class="tbs-text">'. $lang['TYPE'] .'</b></th>
@ -186,8 +164,5 @@ switch ($mode)
</table>
</div>
';
break;
}

View file

@ -56,8 +56,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 pre-stable';
$bb_cfg['tp_release_date'] = '15-05-2013';
$bb_cfg['tp_release_state'] = 'R500';
$bb_cfg['tp_release_date'] = '22-05-2013';
$bb_cfg['tp_release_state'] = 'R501';
// Database
$charset = 'utf8';

View file

@ -388,7 +388,10 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
else if ($mode != 'poll_delete')
{
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
if (!$post_data['to_draft'])
{
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
}
$topic_update_sql = "topic_last_post_id = $post_id, topic_last_post_time = ". TIMENOW . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id");
}
else
@ -396,12 +399,15 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
$topic_update_sql .= 'topic_vote = 0';
}
$sql = "UPDATE " . BB_FORUMS . " SET
$forum_update_sql
WHERE forum_id = $forum_id";
if (!DB()->sql_query($sql))
if (!$post_data['to_draft'])
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
$sql = "UPDATE " . BB_FORUMS . " SET
$forum_update_sql
WHERE forum_id = $forum_id";
if (!DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
}
if ($topic_update_sql != '')
@ -415,8 +421,21 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
}
if ($mode != 'poll_delete')
if ($mode != 'poll_delete' || $post_data['to_draft'])
{
$sql = "SELECT forum_postcount
FROM " . BB_FORUMS . "
WHERE forum_id = $forum_id
AND forum_postcount = 0";
if (!$result = DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
if ($row = DB()->sql_fetchrow($result))
{
return;
}
$sql = "UPDATE " . BB_USERS . "
SET user_posts = user_posts $sign
WHERE user_id = $user_id";
@ -427,6 +446,67 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
}
//
// Update draft status
//
function update_draft($mode, $forum_id, $topic_id, $topic_dl_type, $post_id, $user_id)
{
global $datastore;
$sign = ($mode == 'is_draft') ? '- 1' : '+ 1';
$forum_update_sql = "u.user_posts = u.user_posts $sign, f.forum_posts = f.forum_posts $sign, f.forum_topics = f.forum_topics $sign";
if ($mode == 'is_draft')
{
$sql = "SELECT topic_last_post_id
FROM " . BB_TOPICS . "
WHERE forum_id = $forum_id
AND is_draft = 0
ORDER BY topic_last_post_time DESC
LIMIT 1";
if (!($result = DB()->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in finding the post id', '', __LINE__, __FILE__, $sql);
}
if ($row = DB()->sql_fetchrow($result))
{
$forum_update_sql .= ', f.forum_last_post_id = ' . $row['topic_last_post_id'];
if ($topic_dl_type == TOPIC_DL_TYPE_DL)
{
$sql = "SELECT attach_id
FROM ". BB_ATTACHMENTS ."
WHERE post_id = $post_id";
if (!($result = DB()->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Error in finding the attachment id', '', __LINE__, __FILE__, $sql);
}
if ($row = DB()->sql_fetchrow($result))
{
require_once(INC_DIR .'functions_torrent.php');
tracker_unregister($row['attach_id']);
}
}
}
}
else
{
$forum_update_sql .= ', f.forum_last_post_id = ' . $post_id;
}
$sql = "UPDATE ". BB_FORUMS ." f, ". BB_USERS ." u SET
$forum_update_sql
WHERE f.forum_id = $forum_id
AND u.user_id = $user_id";
if (!DB()->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
cache_rm_user_sessions($user_id);
$datastore->update('cat_forums');
}
//
// Delete a post/poll
//

View file

@ -8,7 +8,7 @@ if (!$profiledata = get_userdata($_GET[POST_USERS_URL])) bb_die($lang['NO_USER_I
if (!$userdata['session_logged_in']) redirect("login.php?redirect={$_SERVER['REQUEST_URI']}");
if ($profiledata['user_id'] != $userdata['user_id'] && !IS_ADMIN) bb_die('Ты ноги мыла, Дездемона? :)');
if ($profiledata['user_id'] != $userdata['user_id'] && !IS_ADMIN) bb_die($lang['CANNOT_VIEW_DRAFT']);
$sql = "
SELECT t.*, f.forum_name, f.cat_id, f.forum_parent AS parent_id, f2.forum_name AS parent_name, c.cat_title

View file

@ -128,6 +128,7 @@ $template->assign_vars(array(
'USER_ACTIVE' => $profiledata['user_active'],
'COUNT_DRAFT' => ($bb_cfg['status_of_draft']) ? $count_draft : '',
'SHOW_DRAFT' => ($bb_cfg['status_of_draft'] && (IS_ADMIN || $profile_user_id)),
'OCCUPATION' => $profiledata['user_occ'],
'INTERESTS' => $profiledata['user_interests'],
'SKYPE' => $profiledata['user_skype'],

View file

@ -385,6 +385,7 @@ $lang['NOTIFY'] = 'Notify me when a reply is posted';
$lang['TO_DRAFT'] = 'Save as Draft';
$lang['DRAFTS'] = 'Drafts';
$lang['CANNOT_DELETE_DRAFT'] = 'Sorry, but you may not delete other user\'s drafts';
$lang['CANNOT_VIEW_DRAFT'] = 'Sorry, but you may not view other user\'s drafts';
$lang['STORED'] = 'Your message has been entered successfully.';
$lang['DELETED'] = 'Your message has been deleted successfully.';
@ -564,7 +565,6 @@ $lang['HIDE_PORN_FORUMS'] = 'Hide porno forums';
$lang['ALWAYS_NOTIFY'] = 'Always notify me of replies';
$lang['ALWAYS_NOTIFY_EXPLAIN'] = 'Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.';
$lang['BOARD_STYLE'] = 'Board Style';
$lang['BOARD_LANG'] = 'Board Language';
$lang['GENDER'] = 'Gender';
$lang['GENDER_SELECT'] = array(
@ -1346,6 +1346,7 @@ $lang['ONLY_1_TOR_PER_TOPIC'] = 'You can register only one torrent in one topic'
$lang['VIEWING_USER_BT_PROFILE'] = 'Viewing torrent-profile :: %s'; // %s is username
$lang['CUR_ACTIVE_DLS'] = 'Currently active torrents';
$lang['CUR_ACTIVE_DLS_ERROR'] = 'User does not download and seeding';
$lang['CUR_ACTIVE_DLS_DISALLOWED'] = 'Browse the user denied active torrents';
$lang['TD_TRAF'] = 'Today';
$lang['YS_TRAF'] = 'Yesterday';

View file

@ -387,6 +387,7 @@ $lang['NOTIFY'] = 'Сообщать мне о получении ответа';
$lang['TO_DRAFT'] = 'Сохранить как черновик';
$lang['DRAFTS'] = 'Черновиков';
$lang['CANNOT_DELETE_DRAFT'] = 'Извините, вы не можете удалять чужие черновики';
$lang['CANNOT_VIEW_DRAFT'] = 'Извините, вы не можете просматривать чужие черновики';
$lang['STORED'] = 'Ваше сообщение было успешно добавлено';
$lang['DELETED'] = 'Ваше сообщение было успешно удалено';
@ -567,7 +568,6 @@ $lang['HIDE_PORN_FORUMS'] = 'Скрыть pron форумы';
$lang['ALWAYS_NOTIFY'] = 'Всегда сообщать мне об ответах';
$lang['ALWAYS_NOTIFY_EXPLAIN'] = 'Когда кто-нибудь ответит на тему, в которую вы писали, вам высылается e-mail. Это можно также настроить при размещении сообщения.';
$lang['BOARD_STYLE'] = 'Внешний вид форумов';
$lang['BOARD_LANG'] = 'Язык';
$lang['GENDER'] = 'Пол';
$lang['GENDER_SELECT'] = array(
@ -1349,6 +1349,7 @@ $lang['ONLY_1_TOR_PER_TOPIC'] = 'Вы не можете зарегистриро
$lang['VIEWING_USER_BT_PROFILE'] = 'Торрент-профиль'; // %s is username
$lang['CUR_ACTIVE_DLS'] = 'Текущие активные торренты';
$lang['CUR_ACTIVE_DLS_ERROR'] = 'Пользователь ничего не скачивает и не сидирует';
$lang['CUR_ACTIVE_DLS_DISALLOWED'] = 'Пользователь запретил просматривать его активные торренты';
$lang['TD_TRAF'] = 'Сегодня';
$lang['YS_TRAF'] = 'Вчера';

View file

@ -326,7 +326,7 @@ if ($submit || $refresh)
else
{
$notify_user = bf($userdata['user_opt'], 'user_opt', 'notify');
$to_draft = ($bb_cfg['status_of_draft'] && $mode == 'editpost') ? $post_info['is_draft'] : false;
$to_draft = ($mode == 'editpost') ? $post_info['is_draft'] : false;
if (!IS_GUEST && $mode != 'newtopic' && !$notify_user)
{
@ -525,14 +525,8 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
if (!in_array($mode, array('editpost', 'delete', 'poll_delete')))
{
$user_id = ( $mode == 'reply' || $mode == 'newtopic' ) ? $userdata['user_id'] : $post_data['poster_id'];
if (!$to_draft)
{
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
}
else
{
update_post_stats('delete', $post_data, $forum_id, $topic_id, $post_id, $user_id);
}
$post_data['to_draft'] = $to_draft;
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
}
if ($mode == 'editpost')
{
@ -540,11 +534,11 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
{
if ($to_draft)
{
update_post_stats('delete', $post_data, $forum_id, $topic_id, $post_id, $post_data['poster_id']);
update_draft('is_draft', $forum_id, $topic_id, $post_id, $post_data['poster_id']);
}
else
{
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $post_data['poster_id']);
update_draft('no_draft', $forum_id, $topic_id, $post_id, $post_data['poster_id']);
}
}
}
@ -560,7 +554,7 @@ else if ( ($submit || $confirm) && !$topic_has_new_posts )
set_tracks(COOKIE_TOPIC, $tracking_topics, $topic_id);
}
if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg)
if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg&& !$to_draft)
{
include(INC_DIR .'functions_torrent.php');
if(!DB()->fetch_row("SELECT attach_id FROM ". BB_BT_TORRENTS ." WHERE attach_id = ". TORRENT_ATTACH_ID))
@ -839,34 +833,18 @@ $template->set_filenames(array(
'body' => 'posting.tpl',
));
//
// Output the data to the template
//
$template->assign_vars(array(
'FORUM_NAME' => htmlCHR($forum_name),
'PAGE_TITLE' => $page_title,
'POSTING_TYPE_TITLE' => $page_title,
'POSTING_TOPIC_ID' => ($mode != 'newtopic') ? $topic_id : '',
'POSTING_TOPIC_TITLE' => ($mode != 'newtopic') ? wbr($post_info['topic_title']) : '',
'U_VIEW_FORUM' => "viewforum.php?" . POST_FORUM_URL . "=$forum_id")
);
'U_VIEW_FORUM' => "viewforum.php?" . POST_FORUM_URL . "=$forum_id",
if ($mode == 'newtopic' || $post_data['first_post'])
{
$template->assign_var('POSTING_SUBJECT');
}
// Update post time
if ($mode == 'editpost' && $post_data['last_post'] && !$post_data['first_post'])
{
$template->assign_vars(array(
'SHOW_UPDATE_POST_TIME' => ($is_auth['auth_mod'] || ($post_data['poster_post'] && $post_info['post_time'] + 3600*3 > TIMENOW)),
'UPDATE_POST_TIME_CHECKED' => ($post_data['poster_post'] && ($post_info['post_time'] + 3600*2 > TIMENOW)),
));
}
//
// Output the data to the template
//
$template->assign_vars(array(
'USERNAME' => @$username,
'CAPTCHA_HTML' => (IS_GUEST) ? CAPTCHA()->get_html() : '',
'SUBJECT' => $subject,
@ -882,6 +860,25 @@ $template->assign_vars(array(
'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields)
);
if ($mode == 'newtopic' || $post_data['first_post'])
{
$template->assign_var('POSTING_SUBJECT');
}
if ($mode == 'newtopic' || ($post_data['first_post'] && ($post_info['topic_replies'] == 0 || $post_info['is_draft'])) && $bb_cfg['status_of_draft'])
{
$template->assign_var('DRAFT_CHK');
}
// Update post time
if ($mode == 'editpost' && $post_data['last_post'] && !$post_data['first_post'])
{
$template->assign_vars(array(
'SHOW_UPDATE_POST_TIME' => ($is_auth['auth_mod'] || ($post_data['poster_post'] && $post_info['post_time'] + 3600*3 > TIMENOW)),
'UPDATE_POST_TIME_CHECKED' => ($post_data['poster_post'] && ($post_info['post_time'] + 3600*2 > TIMENOW)),
));
}
//
// Poll entry switch/output
//

View file

@ -476,7 +476,7 @@ if ($post_mode)
$SQL['SELECT'][] = ($join_t && !$join_p) ? 't.topic_first_post_id AS item_id' : 'p.post_id AS item_id';
// FROM
if ($join_t) $SQL['FROM'][] = $topics_tbl;
if ($join_t || $bb_cfg['status_of_draft']) $SQL['FROM'][] = $topics_tbl;
if ($join_p) $SQL['FROM'][] = $posts_tbl;
if (!$SQL['FROM'])
@ -497,6 +497,7 @@ if ($post_mode)
if ($prev_days) $SQL['WHERE'][] = "$tbl.$time_field > ". $time_opt[$time_val]['sql'];
if ($my_posts) $SQL['WHERE'][] = "p.poster_id = $poster_id_val";
if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val";
if ($poster_id_val != $user_id && !IS_ADMIN && $bb_cfg['status_of_draft']) $SQL['WHERE'][] = "t.is_draft = 0";
if ($text_match_sql)
{
@ -579,13 +580,14 @@ if ($post_mode)
$topic_id = (int) $topic_id;
$forum_id = (int) $first_post['forum_id'];
$is_unread_t = is_unread($first_post['topic_last_post_time'], $topic_id, $forum_id);
$topic_draft = ($first_post['is_draft']) ? $lang['TOPIC_DRAFT'] .' ' : '';
$template->assign_block_vars('t', array(
'FORUM_ID' => $forum_id,
'FORUM_NAME' => $forum_name_html[$forum_id],
'TOPIC_ID' => $topic_id,
'TOPIC_TITLE' => $first_post['topic_title'],
'TOPIC_ICON' => get_topic_icon($first_post, $is_unread_t),
'TOPIC_TITLE' => $topic_draft . $first_post['topic_title'],
'TOPIC_ICON' => ($first_post['is_draft']) ? $images['draft'] : get_topic_icon($first_post, $is_unread_t),
));
$quote_btn = true;
@ -646,7 +648,7 @@ else
}
// FROM
if ($join_t) $SQL['FROM'][] = $topics_tbl;
if ($join_t || $bb_cfg['status_of_draft']) $SQL['FROM'][] = $topics_tbl;
if ($join_p) $SQL['FROM'][] = $posts_tbl;
if (!$SQL['FROM'])
@ -683,6 +685,7 @@ else
}
}
if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val";
if ($poster_id_val != $user_id && !IS_ADMIN && $bb_cfg['status_of_draft']) $SQL['WHERE'][] = "t.is_draft = 0";
if ($text_match_sql)
{
@ -777,6 +780,7 @@ else
$forum_id = $topic['forum_id'];
$is_unread = is_unread($topic['topic_last_post_time'], $topic_id, $forum_id);
$moved = ($topic['topic_status'] == TOPIC_MOVED);
$topic_draft = ($topic['is_draft']) ? $lang['TOPIC_DRAFT'] .' ' : '';
$template->assign_block_vars('t', array(
'ROW_NUM' => $row_num,
@ -784,9 +788,9 @@ else
'FORUM_NAME' => $forum_name_html[$forum_id],
'TOPIC_ID' => $topic_id,
'HREF_TOPIC_ID' => ($moved) ? $topic['topic_moved_id'] : $topic['topic_id'],
'TOPIC_TITLE' => wbr($topic['topic_title']),
'TOPIC_TITLE' => $topic_draft . wbr($topic['topic_title']),
'IS_UNREAD' => $is_unread,
'TOPIC_ICON' => get_topic_icon($topic, $is_unread),
'TOPIC_ICON' => ($topic['is_draft']) ? $images['draft'] : get_topic_icon($topic, $is_unread),
'PAGINATION' => ($moved) ? '' : build_topic_pagination(TOPIC_URL . $topic_id, $topic['topic_replies'], $bb_cfg['posts_per_page']),
'REPLIES' => $topic['topic_replies'],
'ATTACH' => $topic['topic_attachment'],

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -135,12 +135,14 @@
</tr>
<!-- ENDIF -->
</table>
<!-- IF DRAFT_CHK -->
<table class="borderless inline">
<tr>
<td><input type="checkbox" id="to_draft" name="to_draft" {S_DRAFT_CHECKED} /></td>
<td><label for="to_draft">{L_TO_DRAFT}</label></td>
</tr>
</table>
<!-- ENDIF -->
</div>
</td>
</tr>

View file

@ -55,6 +55,7 @@ $images['folder_dl'] = $_main .'folder_dl.gif';
$images['folder_dl_new'] = $_main .'folder_dl_new.gif';
$images['folder_dl_hot'] = $_main .'folder_dl_hot.gif';
$images['folder_dl_hot_new'] = $_main .'folder_dl_hot_new.gif';
$images['draft'] = $_main .'draft.gif';
// attach_icons
$images['icon_clip'] = $_img .'icon_clip.gif';

View file

@ -415,7 +415,7 @@ ajax.callback.view_profile = function(data) {
<td id="ignore_srv_load">{L_ACCESS_SRV_LOAD}: <b class="editable">{IGNORE_SRV_LOAD}</b></td>
</tr>
<!-- ENDIF -->
<!-- IF PROFILE_USER || IS_ADMIN && $bb_cfg['status_of_draft'] -->
<!-- IF SHOW_DRAFT -->
<tr>
<th>{L_DRAFTS}:</th>
<td><a href="profile.php?mode=viewdraft&u={PROFILE_USER_ID}"><b>{COUNT_DRAFT}</b></a></td>

View file

@ -519,7 +519,7 @@ foreach ($topic_rowset as $topic)
'TOPIC_TITLE' => $topic_draft . wbr($topic['topic_title']),
'TOPICS_SEPARATOR' => $separator,
'IS_UNREAD' => $is_unread,
'TOPIC_ICON' => get_topic_icon($topic, $is_unread),
'TOPIC_ICON' => ($topic['is_draft']) ? $images['draft'] : get_topic_icon($topic, $is_unread),
'PAGINATION' => ($moved) ? '' : build_topic_pagination(TOPIC_URL . $topic_id, $replies, $bb_cfg['posts_per_page']),
'REPLIES' => $replies,
'VIEWS' => $topic['topic_views'],

View file

@ -113,6 +113,11 @@ if (!$t_data = DB()->fetch_row($sql))
bb_die($lang['TOPIC_POST_NOT_EXIST']);
}
if($t_data['topic_poster'] != $userdata['user_id'] && $t_data['is_draft'] && !IS_ADMIN)
{
bb_die($lang['CANNOT_VIEW_DRAFT']);
}
$forum_topic_data =& $t_data;
$topic_id = $t_data['topic_id'];
$forum_id = $t_data['forum_id'];
@ -457,8 +462,8 @@ $view_forum_url = "viewforum.php?f=$forum_id";
$view_prev_topic_url = "viewtopic.php?t=$topic_id&amp;view=previous#newest";
$view_next_topic_url = "viewtopic.php?t=$topic_id&amp;view=next#newest";
$reply_img = ( $t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED ) ? $images['reply_locked'] : $images['reply_new'];
$reply_alt = ( $t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED ) ? $lang['TOPIC_LOCKED_SHORT'] : $lang['REPLY_TO_TOPIC'];
$reply_img = ( $t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED || $t_data['is_draft'] ) ? $images['reply_locked'] : $images['reply_new'];
$reply_alt = ( $t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED || $t_data['is_draft'] ) ? $lang['TOPIC_LOCKED_SHORT'] : $lang['REPLY_TO_TOPIC'];
// Set 'body' template for attach_mod
$template->set_filenames(array('body' => 'viewtopic.tpl'));
@ -1076,7 +1081,7 @@ if (defined('SPLIT_FORM_START'))
//
if ($bb_cfg['show_quick_reply'])
{
if ($is_auth['auth_reply'] && !($t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED))
if ($is_auth['auth_reply'] && !($t_data['forum_status'] == FORUM_LOCKED || $t_data['topic_status'] == TOPIC_LOCKED) && !$t_data['is_draft'])
{
$template->assign_vars(array(
'QUICK_REPLY' => true,