|
From: Paul S. O. <ps...@us...> - 2002-03-22 17:54:36
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv27651/includes
Modified Files:
prune.php
Log Message:
Change a few quotes
Index: prune.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/prune.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** prune.php 20 Mar 2002 19:59:42 -0000 1.14
--- prune.php 22 Mar 2002 17:54:33 -0000 1.15
***************
*** 20,23 ****
--- 20,24 ----
*
***************************************************************************/
+
if ( !defined('IN_PHPBB') )
{
***************
*** 40,44 ****
AND t.topic_type <> " . POST_ANNOUNCE . "
AND p.post_id = t.topic_last_post_id";
! if ( $prune_date != "" )
{
$sql .= " AND p.post_time < $prune_date";
--- 41,45 ----
AND t.topic_type <> " . POST_ANNOUNCE . "
AND p.post_id = t.topic_last_post_id";
! if ( $prune_date != '' )
{
$sql .= " AND p.post_time < $prune_date";
***************
*** 46,59 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain lists of topics to prune.", "", __LINE__, __FILE__, $sql);
}
! $sql_topics = "";
while( $row = $db->sql_fetchrow($result) )
{
! $sql_topics .= ( ( $sql_topics != "" ) ? ", " : "" ) . $row['topic_id'];
}
! if( $sql_topics != "" )
{
$sql = "SELECT post_id
--- 47,60 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain lists of topics to prune', '', __LINE__, __FILE__, $sql);
}
! $sql_topics = '';
while( $row = $db->sql_fetchrow($result) )
{
! $sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id'];
}
! if( $sql_topics != '' )
{
$sql = "SELECT post_id
***************
*** 63,76 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain list of posts to prune.", "", __LINE__, __FILE__, $sql);
}
! $sql_post = "";
while ( $row = $db->sql_fetchrow($result) )
{
! $sql_post .= ( ( $sql_post != "" ) ? ", " : "" ) . $row['post_id'];
}
! if ( $sql_post != "" )
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
--- 64,77 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain list of posts to prune', '', __LINE__, __FILE__, $sql);
}
! $sql_post = '';
while ( $row = $db->sql_fetchrow($result) )
{
! $sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id'];
}
! if ( $sql_post != '' )
{
$sql = "DELETE FROM " . TOPICS_TABLE . "
***************
*** 78,82 ****
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
! message_die(GENERAL_ERROR, "Couldn't delete topics during prune.", "", __LINE__, __FILE__, $sql);
}
--- 79,83 ----
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
! message_die(GENERAL_ERROR, 'Could not delete topics during prune', '', __LINE__, __FILE__, $sql);
}
***************
*** 87,91 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't delete post_text during prune.", "", __LINE__, __FILE__, $sql);
}
--- 88,92 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not delete post_text during prune', '', __LINE__, __FILE__, $sql);
}
***************
*** 96,100 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't delete post during prune.", "", __LINE__, __FILE__, $sql);
}
--- 97,101 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not delete post during prune', '', __LINE__, __FILE__, $sql);
}
***************
*** 103,107 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't delete search matches", "", __LINE__, __FILE__, $sql);
}
--- 104,108 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not delete search matches', '', __LINE__, __FILE__, $sql);
}
***************
*** 113,132 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't update forum data after prune.", "", __LINE__, __FILE__, $sql);
}
! return array ("topics" => $pruned_topics, "posts" => $pruned_posts);
}
}
! return array("topics" => 0, "posts" => 0);
}
! /***************************************************************************\
! *
! * Function auto_prune(), this function will read the configuration data from
! * the auto_prune table and call the prune function with the necessary info.
! *
! ****************************************************************************/
function auto_prune($forum_id = 0)
{
--- 114,131 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not update forum data after prune', '', __LINE__, __FILE__, $sql);
}
! return array ('topics' => $pruned_topics, 'posts' => $pruned_posts);
}
}
! return array('topics' => 0, 'posts' => 0);
}
! //
! // Function auto_prune(), this function will read the configuration data from
! // the auto_prune table and call the prune function with the necessary info.
! //
function auto_prune($forum_id = 0)
{
***************
*** 136,143 ****
FROM " . PRUNE_TABLE . "
WHERE forum_id = $forum_id";
-
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Auto-Prune: Couldn't read auto_prune table.", __LINE__, __FILE__);
}
--- 135,141 ----
FROM " . PRUNE_TABLE . "
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not read auto_prune table', '', __LINE__, __FILE__, $sql);
}
***************
*** 156,160 ****
if ( !$db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Auto-Prune: Couldn't update forum table.", __LINE__, __FILE__);
}
}
--- 154,158 ----
if ( !$db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, 'Could not update forum table', '', __LINE__, __FILE__, $sql);
}
}
***************
*** 164,166 ****
}
! ?>
--- 162,164 ----
}
! ?>
\ No newline at end of file
|