|
From: Bart v. B. <ba...@us...> - 2002-01-10 23:27:14
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv3551
Modified Files:
modcp.php
Log Message:
Fixed display of feedback message when deleting topic
Index: modcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/modcp.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -C2 -r1.53 -r1.54
*** modcp.php 2001/12/31 21:57:15 1.53
--- modcp.php 2002/01/10 23:27:10 1.54
***************
*** 34,37 ****
--- 34,38 ----
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
+ include($phpbb_root_path . 'includes/search.'.$phpEx);
//
***************
*** 256,259 ****
--- 257,262 ----
}
+
+
if( $post_id_sql != "" )
{
***************
*** 285,383 ****
// 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;
- }
-
}
--- 288,293 ----
// Delete unmatched words
//
! remove_unmatched_words();
}
***************
*** 438,441 ****
--- 348,353 ----
else
{
+ // Not confirmed, show confirmation message
+
if( empty($HTTP_POST_VARS['topic_id_list']) && empty($topic_id) )
{
***************
*** 1175,1177 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
--- 1087,1089 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
|