diff options
| author | gpolins <gpolins@users.sourceforge.net> | 2001-08-17 22:54:00 +0000 |
|---|---|---|
| committer | gpolins <gpolins@users.sourceforge.net> | 2001-08-17 22:54:00 +0000 |
| commit | a8a370a6abca0a6f81124f7f172f5a323c80af56 (patch) | |
| tree | a5a0ccf29fdaea061b24979c26d97bc69cd58032 /phpBB/modcp.php | |
| parent | 9b12f772cf176fd5e7e0d481fea266161b0437bf (diff) | |
| download | forums-a8a370a6abca0a6f81124f7f172f5a323c80af56.tar forums-a8a370a6abca0a6f81124f7f172f5a323c80af56.tar.gz forums-a8a370a6abca0a6f81124f7f172f5a323c80af56.tar.bz2 forums-a8a370a6abca0a6f81124f7f172f5a323c80af56.tar.xz forums-a8a370a6abca0a6f81124f7f172f5a323c80af56.zip | |
Updated deletion to include sync
git-svn-id: file:///svn/phpbb/trunk@902 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/modcp.php')
| -rw-r--r-- | phpBB/modcp.php | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/phpBB/modcp.php b/phpBB/modcp.php index 44b524baa7..e8a69f4875 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -223,42 +223,8 @@ switch($mode) message_die(GENERAL_ERROR, "Could not delete moved topics!", "Error", __LINE__, __FILE__, $moved_topics); } - if(SQL_LAYER != "mysql") - { - $update_index = "UPDATE ".FORUMS_TABLE." - SET forum_topics = forum_topics - $topics_removed, - forum_posts = forum_posts - $posts_removed, - forum_last_post_id = (select max(post_id) FROM ".POSTS_TABLE." - WHERE forum_id = $forum_id) WHERE forum_id = $forum_id"; + sync("forum",$forum_id); - if(!$result = $db->sql_query($update_index, END_TRANSACTION)) - { - message_die(GENERAL_ERROR, "Could not update index!", "Error", __LINE__, __FILE__, $delete_topics); - } - } - else - { - $sql = "select max(post_id) AS last_post FROM ".POSTS_TABLE." WHERE forum_id = $forum_id"; - if(!$result = $db->sql_query($sql)) - { - message_die(GENERAL_ERROR, "Could not get last post id", "Error", __LINE__, __FILE__, $sql); - } - $last_post_row = $db->sql_fetchrowset($result); - $last_post = $last_post_row[0]['last_post']; - if($last_post == "") - { - $last_post = 'NULL'; - } - $update_index = "UPDATE ".FORUMS_TABLE." - SET forum_topics = forum_topics - $topics_removed, - forum_posts = forum_posts - $posts_removed, - forum_last_post_id = $last_post - WHERE forum_id = $forum_id"; - if(!$result = $db->sql_query($update_index, END_TRANSACTION)) - { - message_die(GENERAL_ERROR, "Could not update index!", "Error", __LINE__, __FILE__, $update_index); - } - } if($quick_op) { $next_page = "viewforum.$phpEx?".POST_FORUM_URL."=$forum_id"; |
