Skip to content
Browse files

small bugfix for when you delete threads which havent been updated yet

  • Loading branch information...
1 parent 2e48849 commit d3c6aa64d0ff20df388f7578d1fc83da7f6b3041 @emoose committed May 21, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 chan_archiver.php
View
6 chan_archiver.php
@@ -250,8 +250,10 @@ public function removeThread( $threadid, $board, $deletefiles = 0 )
return false;
if ( $deletefiles )
{
- $this->rrmdir( $archiver_config[ 'storage' ] . $board . "/" . $threadid . "/" );
- unlink( $archiver_config[ 'storage' ] . $board . "/" . $threadid . ".html" );
+ if(is_dir( $archiver_config[ 'storage' ] . $board . "/" . $threadid . "/" ))
+ $this->rrmdir( $archiver_config[ 'storage' ] . $board . "/" . $threadid . "/" );
+ if(file_exists( $archiver_config[ 'storage' ] . $board . "/" . $threadid . ".html" ))
+ unlink( $archiver_config[ 'storage' ] . $board . "/" . $threadid . ".html" );
}
mysql_query( sprintf( "DELETE FROM `Threads` WHERE `ID` = '%s' AND Board = '%s'", $threadid, $board ) );
mysql_query( sprintf( "DELETE FROM `Posts` WHERE `ThreadID` = '%s' AND Board = '%s'", $threadid, $board ) );

0 comments on commit d3c6aa6

Please sign in to comment.
Something went wrong with that request. Please try again.