За найденныйе баги спасибо JDVU git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@503 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
gemini_13@torba.su 2013-05-24 13:05:39 +00:00
commit 4f3e62b4a1
8 changed files with 13 additions and 10 deletions

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'] = '22-05-2013';
$bb_cfg['tp_release_state'] = 'R501';
$bb_cfg['tp_release_date'] = '24-05-2013';
$bb_cfg['tp_release_state'] = 'R503';
// Database
$charset = 'utf8';

View file

@ -320,6 +320,7 @@ 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 = '';
@ -388,7 +389,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
else if ($mode != 'poll_delete')
{
if (!$post_data['to_draft'])
if (!$to_draft)
{
$forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : "");
}
@ -399,7 +400,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
$topic_update_sql .= 'topic_vote = 0';
}
if (!$post_data['to_draft'])
if (!$to_draft)
{
$sql = "UPDATE " . BB_FORUMS . " SET
$forum_update_sql
@ -421,7 +422,7 @@ function update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $u
}
}
if ($mode != 'poll_delete' || $post_data['to_draft'])
if ($mode != 'poll_delete' || $to_draft)
{
$sql = "SELECT forum_postcount
FROM " . BB_FORUMS . "

View file

@ -22,7 +22,7 @@ $sql = "
if(!$rows = DB()->fetch_rowset($sql))
{
bb_die('Список черновиков пуст<br /><br /><a href="'. PROFILE_URL . $profiledata['user_id'] .'">'. $lang['RETURN_PROFILE'] .'</a><br /><br />'. sprintf($lang['CLICK_RETURN_INDEX'], '<a href="index.php">', '</a>'));
bb_die($lang['NO_DRAFTS'] . '<br /><br /><a href="'. PROFILE_URL . $profiledata['user_id'] .'">'. $lang['RETURN_PROFILE'] .'</a><br /><br />'. sprintf($lang['CLICK_RETURN_INDEX'], '<a href="index.php">', '</a>'));
}
$i = 0;

View file

@ -386,6 +386,7 @@ $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.';

View file

@ -388,6 +388,7 @@ $lang['TO_DRAFT'] = 'Сохранить как черновик';
$lang['DRAFTS'] = 'Черновиков';
$lang['CANNOT_DELETE_DRAFT'] = 'Извините, вы не можете удалять чужие черновики';
$lang['CANNOT_VIEW_DRAFT'] = 'Извините, вы не можете просматривать чужие черновики';
$lang['NO_DRAFTS'] = 'Список черновиков пуст';
$lang['STORED'] = 'Ваше сообщение было успешно добавлено';
$lang['DELETED'] = 'Ваше сообщение было успешно удалено';

View file

@ -321,12 +321,12 @@ if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
if ($submit || $refresh)
{
$notify_user = (int) !empty($_POST['notify']);
$to_draft = (int) !empty($_POST['to_draft']);
$to_draft = ($post_data['first_post']) ? (int) !empty($_POST['to_draft']) : 0;
}
else
{
$notify_user = bf($userdata['user_opt'], 'user_opt', 'notify');
$to_draft = ($mode == 'editpost') ? $post_info['is_draft'] : false;
$to_draft = ($mode == 'editpost') ? $post_info['is_draft'] : 0;
if (!IS_GUEST && $mode != 'newtopic' && !$notify_user)
{

View file

@ -648,7 +648,7 @@ else
}
// FROM
if ($join_t || $bb_cfg['status_of_draft']) $SQL['FROM'][] = $topics_tbl;
if ($join_t) $SQL['FROM'][] = $topics_tbl;
if ($join_p) $SQL['FROM'][] = $posts_tbl;
if (!$SQL['FROM'])

View file

@ -465,7 +465,7 @@ $(document).ready(function() {
<a class="med" href="{U_SEARCH}?dlu={SESSION_USER_ID}&dlc=1">{L_SEARCH_DL_COMPLETE_DOWNLOADS}</a>
<a class="med" href="{U_SEARCH}?dlu={SESSION_USER_ID}&dlw=1">{L_SEARCH_DL_WILL_DOWNLOADS}</a>
<a class="med" href="{U_WATCHED_TOPICS}">{L_WATCHED_TOPICS}</a>
<a class="med" href="{U_MY_DRAFTS}">{L_DRAFTS}</a>
<!-- IF $bb_cfg['status_of_draft'] --><a class="med" href="{U_MY_DRAFTS}">{L_DRAFTS}</a><!-- ENDIF -->
</div>
</div>
<!-- ELSE -->