|
From: Paul S. O. <ps...@us...> - 2002-04-03 00:29:43
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv18447/includes
Modified Files:
functions_post.php functions_search.php
Log Message:
Various updates with any luck they fix a few minor issues without causing new ones ...
Index: functions_post.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions_post.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** functions_post.php 25 Mar 2002 13:03:55 -0000 1.6
--- functions_post.php 2 Apr 2002 14:03:49 -0000 1.7
***************
*** 528,532 ****
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
! WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) )
{
--- 528,533 ----
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
! WHERE topic_id = $topic_id
! OR topic_moved_id = $topic_id";
if ( !($db->sql_query($sql)) )
{
Index: functions_search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions_search.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** functions_search.php 31 Mar 2002 00:06:34 -0000 1.7
--- functions_search.php 2 Apr 2002 14:03:49 -0000 1.8
***************
*** 207,211 ****
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text)
VALUES ('" . $word[$i] . "')";
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
--- 207,211 ----
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text)
VALUES ('" . $word[$i] . "')";
! if( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
***************
*** 231,235 ****
}
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
--- 231,235 ----
}
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
***************
*** 248,252 ****
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($match_sql)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql);
--- 248,252 ----
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($match_sql)";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql);
***************
*** 315,319 ****
$common_word_id .= ( ( $common_word_id != '' ) ? ', ' : '' ) . $row['word_id'];
}
-
$db->sql_freeresult($result);
--- 315,318 ----
***************
*** 323,327 ****
SET word_common = " . TRUE . "
WHERE word_id IN ($common_word_id)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
--- 322,326 ----
SET word_common = " . TRUE . "
WHERE word_id IN ($common_word_id)";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
***************
*** 330,334 ****
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN ($common_word_id)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete word match entry', '', __LINE__, __FILE__, $sql);
--- 329,333 ----
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN ($common_word_id)";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete word match entry', '', __LINE__, __FILE__, $sql);
***************
*** 379,383 ****
$sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
WHERE word_id IN ($word_id_sql)";
! if ( !($result = $db->sql_query($sql, END_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
--- 378,382 ----
$sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
WHERE word_id IN ($word_id_sql)";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
***************
*** 404,408 ****
HAVING COUNT(word_id) = 1
)";
! if ( !($result = $db->sql_query($sql, END_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql);
--- 403,407 ----
HAVING COUNT(word_id) = 1
)";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not delete old words from word table', '', __LINE__, __FILE__, $sql);
***************
*** 416,420 ****
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id IN ($post_id_sql)";
! if ( !($db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
--- 415,419 ----
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id IN ($post_id_sql)";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
***************
*** 458,461 ****
--- 457,461 ----
$username_list .= '<option>' . $lang['No_match']. '</option>';
}
+ $db->sql_freeresult($result);
}
|