mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 04:20:49 +08:00
fix rss sticky
This commit is contained in:
@@ -934,23 +934,24 @@ function docleanup($forceAll = 0, $printProgress = false) {
|
||||
}
|
||||
|
||||
//delete duplicated snatched
|
||||
$snatchRes = sql_query('select userid, torrentid, group_concat(id) as ids from snatched group by userid, torrentid having(count(*)) > 1');
|
||||
while ($snatchRow = mysql_fetch_assoc($snatchRes)) {
|
||||
$torrentId = $snatchRow['torrentid'];
|
||||
$userId = $snatchRow['userid'];
|
||||
$idArr = explode(',', $snatchRes['ids']);
|
||||
sort($idArr, SORT_NUMERIC);
|
||||
$remainId = array_pop($idArr);
|
||||
$delIdStr = implode(',', $idArr);
|
||||
do_log("[DELETE_DUPLICATED_SNATCH], torrent: $torrentId, user: $userId");
|
||||
sql_query("delete from snatched where id in ($delIdStr)");
|
||||
sql_query("update claims set snatched_id = $remainId where torrent_id = $torrentId and uid = $userId");
|
||||
}
|
||||
$log = "delete duplicated snatched";
|
||||
do_log($log);
|
||||
if ($printProgress) {
|
||||
printProgress($log);
|
||||
}
|
||||
//is it necessary ? duplicate snatch update by torrent_id + userid, all records key fields are the same
|
||||
// $snatchRes = sql_query('select userid, torrentid, group_concat(id) as ids from snatched group by userid, torrentid having(count(*)) > 1');
|
||||
// while ($snatchRow = mysql_fetch_assoc($snatchRes)) {
|
||||
// $torrentId = $snatchRow['torrentid'];
|
||||
// $userId = $snatchRow['userid'];
|
||||
// $idArr = explode(',', $snatchRow['ids']);
|
||||
// sort($idArr, SORT_NUMERIC);
|
||||
// $remainId = array_pop($idArr);
|
||||
// $delIdStr = implode(',', $idArr);
|
||||
// do_log("[DELETE_DUPLICATED_SNATCH], torrent: $torrentId, user: $userId, snatchIdStr: $delIdStr");
|
||||
// sql_query("delete from snatched where id in ($delIdStr)");
|
||||
// sql_query("update claims set snatched_id = $remainId where torrent_id = $torrentId and uid = $userId");
|
||||
// }
|
||||
// $log = "delete duplicated snatched";
|
||||
// do_log($log);
|
||||
// if ($printProgress) {
|
||||
// printProgress($log);
|
||||
// }
|
||||
|
||||
//Priority Class 5: cleanup every 15 days
|
||||
$res = sql_query("SELECT value_u FROM avps WHERE arg = 'lastcleantime5'");
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-01-11');
|
||||
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-01-16');
|
||||
defined('IN_TRACKER') || define('IN_TRACKER', false);
|
||||
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
|
||||
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
|
||||
|
||||
Reference in New Issue
Block a user