diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql
index 74ae923ef..ad1e14606 100644
--- a/install/sql/mysql.sql
+++ b/install/sql/mysql.sql
@@ -1297,7 +1297,6 @@ CREATE TABLE IF NOT EXISTS `bb_topics` (
`topic_dl_type` tinyint(1) NOT NULL DEFAULT '0',
`topic_last_post_time` int(11) NOT NULL DEFAULT '0',
`topic_show_first_post` tinyint(1) unsigned NOT NULL DEFAULT '0',
- `is_draft` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`topic_id`),
KEY `forum_id` (`forum_id`),
KEY `topic_last_post_id` (`topic_last_post_id`),
@@ -1309,7 +1308,7 @@ CREATE TABLE IF NOT EXISTS `bb_topics` (
-- Дамп данных таблицы `bb_topics`
--
-INSERT INTO `bb_topics` VALUES (1, 1, 'Добро пожаловать в TorrentPier II', 2, 1309421220, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 972086460, 0, 0);
+INSERT INTO `bb_topics` VALUES (1, 1, 'Добро пожаловать в TorrentPier II', 2, 1309421220, 2, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 972086460, 0);
-- --------------------------------------------------------
diff --git a/upload/ajax.php b/upload/ajax.php
index a5d5ddafb..fa55b5a9d 100644
--- a/upload/ajax.php
+++ b/upload/ajax.php
@@ -45,7 +45,6 @@ switch ($ajax->action)
break;
case 'manage_user':
- case 'modify_draft':
require(INC_DIR .'functions_admin.php');
break;
@@ -83,7 +82,6 @@ class ajax_common
'gen_passkey' => array('user'),
'change_torrent' => array('user'),
'change_tor_status' => array('user'),
- 'modify_draft' => array('user'),
'view_profile' => array('user'),
'view_post' => array('guest'),
@@ -535,45 +533,6 @@ class ajax_common
require(AJAX_DIR .'index_data.php');
}
- function modify_draft()
- {
- global $userdata, $bb_cfg, $lang;
-
- if(!$bb_cfg['status_of_draft']) $this->ajax_die($lang['MODULE_OFF']);
-
- $tid = (int)$this->request['id_draft'];
- $mode = (int)$this->request['mode'];
- $sql = "SELECT * FROM ". BB_TOPICS ." WHERE topic_id = {$tid}";
-
- if (!$row = DB()->fetch_row($sql)) $this->ajax_die($lang['TOPIC_POST_NOT_EXIST']);
-
- if ($row['topic_poster'] != $userdata['user_id'] && !IS_ADMIN) $this->ajax_die($lang['CANNOT_DELETE_DRAFT']);
-
- if (!$mode)
- {
- topic_delete($tid);
- }
- else
- {
- require_once(INC_DIR . 'functions_post.php');
- DB()->query("
- UPDATE
- ". BB_POSTS ." p,
- ". BB_TOPICS ." t
- SET
- p.post_time = ". TIMENOW .",
- t.is_draft = 0,
- t.topic_last_post_time = ". TIMENOW .",
- t.topic_time = ". TIMENOW ."
- WHERE
- t.topic_id = {$tid}
- AND t.topic_first_post_id = p.post_id
- ");
- update_draft('no_draft', $row['forum_id'], $tid, $row['topic_dl_type'], $row['topic_first_post_id'], $row['topic_poster']);
- }
- $this->response['tid'] = $tid;
- }
-
function view_profile()
{
require(AJAX_DIR .'view_profile.php');
diff --git a/upload/config.php b/upload/config.php
index abb06ea72..f190a05e3 100644
--- a/upload/config.php
+++ b/upload/config.php
@@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.5 (unstable)';
-$bb_cfg['tp_release_date'] = '15-01-2014';
-$bb_cfg['tp_release_state'] = 'R557';
+$bb_cfg['tp_release_date'] = '16-01-2014';
+$bb_cfg['tp_release_state'] = 'R558';
// Database
$charset = 'utf8';
@@ -537,7 +537,4 @@ $bb_cfg['captcha'] = array(
);
// SEO
-$bb_cfg['seo_link_home_page'] = false;
-
-// Status of draft
-$bb_cfg['status_of_draft'] = false;
\ No newline at end of file
+$bb_cfg['seo_link_home_page'] = false;
\ No newline at end of file
diff --git a/upload/includes/datastore/build_cat_forums.php b/upload/includes/datastore/build_cat_forums.php
index 60f0dc743..ed5097991 100644
--- a/upload/includes/datastore/build_cat_forums.php
+++ b/upload/includes/datastore/build_cat_forums.php
@@ -137,7 +137,6 @@ if ($bb_cfg['show_latest_news'] AND $news_forum_ids = $bb_cfg['latest_news_forum
FROM ". BB_TOPICS ."
WHERE forum_id IN ($news_forum_ids)
AND topic_moved_id = 0
- AND is_draft = 0
ORDER BY topic_time DESC
LIMIT $news_count
");
@@ -157,7 +156,6 @@ if ($bb_cfg['show_network_news'] AND $net_forum_ids = $bb_cfg['network_news_foru
FROM ". BB_TOPICS ."
WHERE forum_id IN ($net_forum_ids)
AND topic_moved_id = 0
- AND is_draft = 0
ORDER BY topic_time DESC
LIMIT $net_count
");
diff --git a/upload/includes/functions_post.php b/upload/includes/functions_post.php
index 83a2eb7a9..6da94a84e 100644
--- a/upload/includes/functions_post.php
+++ b/upload/includes/functions_post.php
@@ -105,7 +105,7 @@ function prepare_post(&$mode, &$post_data, &$error_msg, &$username, &$subject, &
//
function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length, $update_post_time)
{
- global $userdata, $post_info, $is_auth, $bb_cfg, $lang, $datastore, $to_draft;
+ global $userdata, $post_info, $is_auth, $bb_cfg, $lang, $datastore;
$current_time = TIMENOW;
@@ -159,7 +159,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
$topic_dl_type = (isset($_POST['topic_dl_type']) && ($post_info['allow_reg_tracker'] || $is_auth['auth_mod'])) ? TOPIC_DL_TYPE_DL : TOPIC_DL_TYPE_NORMAL;
- if (($mode == 'editpost' && $post_data['first_post']) && !$to_draft && $to_draft != $post_data['is_draft'])
+ if (($mode == 'editpost' && $post_data['first_post']))
{
$sql_update = "
UPDATE
@@ -171,7 +171,6 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
t.topic_type = $topic_type,
t.topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ",
t.topic_vote = " . $topic_vote : "") . ",
- t.is_draft = $to_draft,
t.topic_last_post_time = ". TIMENOW .",
t.topic_time = ". TIMENOW ."
WHERE
@@ -188,14 +187,13 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
topic_title = '$post_subject',
topic_type = $topic_type,
topic_dl_type = $topic_dl_type " . ((@$post_data['edit_vote'] || !empty($poll_title)) ? ",
- topic_vote = " . $topic_vote : "") . ",
- is_draft = $to_draft
+ topic_vote = " . $topic_vote : "") . "
WHERE
topic_id = $topic_id
";
}
- $sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote, is_draft) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote, $to_draft)" : $sql_update;
+ $sql = ($mode != "editpost") ? "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_dl_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_dl_type, $topic_vote)" : $sql_update;
if (!DB()->sql_query($sql))
{
@@ -348,7 +346,6 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
//
function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id)
{
- $to_draft = (isset($post_data['to_draft'])) ? $post_data['to_draft'] : 0;
$sign = ($mode == 'delete') ? '- 1' : '+ 1';
$forum_update_sql = "forum_posts = forum_posts $sign";
$topic_update_sql = '';
@@ -417,10 +414,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
else if ($mode != 'poll_delete')
{
- if (!$to_draft)
- {
- $forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
- }
+ $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
@@ -428,15 +422,10 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
$topic_update_sql .= 'topic_vote = 0';
}
- if (!$to_draft)
+ $sql = "UPDATE " . BB_FORUMS . " SET $forum_update_sql WHERE forum_id = $forum_id";
+ if (!DB()->sql_query($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);
- }
+ message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($topic_update_sql != '')
@@ -450,7 +439,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
}
- if ($mode != 'poll_delete' || $to_draft)
+ if ($mode != 'poll_delete')
{
$sql = "UPDATE " . BB_USERS . "
SET user_posts = user_posts $sign
@@ -462,67 +451,6 @@ 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
//
diff --git a/upload/includes/page_header.php b/upload/includes/page_header.php
index e9c89ae9d..ce3e2fb17 100644
--- a/upload/includes/page_header.php
+++ b/upload/includes/page_header.php
@@ -275,7 +275,6 @@ $template->assign_vars(array(
'U_SEARCH_SELF_BY_LAST' => "search.php?uid={$userdata['user_id']}&o=5",
'U_WATCHED_TOPICS' => "profile.php?mode=watch",
- 'U_MY_DRAFTS' => "profile.php?mode=viewdraft&u={$userdata['user_id']}",
));
if (!empty($page_cfg['show_torhelp'][BB_SCRIPT]) && !empty($userdata['torhelp']))
diff --git a/upload/includes/ucp/usercp_viewdraft.php b/upload/includes/ucp/usercp_viewdraft.php
deleted file mode 100644
index 0dc03573b..000000000
--- a/upload/includes/ucp/usercp_viewdraft.php
+++ /dev/null
@@ -1,55 +0,0 @@
-fetch_rowset($sql))
-{
- bb_die($lang['NO_DRAFTS'] . '
'. $lang['RETURN_PROFILE'] .'
'. sprintf($lang['CLICK_RETURN_INDEX'], '', ''));
-}
-
-$i = 0;
-foreach ($rows as $row)
-{
- $category = ''. $row['cat_title'] .'';
- $forum = ''. $row['forum_name'] .'';
- $topic = ''. $row['topic_title'] .'';
-
- if($row["parent_id"] != 0) $forum .= ' » '. $row['parent_name'] .'';
-
- $template->assign_block_vars('DRAFT', array(
- "ROW_CLASS" => ($i % 2) ? 2 : 1,
- "TOPIC_ID" => $row['topic_id'],
- "TOPIC" => $topic,
- 'FORUM' => $forum,
- "CATEGORY" => $category,
- "DT_CREATE" => bb_date($row['topic_time'], 'Y-m-d H:i'),
- "EDIT_POST" => make_url('posting.php?mode=editpost&p='. $row['topic_first_post_id'])
- ));
- $i++;
-}
-
-$template->assign_vars(array(
- "PAGE_TITLE" => $lang['DRAFTS'],
- "USERNAME" => $profiledata['username'],
- "PROFILE" => profile_url(array('username' => $profiledata['username'], 'user_id' => $profiledata['user_id'])),
-));
-
-print_page('usercp_viewdraft.tpl');
\ No newline at end of file
diff --git a/upload/includes/ucp/usercp_viewprofile.php b/upload/includes/ucp/usercp_viewprofile.php
index 7fd7f3ecb..5303829b1 100644
--- a/upload/includes/ucp/usercp_viewprofile.php
+++ b/upload/includes/ucp/usercp_viewprofile.php
@@ -96,17 +96,6 @@ else if ($signature)
$signature = bbcode2html($signature);
}
-if($bb_cfg['status_of_draft'])
-{
- $count_draft = DB()->fetch_row("
- SELECT COUNT(topic_id) as count
- FROM ". BB_TOPICS . "
- WHERE topic_poster = {$profiledata['user_id']}
- AND is_draft = 1
- ");
- $count_draft = $count_draft["count"];
-}
-
$template->assign_vars(array(
'PAGE_TITLE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']),
'USERNAME' => $profiledata['username'],
@@ -127,8 +116,6 @@ $template->assign_vars(array(
'LOCATION' => $profiledata['user_from'],
'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'],
@@ -143,7 +130,6 @@ $template->assign_vars(array(
'U_SEARCH_USER' => "search.php?search_author=1&uid={$profiledata['user_id']}",
'U_SEARCH_TOPICS' => "search.php?uid={$profiledata['user_id']}&myt=1",
'U_SEARCH_RELEASES' => "tracker.php?rid={$profiledata['user_id']}#results",
- 'U_DRAFTS' => "profile.php?mode=viewdraft&u={$profiledata['user_id']}",
'S_PROFILE_ACTION' => 'profile.php',
diff --git a/upload/language/lang_english/lang_main.php b/upload/language/lang_english/lang_main.php
index acb0b27c0..9ad9d59f6 100644
--- a/upload/language/lang_english/lang_main.php
+++ b/upload/language/lang_english/lang_main.php
@@ -225,7 +225,6 @@ $lang['TOPIC_ANNOUNCEMENT'] = 'Announcement:';
$lang['TOPIC_STICKY'] = 'Sticky:';
$lang['TOPIC_MOVED'] = 'Moved:';
$lang['TOPIC_POLL'] = '[ Poll ]';
-$lang['TOPIC_DRAFT'] = '[ Draft ]';
$lang['MARK_TOPICS_READ'] = 'Mark all topics read';
$lang['TOPICS_MARKED_READ'] = 'The topics for this forum have just been marked read';
@@ -383,11 +382,6 @@ $lang['DELETE_POLL'] = 'Delete Poll';
$lang['ATTACH_SIGNATURE'] = 'Attach signature (signatures can be changed in profile)';
$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['NO_DRAFTS'] = 'The draft list is empty';
$lang['STORED'] = 'Your message has been entered successfully.';
$lang['DELETED'] = 'Your message has been deleted successfully.';
diff --git a/upload/language/lang_russian/lang_main.php b/upload/language/lang_russian/lang_main.php
index 91e5b353c..264b1ce25 100644
--- a/upload/language/lang_russian/lang_main.php
+++ b/upload/language/lang_russian/lang_main.php
@@ -223,7 +223,6 @@ $lang['TOPIC_ANNOUNCEMENT'] = 'Объявление:';
$lang['TOPIC_STICKY'] = 'Прилеплена:';
$lang['TOPIC_MOVED'] = 'Перемещена:';
$lang['TOPIC_POLL'] = '[ Опрос ]';
-$lang['TOPIC_DRAFT'] = '[ Черновик ]';
$lang['MARK_TOPICS_READ'] = 'Отметить все темы как прочтённые';
$lang['TOPICS_MARKED_READ'] = 'Все темы в этом форуме были отмечены как прочтённые';
@@ -385,11 +384,6 @@ $lang['MAX_SMILIES_PER_POST'] = 'Лимит в %s смайликов в сооб
$lang['ATTACH_SIGNATURE'] = 'Присоединить подпись (можно изменять в профиле)';
$lang['NOTIFY'] = 'Сообщать мне о получении ответа';
-$lang['TO_DRAFT'] = 'Сохранить как черновик';
-$lang['DRAFTS'] = 'Черновиков';
-$lang['CANNOT_DELETE_DRAFT'] = 'Извините, вы не можете удалять чужие черновики';
-$lang['CANNOT_VIEW_DRAFT'] = 'Извините, вы не можете просматривать чужие черновики';
-$lang['NO_DRAFTS'] = 'Список черновиков пуст';
$lang['STORED'] = 'Ваше сообщение было успешно добавлено';
$lang['DELETED'] = 'Ваше сообщение было успешно удалено';
diff --git a/upload/posting.php b/upload/posting.php
index c1e0f3af9..71cd99388 100644
--- a/upload/posting.php
+++ b/upload/posting.php
@@ -318,25 +318,15 @@ if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
require(INC_DIR .'topic_templates.php');
}
-// Notify and draft
-if (!IS_GUEST && $mode != 'newtopic') $post_data['is_draft'] = $post_info['is_draft'];
+// Notify
if ($submit || $refresh)
{
$notify_user = (int) !empty($_POST['notify']);
- if ($bb_cfg['status_of_draft'] && $post_data['first_post'])
- {
- $to_draft = (int) !empty($_POST['to_draft']);
- }
- else
- {
- $to_draft = ($mode == 'editpost') ? $post_info['is_draft'] : 0;
- }
}
else
{
$notify_user = bf($userdata['user_opt'], 'user_opt', 'notify');
- $to_draft = ($mode == 'editpost') ? $post_info['is_draft'] : 0;
-
+
if (!IS_GUEST && $mode != 'newtopic' && !$notify_user)
{
$notify_user = (int) DB()->fetch_row("
@@ -534,23 +524,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'];
- $post_data['to_draft'] = $to_draft;
update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
}
- if ($mode == 'editpost')
- {
- if ($post_info['is_draft'] != $to_draft)
- {
- if ($to_draft)
- {
- update_draft('is_draft', $forum_id, $topic_id, $post_info['topic_dl_type'], $post_id, $post_data['poster_id']);
- }
- else
- {
- update_draft('no_draft', $forum_id, $topic_id, $post_info['topic_dl_type'], $post_id, $post_data['poster_id']);
- }
- }
- }
$attachment_mod['posting']->insert_attachment($post_id);
if (!$error_msg && $mode != 'poll_delete')
@@ -563,7 +538,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 && !$to_draft)
+ if (defined('TORRENT_ATTACH_ID') && $bb_cfg['bt_newtopic_auto_reg'] && !$error_msg)
{
include(INC_DIR .'functions_torrent.php');
if(!DB()->fetch_row("SELECT attach_id FROM ". BB_BT_TORRENTS ." WHERE attach_id = ". TORRENT_ATTACH_ID))
@@ -872,7 +847,6 @@ $template->assign_vars(array(
'U_VIEWTOPIC' => ( $mode == 'reply' ) ? "viewtopic.php?" . POST_TOPIC_URL . "=$topic_id&postorder=desc" : '',
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
- 'S_DRAFT_CHECKED' => ($to_draft) ? 'checked="checked"' : '',
'S_TYPE_TOGGLE' => $topic_type_toggle,
'S_TOPIC_ID' => $topic_id,
'S_POST_ACTION' => "posting.php",
@@ -884,11 +858,6 @@ 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'])
{
diff --git a/upload/profile.php b/upload/profile.php
index f493f02bb..d020f77d1 100644
--- a/upload/profile.php
+++ b/upload/profile.php
@@ -47,10 +47,6 @@ switch ($mode)
require(INC_DIR . 'ucp/usercp_topic_watch.php');
break;
- case 'viewdraft':
- require(INC_DIR . 'ucp/usercp_viewdraft.php');
- break;
-
default:
bb_die('Invalid mode');
}
\ No newline at end of file
diff --git a/upload/search.php b/upload/search.php
index 46ce161f2..8ae5e922f 100644
--- a/upload/search.php
+++ b/upload/search.php
@@ -465,7 +465,7 @@ if ($post_mode)
// Run initial search for post_ids
if (!$items_found)
{
- $join_t = ($title_match || $my_topics || $new_topics || in_array($order_val, array($ord_last_p, $ord_created, $ord_name, $ord_repl || $bb_cfg['status_of_draft'])));
+ $join_t = ($title_match || $my_topics || $new_topics || in_array($order_val, array($ord_last_p, $ord_created, $ord_name, $ord_repl)));
$join_s = ($text_match_sql && !$title_match);
$join_p = ($my_posts || $join_s);
@@ -497,7 +497,6 @@ 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) $SQL['WHERE'][] = "t.is_draft = 0";
if ($text_match_sql)
{
@@ -580,14 +579,13 @@ 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' => $topic_draft . $first_post['topic_title'],
- 'TOPIC_ICON' => ($first_post['is_draft']) ? $images['draft'] : get_topic_icon($first_post, $is_unread_t),
+ 'TOPIC_TITLE' => $first_post['topic_title'],
+ 'TOPIC_ICON' => get_topic_icon($first_post, $is_unread_t),
));
$quote_btn = true;
@@ -629,7 +627,7 @@ else
// Run initial search for topic_ids
if (!$items_found)
{
- $join_t = ($title_match || $my_topics || $new_topics || $dl_search || $new_posts || in_array($order_val, array($ord_last_p, $ord_created, $ord_name, $ord_repl || $bb_cfg['status_of_draft'])));
+ $join_t = ($title_match || $my_topics || $new_topics || $dl_search || $new_posts || in_array($order_val, array($ord_last_p, $ord_created, $ord_name, $ord_repl)));
$join_s = ($text_match_sql && !$title_match);
$join_p = ($my_posts || $join_s);
$join_dl = ($dl_search);
@@ -685,7 +683,6 @@ else
}
}
if ($my_topics) $SQL['WHERE'][] = "t.topic_poster = $poster_id_val";
- if ($poster_id_val != $user_id && !IS_ADMIN) $SQL['WHERE'][] = "t.is_draft = 0";
if ($text_match_sql)
{
@@ -780,7 +777,6 @@ 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,
@@ -788,9 +784,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' => $topic_draft . wbr($topic['topic_title']),
+ 'TOPIC_TITLE' => wbr($topic['topic_title']),
'IS_UNREAD' => $is_unread,
- 'TOPIC_ICON' => ($topic['is_draft']) ? $images['draft'] : get_topic_icon($topic, $is_unread),
+ 'TOPIC_ICON' => 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'],
diff --git a/upload/templates/default/css/main.css b/upload/templates/default/css/main.css
index f2979e625..dee4acd03 100644
--- a/upload/templates/default/css/main.css
+++ b/upload/templates/default/css/main.css
@@ -735,9 +735,6 @@ td.topicSep { /* Topic type groups separator */
.topicSticky { /* Topic Sticky prefix */
color: #009900;
}
-.topicDraft { /* Topic Draft prefix */
- font-weight: normal; color: #C63B00;
-}
.topicPoll { /* Topic Poll prefix */
font-weight: normal; color: #006699;
}
diff --git a/upload/templates/default/images/draft.gif b/upload/templates/default/images/draft.gif
deleted file mode 100644
index 9225a1b1b..000000000
Binary files a/upload/templates/default/images/draft.gif and /dev/null differ
diff --git a/upload/templates/default/page_header.tpl b/upload/templates/default/page_header.tpl
index 6e681faed..e8867d611 100644
--- a/upload/templates/default/page_header.tpl
+++ b/upload/templates/default/page_header.tpl
@@ -472,7 +472,6 @@ $(document).ready(function() {
{L_SEARCH_DL_COMPLETE_DOWNLOADS}
{L_SEARCH_DL_WILL_DOWNLOADS}
{L_WATCHED_TOPICS}
- {L_DRAFTS}
diff --git a/upload/templates/default/posting.tpl b/upload/templates/default/posting.tpl
index dcfe69c1d..bebf12520 100644
--- a/upload/templates/default/posting.tpl
+++ b/upload/templates/default/posting.tpl
@@ -135,14 +135,6 @@
-
-
- | - |
{L_CATEGORY} | -{L_FORUM} | -{L_TOPIC} | -{L_DATE} | -{L_ACTION} | -||||
---|---|---|---|---|---|---|---|---|
{DRAFT.CATEGORY} | -{DRAFT.FORUM} | -{DRAFT.TOPIC} | -{DRAFT.DT_CREATE} | -{L_EDIT} | -{L_DELETE} | -Публиковать | -||
- |
{LAST_VISIT_DATE}
-{CURRENT_TIME}
-{S_TIMEZONE}
-