1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

re-add quote button. ;)

git-svn-id: file:///svn/phpbb/trunk@4551 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-10-11 11:46:29 +00:00
parent ee056e09f7
commit 8f4967a228
3 changed files with 11 additions and 49 deletions

View File

@ -130,7 +130,7 @@ function format_display(&$message, &$signature, $uid, $siguid, $html, $bbcode, $
}
// Update Last Post Informations
function update_last_post_information($type, $id, &$parent_sql)
function update_last_post_information($type, $id)
{
global $db;
@ -179,26 +179,6 @@ function update_last_post_information($type, $id, &$parent_sql)
$update_sql[] = 'forum_last_poster_id = 0';
$update_sql[] = "forum_last_poster_name = ''";
}
/*
// Return 'Udate all Parents' information
// Not able to test this, since subforums seems to be broken
if ($type == 'forum')
{
$forum_parents = get_forum_branch($id, 'parents', 'descending', FALSE);
$forum_ids = array();
foreach ($forum_parents as $row)
{
$forum_ids[] = (int) $row['forum_id'];
}
if (sizeof($forum_ids))
{
$parent_sql[] = 'UPDATE ' . FORUMS_TABLE . '
SET ' . implode(', ', $update_sql) . '
WHERE forum_id IN (' . implode(', ', $forum_ids) . ')';
}
}
*/
return $update_sql;
}

View File

@ -501,7 +501,7 @@ if ($submit || $preview || $refresh)
// notify and show user the post made between his request and the final submit
if (($mode == 'reply' || $mode == 'quote') && $topic_cur_post_id != $topic_last_post_id)
{
if (topic_review($topic_id, 'post_review', $topic_cur_post_id))
if (topic_review($topic_id, $forum_id, 'post_review', $topic_cur_post_id))
{
$template->assign_var('S_POST_REVIEW', TRUE);
}
@ -1064,7 +1064,7 @@ make_jumpbox('viewforum.'.$phpEx);
// Topic review
if ($mode == 'reply' || $mode == 'quote')
{
if (topic_review($topic_id))
if (topic_review($topic_id, $forum_id))
{
$template->assign_var('S_DISPLAY_REVIEW', TRUE);
}
@ -1320,7 +1320,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
}
// Topic Review
function topic_review($topic_id, $mode = 'topic_review', $cur_post_id = 0)
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0)
{
global $user, $auth, $db, $template, $bbcode, $template;
global $censors, $config, $phpbb_root_path, $phpEx, $SID;
@ -1445,7 +1445,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, $data)
// Specify our post mode
$post_mode = ($data['topic_first_post_id'] == $data['topic_last_post_id']) ? 'delete_topic' : (($data['topic_first_post_id'] == $post_id) ? 'delete_first_post' : (($data['topic_last_post_id'] == $post_id) ? 'delete_last_post' : 'delete'));
$sql_data = $parent_sql = array();
$sql_data = array();
$next_post_id = 0;
$db->sql_transaction();
@ -1476,7 +1476,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, $data)
$sql_data['forum'] .= ($data['topic_approved']) ? ', forum_topics = forum_topics - 1' : '';
}
$update = update_last_post_information('forum', $forum_id, $parent_sql);
$update = update_last_post_information('forum', $forum_id);
if (sizeof($update))
{
$sql_data['forum'] .= ($sql_data['forum'] != '') ? ', ' . implode(', ', $update) : implode(', ', $update);
@ -1522,7 +1522,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, $data)
$sql_data['forum'] = 'forum_posts = forum_posts - 1';
}
$update = update_last_post_information('forum', $forum_id, $parent_sql);
$update = update_last_post_information('forum', $forum_id);
if (sizeof($update))
{
$sql_data['forum'] .= ($sql_data['forum'] != '') ? ', ' . implode(', ', $update) : implode(', ', $update);
@ -1585,15 +1585,7 @@ function delete_post($mode, $post_id, $topic_id, $forum_id, $data)
WHERE user_id = ' . $data['poster_id'];
$db->sql_query($sql);
}
/*
if (sizeof($parent_sql))
{
foreach ($parent_sql as $sql)
{
$db->sql_query($sql);
}
}
*/
$db->sql_transaction('commit');
return $next_post_id;
@ -1962,20 +1954,18 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
$db->sql_transaction('commit');
$parent_sql = array();
if ($post_mode == 'post' || $post_mode == 'reply' || $post_mode == 'edit_last_post')
{
if ($topic_type != POST_GLOBAL)
{
$sql_data['forum']['stat'][] = implode(', ', update_last_post_information('forum', $data['forum_id'], $parent_sql));
$sql_data['forum']['stat'][] = implode(', ', update_last_post_information('forum', $data['forum_id']));
}
$sql_data['topic']['stat'][] = implode(', ', update_last_post_information('topic', $data['topic_id']));
}
if ($make_global)
{
$sql_data['forum']['stat'][] = implode(', ', update_last_post_information('forum', $data['forum_id'], $parent_sql));
$sql_data['forum']['stat'][] = implode(', ', update_last_post_information('forum', $data['forum_id']));
}
if ($post_mode == 'edit_topic')
@ -2034,14 +2024,6 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
$db->sql_query($sql);
}
if (sizeof($parent_sql))
{
foreach ($parent_sql as $sql)
{
$db->sql_query($sql);
}
}
// Fulltext parse
if ($data['message_md5'] != $data['post_checksum'])
{

View File

@ -103,7 +103,7 @@ function addquote(post_id, username) {
<td valign="top">
<table width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><div id="message_{topic_review_row.POST_ID}" class="postbody">{topic_review_row.MESSAGE}</div></td>
<td><div id="message_{topic_review_row.U_POST_ID}" class="postbody">{topic_review_row.MESSAGE}</div></td>
</tr>
</table>
</td>