Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Torrent Strike (http://www.bvlist.com/forumdisplay.php?f=21)
-   -   TTL (http://www.bvlist.com/showthread.php?t=2041)

rytisp 18th February 2009 01:32

TTL
 
hello, firstly I whant to ask when the torrentstrike.info will be opened ? :( And here is my question from the thread : On tstrike, how to remove TTL function ? ( Time to live ).

TheOracle 20th February 2009 07:51

in cleanup.php which you can find in the include folder

comment out or delete
Code:

        $dt = sqlesc(get_date_time(gmtime() - $torrent_ttl));
        $res = mysql_query("SELECT id, name FROM torrents WHERE added < $dt AND manual_delete = 'no' AND seeders=0 AND leechers=0");
        while ($arr = mysql_fetch_assoc($res))
        {
                @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]");
                write_log("Torrent $arr[id] ($arr[name]) was deleted by system, older than TTL");
        }


wMan 21st February 2009 15:29

TimeToLive <-- i add this word so next time the search will find this topic

cleanup.php

delete



PHP Code:

// delete old torrents
    
$days 28;
    
$dt sqlesc(get_date_time(gmtime() - ($days 86400)));
    
$res mysql_query("SELECT id, name FROM torrents WHERE added < $dt");
    while (
$arr mysql_fetch_assoc($res))
    {
        @
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]");
        
write_log("Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days)");
    } 


bittorrent.php

delete



PHP Code:

<td class="colhead" align="center">TTL</td


and delete

PHP Code:

        $ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
        if (
$ttl == 1$ttl .= "hour"; else $ttl .= "hours";
        print(
"<td align=center>$ttl</td>\n"); 


userdetails.php

delete



PHP Code:

<td class=colhead align=center>TTL</td


and delete



PHP Code:

$ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($arr["added"])) / 3600);
    if (
$ttl == 1$ttl .= "hour"; else $ttl .= "hours"


and delete



PHP Code:

<td align=center>$ttl</td



All times are GMT +2. The time now is 21:39.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.