mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
fix warning
This commit is contained in:
@@ -348,7 +348,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
$res = sql_query("SELECT id, seeders, leechers, comments FROM torrents") or sqlerr(__FILE__, __LINE__);
|
||||
while ($row = mysql_fetch_assoc($res)) {
|
||||
$id = $row["id"];
|
||||
$torr = $torrents[$id];
|
||||
$torr = $torrents[$id] ?? [];
|
||||
foreach ($fields as $field) {
|
||||
if (!isset($torr[$field]))
|
||||
$torr[$field] = 0;
|
||||
@@ -924,9 +924,9 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
if (count($delids))
|
||||
sql_query("DELETE FROM files WHERE torrent IN (" . join(",", $delids) . ")") or sqlerr(__FILE__, __LINE__);
|
||||
} while (0);
|
||||
$log = "delete torrents that doesn't exist any more";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
$log = "delete torrents that doesn't exist any more";
|
||||
do_log($log);
|
||||
printProgress($log);
|
||||
}
|
||||
|
||||
|
||||
@@ -2802,7 +2802,7 @@ function deletetorrent($id) {
|
||||
foreach(array("peers", "files", "comments") as $x) {
|
||||
sql_query("DELETE FROM $x WHERE torrent = ".mysql_real_escape_string($id));
|
||||
}
|
||||
unlink("$torrent_dir/$id.torrent");
|
||||
unlink(getFullDirectory("$torrent_dir/$id.torrent"));
|
||||
}
|
||||
|
||||
function pager($rpp, $count, $href, $opts = array(), $pagename = "page") {
|
||||
|
||||
Reference in New Issue
Block a user