aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart van Bragt <bartvb@users.sourceforge.net>2002-01-10 23:27:10 +0000
committerBart van Bragt <bartvb@users.sourceforge.net>2002-01-10 23:27:10 +0000
commit355327426a0a3dc8a84324eb0bd782adf0e09a07 (patch)
treefe747e567c2dffab3b24004296b377466f6f16aa
parentc8d71fc47ef84deece228cca8c7257bbdae2d4ad (diff)
downloadforums-355327426a0a3dc8a84324eb0bd782adf0e09a07.tar
forums-355327426a0a3dc8a84324eb0bd782adf0e09a07.tar.gz
forums-355327426a0a3dc8a84324eb0bd782adf0e09a07.tar.bz2
forums-355327426a0a3dc8a84324eb0bd782adf0e09a07.tar.xz
forums-355327426a0a3dc8a84324eb0bd782adf0e09a07.zip
Fixed display of feedback message when deleting topic
git-svn-id: file:///svn/phpbb/trunk@1837 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/modcp.php102
1 files changed, 7 insertions, 95 deletions
diff --git a/phpBB/modcp.php b/phpBB/modcp.php
index 2f3cba3c06..00d1500d92 100644
--- a/phpBB/modcp.php
+++ b/phpBB/modcp.php
@@ -33,6 +33,7 @@ $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
+include($phpbb_root_path . 'includes/search.'.$phpEx);
//
// Obtain initial var settings
@@ -255,6 +256,8 @@ switch($mode)
message_die(GENERAL_ERROR, "Could not delete topics", "", __LINE__, __FILE__, $sql);
}
+
+
if( $post_id_sql != "" )
{
$sql = "DELETE
@@ -284,100 +287,7 @@ switch($mode)
//
// Delete unmatched words
//
- switch(SQL_LAYER)
- {
- case 'postgresql':
- $sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
- WHERE word_id NOT IN (
- SELECT word_id
- FROM " . SEARCH_MATCH_TABLE . "
- GROUP BY word_id)";
- $result = $db->sql_query($sql);
- if( !$result )
- {
- message_die(GENERAL_ERROR, "Couldn't delete old words from word table", __LINE__, __FILE__, $sql);
- }
-
- $unmatched_count = $db->sql_affectedrows();
-
- break;
-
- case 'oracle':
- $sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
- WHERE word_id IN (
- SELECT w.word_id
- FROM " . SEARCH_WORD_TABLE . " w, " . SEARCH_MATCH_TABLE . " m
- WHERE w.word_id = m.word_id(+)
- AND m.word_id IS NULL)";
- $result = $db->sql_query($sql);
- if( !$result )
- {
- message_die(GENERAL_ERROR, "Couldn't delete old words from word table", __LINE__, __FILE__, $sql);
- }
-
- $unmatched_count = $db->sql_affectedrows();
-
- break;
-
- case 'mssql':
- case 'msaccess':
- $sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
- WHERE word_id IN (
- SELECT w.word_id
- FROM " . SEARCH_WORD_TABLE . " w
- LEFT JOIN " . SEARCH_MATCH_TABLE . " m ON m.word_id = w.word_id
- WHERE m.word_id IS NULL)";
- $result = $db->sql_query($sql);
- if( !$result )
- {
- message_die(GENERAL_ERROR, "Couldn't delete old words from word table", __LINE__, __FILE__, $sql);
- }
-
- $unmatched_count = $db->sql_affectedrows();
-
- break;
-
- case 'mysql':
- case 'mysql4':
- $sql = "SELECT w.word_id
- FROM " . SEARCH_WORD_TABLE . " w
- LEFT JOIN " . SEARCH_MATCH_TABLE . " m ON m.word_id = w.word_id
- WHERE m.word_id IS NULL";
- if( $result = $db->sql_query($sql) )
- {
- if( $unmatched_count = $db->sql_numrows($result) )
- {
- $rowset = array();
- while( $row = $db->sql_fetchrow($result) )
- {
- $rowset[] = $row['word_id'];
- }
-
- $word_id_sql = implode(", ", $rowset);
-
- if( $word_id_sql )
- {
- $sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
- WHERE word_id IN ($word_id_sql)";
- $result = $db->sql_query($sql);
- if( !$result )
- {
- message_die(GENERAL_ERROR, "Couldn't delete word list entry", "", __LINE__, __FILE__, $sql);
- }
- }
- else
- {
- return 0;
- }
- }
- else
- {
- return 0;
- }
- }
-
- break;
- }
+ remove_unmatched_words();
}
@@ -437,6 +347,8 @@ switch($mode)
}
else
{
+ // Not confirmed, show confirmation message
+
if( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected'], "");
@@ -1174,4 +1086,4 @@ switch($mode)
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
-?> \ No newline at end of file
+?>