@@ 37-39 (lines=3) @@ | ||
34 | $res = $pdo->queryDirect('SELECT id AS releaseid, name, searchname, groups_id, categories_id, dehashstatus FROM releases WHERE predb_id = 0 AND ishashed = 1'); |
|
35 | } else if (isset($argv[1]) && $argv[1] === "full") { |
|
36 | $res = $pdo->queryDirect('SELECT id AS releaseid, name, searchname, groups_id, categories_id, dehashstatus FROM releases WHERE categories_id = 7020 AND ishashed = 1 AND dehashstatus BETWEEN -6 AND 0'); |
|
37 | } else if (isset($argv[1]) && is_numeric($argv[1])) { |
|
38 | $res = $pdo->queryDirect('SELECT id AS releaseid, name, searchname, groups_id, categories_id, dehashstatus FROM releases WHERE categories_id = 7020 AND ishashed = 1 AND dehashstatus BETWEEN -6 AND 0 ORDER BY postdate DESC LIMIT ' . $argv[1]); |
|
39 | } |
|
40 | ||
41 | $counter = $counted = $total = 0; |
|
42 | if ($res !== false) { |
@@ 119-124 (lines=6) @@ | ||
116 | if (isset($_GET['type'])) { |
|
117 | ||
118 | $limit = 1; |
|
119 | if (isset($_GET['limit']) && is_numeric($_GET['limit'])) { |
|
120 | $limit = $_GET['limit']; |
|
121 | if ($limit > 100) { |
|
122 | $limit = 100; |
|
123 | } |
|
124 | } |
|
125 | ||
126 | $offset = 0; |
|
127 | if (isset($_GET['offset']) && is_numeric($_GET['offset'])) { |
@@ 950-953 (lines=4) @@ | ||
947 | $limit = $orderby = ''; |
|
948 | $show = (isset($args[2]) && $args[2] === 'show') ? 1 : 0; |
|
949 | ||
950 | if (isset($args[1]) && is_numeric($args[1])) { |
|
951 | $orderby = "ORDER BY r.id DESC"; |
|
952 | $limit = "LIMIT " . $args[1]; |
|
953 | } |
|
954 | ||
955 | echo $this->pdo->log->header("\nMatch PreFiles (${args[1]}) Started at " . date('g:i:s')); |
|
956 | echo $this->pdo->log->primary("Matching predb filename to cleaned release_files.name.\n"); |