View Single Post
  #219  
Old 24th April 2010, 14:51
tekmobile tekmobile is offline
Senior Member
 
Join Date: Jul 2009
United Kingdom
Posts: 16
Default
Its always been like this but the only mod ive added that can affect comments was one to delete old inactive torrents but it was doing the same before the only other mods ive done are to implement a credit based system so users gain credit for uploading and if there's insufficient credit downloads are disabled.

IP checking on signup to help combat duplicate accounts (same nothing to affect comments)
and a few other small mods to help detect cheating


PHP Code:
    $res mysql_query("SELECT id, name, last_action, UNIX_TIMESTAMP(last_action) AS lastupdate FROM torrents");
    while (
$arr mysql_fetch_assoc($res))
    {
if (
$arr['lastupdate'] < time() - 3628800){
        
write_log("Torrent ".$arr['id']." (".$arr['name'].") was deleted by system (Dead since ".$arr['last_action'].")");
        @
unlink("$torrent_dir/$arr[id].torrent");
        
mysql_query("DELETE FROM torrents WHERE id=$arr[id]");
        
mysql_query("DELETE FROM peers WHERE torrent=$arr[id]");
        
mysql_query("DELETE FROM comments WHERE torrent=$arr[id]");
        
mysql_query("DELETE FROM files WHERE torrent=$arr[id]");
                
mysql_query("DELETE FROM snatched WHERE torrentid =$arr[id]");
}
    } 
Bump:
Quote:
Originally Posted by tekmobile View Post
Its always been like this but the only mod ive added that can affect comments was one to delete old inactive torrents but it was doing the same before the only other mods ive done are to implement a credit based system so users gain credit for uploading and if there's insufficient credit downloads are disabled.

IP checking on signup to help combat duplicate accounts (same nothing to affect comments)
and a few other small mods to help detect cheating
I think I may have found where this issue lies.

On uploading a few torrents the other day I noticed that all comments disappeared after I uploaded a new torrent so I looked through the takeupload.php and commented out the line to remove offer comments

@mysql_query("DELETE FROM `comments` WHERE `offer` = ". ($_POST['offer'] + 0). "");

after doing this all the comments have remained for the last few days even after various new uploads.
Reply With Quote