rename nfoID into nfoid

This commit is contained in:
Darko
2015-03-09 13:33:05 +01:00
parent 2fec0a0a27
commit e5bfa33c1d
11 changed files with 22 additions and 22 deletions
+3 -3
View File
@@ -127,7 +127,7 @@ class Book
//
// get all releases matching these ids
//
$sql = sprintf("select r.*, releasenfo.id as nfoID, groups.name as grpname from releases r left outer join releasenfo on releasenfo.releaseid = r.id left outer join groups on groups.id = r.groupid where bookinfoid in (%s) %s order by r.postdate desc", $ids, $maxagesql);
$sql = sprintf("select r.*, releasenfo.id as nfoid, groups.name as grpname from releases r left outer join releasenfo on releasenfo.releaseid = r.id left outer join groups on groups.id = r.groupid where bookinfoid in (%s) %s order by r.postdate desc", $ids, $maxagesql);
$allrows = $db->query($sql, true);
$arr = array();
@@ -141,7 +141,7 @@ class Book
$arr[$allrow["bookinfoid"]]["haspreview"] = (isset($arr[$allrow["bookinfoid"]]["haspreview"]) ? $arr[$allrow["bookinfoid"]]["haspreview"] : "") . $allrow["haspreview"] . ",";
$arr[$allrow["bookinfoid"]]["passwordstatus"] = (isset($arr[$allrow["bookinfoid"]]["passwordstatus"]) ? $arr[$allrow["bookinfoid"]]["passwordstatus"] : "") . $allrow["passwordstatus"] . ",";
$arr[$allrow["bookinfoid"]]["guid"] = (isset($arr[$allrow["bookinfoid"]]["guid"]) ? $arr[$allrow["bookinfoid"]]["guid"] : "") . $allrow["guid"] . ",";
$arr[$allrow["bookinfoid"]]["nfoID"] = (isset($arr[$allrow["bookinfoid"]]["nfoID"]) ? $arr[$allrow["bookinfoid"]]["nfoID"] : "") . $allrow["nfoID"] . ",";
$arr[$allrow["bookinfoid"]]["nfoid"] = (isset($arr[$allrow["bookinfoid"]]["nfoid"]) ? $arr[$allrow["bookinfoid"]]["nfoid"] : "") . $allrow["nfoid"] . ",";
$arr[$allrow["bookinfoid"]]["grpname"] = (isset($arr[$allrow["bookinfoid"]]["grpname"]) ? $arr[$allrow["bookinfoid"]]["grpname"] : "") . $allrow["grpname"] . ",";
$arr[$allrow["bookinfoid"]]["searchname"] = (isset($arr[$allrow["bookinfoid"]]["searchname"]) ? $arr[$allrow["bookinfoid"]]["searchname"] : "") . $allrow["searchname"] . "#";
$arr[$allrow["bookinfoid"]]["postdate"] = (isset($arr[$allrow["bookinfoid"]]["postdate"]) ? $arr[$allrow["bookinfoid"]]["postdate"] : "") . $allrow["postdate"] . ",";
@@ -162,7 +162,7 @@ class Book
$row["grp_haspreview"] = substr($arr[$row["bookinfoid"]]["haspreview"], 0, -1);
$row["grp_release_password"] = substr($arr[$row["bookinfoid"]]["passwordstatus"], 0, -1);
$row["grp_release_guid"] = substr($arr[$row["bookinfoid"]]["guid"], 0, -1);
$row["grp_release_nfoID"] = substr($arr[$row["bookinfoid"]]["nfoID"], 0, -1);
$row["grp_release_nfoID"] = substr($arr[$row["bookinfoid"]]["nfoid"], 0, -1);
$row["grp_release_grpname"] = substr($arr[$row["bookinfoid"]]["grpname"], 0, -1);
$row["grp_release_name"] = substr($arr[$row["bookinfoid"]]["searchname"], 0, -1);
$row["grp_release_postdate"] = substr($arr[$row["bookinfoid"]]["postdate"], 0, -1);
+1 -1
View File
@@ -175,7 +175,7 @@ class Console
$exccatlist = " and r.categoryid not in (".implode(",", $excludedcats).")";
$order = $this->getConsoleOrder($orderby);
$sql = sprintf(" SELECT r.*, r.id as releaseid, con.*, g.title as genre, groups.name as group_name, concat(cp.title, ' > ', c.title) as category_name, concat(cp.id, ',', c.id) as category_ids, rn.id as nfoID from releases r left outer join groups on groups.id = r.groupid inner join consoleinfo con on con.id = r.consoleinfoid left outer join releasenfo rn on rn.releaseid = r.id and rn.nfo is not null left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join genres g on g.id = con.genreID where r.passwordstatus <= (select value from site where setting='showpasswordedrelease') and %s %s %s %s order by %s %s".$limit, $browseby, $catsrch, $maxagesql, $exccatlist, $order[0], $order[1]);
$sql = sprintf(" SELECT r.*, r.id as releaseid, con.*, g.title as genre, groups.name as group_name, concat(cp.title, ' > ', c.title) as category_name, concat(cp.id, ',', c.id) as category_ids, rn.id as nfoid from releases r left outer join groups on groups.id = r.groupid inner join consoleinfo con on con.id = r.consoleinfoid left outer join releasenfo rn on rn.releaseid = r.id and rn.nfo is not null left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join genres g on g.id = con.genreID where r.passwordstatus <= (select value from site where setting='showpasswordedrelease') and %s %s %s %s order by %s %s".$limit, $browseby, $catsrch, $maxagesql, $exccatlist, $order[0], $order[1]);
return $db->query($sql, true);
}
+3 -3
View File
@@ -232,7 +232,7 @@ class Movie
//
// get all releases matching these ids
//
$sql = sprintf("select r.*, releasenfo.id as nfoID, groups.name as grpname, concat(cp.title, ' > ', c.title) as categoryName from releases r left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join releasenfo on releasenfo.releaseid = r.id left outer join groups on groups.id = r.groupid where imdbid in (%s) and %s %s %s order by r.postdate desc", $imdbds, $catsrch, $maxagesql, $exccatlist);
$sql = sprintf("select r.*, releasenfo.id as nfoid, groups.name as grpname, concat(cp.title, ' > ', c.title) as categoryName from releases r left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join releasenfo on releasenfo.releaseid = r.id left outer join groups on groups.id = r.groupid where imdbid in (%s) and %s %s %s order by r.postdate desc", $imdbds, $catsrch, $maxagesql, $exccatlist);
$allrows = $db->query($sql, true);
$arr = array();
@@ -246,7 +246,7 @@ class Movie
$arr[$allrow["imdbid"]]["haspreview"] = (isset($arr[$allrow["imdbid"]]["haspreview"]) ? $arr[$allrow["imdbid"]]["haspreview"] : "") . $allrow["haspreview"] . ",";
$arr[$allrow["imdbid"]]["passwordstatus"] = (isset($arr[$allrow["imdbid"]]["passwordstatus"]) ? $arr[$allrow["imdbid"]]["passwordstatus"] : "") . $allrow["passwordstatus"] . ",";
$arr[$allrow["imdbid"]]["guid"] = (isset($arr[$allrow["imdbid"]]["guid"]) ? $arr[$allrow["imdbid"]]["guid"] : "") . $allrow["guid"] . ",";
$arr[$allrow["imdbid"]]["nfoID"] = (isset($arr[$allrow["imdbid"]]["nfoID"]) ? $arr[$allrow["imdbid"]]["nfoID"] : "") . $allrow["nfoID"] . ",";
$arr[$allrow["imdbid"]]["nfoid"] = (isset($arr[$allrow["imdbid"]]["nfoid"]) ? $arr[$allrow["imdbid"]]["nfoid"] : "") . $allrow["nfoid"] . ",";
$arr[$allrow["imdbid"]]["grpname"] = (isset($arr[$allrow["imdbid"]]["grpname"]) ? $arr[$allrow["imdbid"]]["grpname"] : "") . $allrow["grpname"] . ",";
$arr[$allrow["imdbid"]]["searchname"] = (isset($arr[$allrow["imdbid"]]["searchname"]) ? $arr[$allrow["imdbid"]]["searchname"] : "") . $allrow["searchname"] . "#";
$arr[$allrow["imdbid"]]["postdate"] = (isset($arr[$allrow["imdbid"]]["postdate"]) ? $arr[$allrow["imdbid"]]["postdate"] : "") . $allrow["postdate"] . ",";
@@ -268,7 +268,7 @@ class Movie
$row["grp_haspreview"] = substr($arr[$row["imdbid"]]["haspreview"], 0, -1);
$row["grp_release_password"] = substr($arr[$row["imdbid"]]["passwordstatus"], 0, -1);
$row["grp_release_guid"] = substr($arr[$row["imdbid"]]["guid"], 0, -1);
$row["grp_release_nfoID"] = substr($arr[$row["imdbid"]]["nfoID"], 0, -1);
$row["grp_release_nfoID"] = substr($arr[$row["imdbid"]]["nfoid"], 0, -1);
$row["grp_release_grpname"] = substr($arr[$row["imdbid"]]["grpname"], 0, -1);
$row["grp_release_name"] = substr($arr[$row["imdbid"]]["searchname"], 0, -1);
$row["grp_release_postdate"] = substr($arr[$row["imdbid"]]["postdate"], 0, -1);
+1 -1
View File
@@ -175,7 +175,7 @@ class Music
$order = $this->getMusicOrder($orderby);
// query modified to join to musicinfo after limiting releases as performance issue prevented sane sql.
$sql = sprintf(" SELECT r.*, r.id as releaseid, m.*, g.title as genre, groups.name as group_name, concat(cp.title, ' > ', c.title) as category_name, concat(cp.id, ',', c.id) as category_ids, rn.id as nfoID from releases r left outer join groups on groups.id = r.groupid inner join musicinfo m on m.id = r.musicinfoid and m.title != '' left outer join releasenfo rn on rn.releaseid = r.id and rn.nfo is not null left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join genres g on g.id = m.genreID inner join (select r.id from releases r inner join musicinfo m ON m.id = r.musicinfoid and m.title != '' where r.musicinfoid > 0 and r.passwordstatus <= (select value from site where setting='showpasswordedrelease') and %s %s %s %s order by %s %s %s) x on x.id = r.id order by %s %s", $browseby, $catsrch, $maxagesql, $exccatlist, $order[0], $order[1], $limit, $order[0], $order[1]);
$sql = sprintf(" SELECT r.*, r.id as releaseid, m.*, g.title as genre, groups.name as group_name, concat(cp.title, ' > ', c.title) as category_name, concat(cp.id, ',', c.id) as category_ids, rn.id as nfoid from releases r left outer join groups on groups.id = r.groupid inner join musicinfo m on m.id = r.musicinfoid and m.title != '' left outer join releasenfo rn on rn.releaseid = r.id and rn.nfo is not null left outer join category c on c.id = r.categoryid left outer join category cp on cp.id = c.parentid left outer join genres g on g.id = m.genreID inner join (select r.id from releases r inner join musicinfo m ON m.id = r.musicinfoid and m.title != '' where r.musicinfoid > 0 and r.passwordstatus <= (select value from site where setting='showpasswordedrelease') and %s %s %s %s order by %s %s %s) x on x.id = r.id order by %s %s", $browseby, $catsrch, $maxagesql, $exccatlist, $order[0], $order[1], $limit, $order[0], $order[1]);
return $db->query($sql, true);
}
+3 -3
View File
@@ -46,7 +46,7 @@ class Parsing
// Default query for both full db and last 4 hours.
$sql = "SELECT r.searchname, r.name, r.fromname, r.id as RID, r.categoryid, r.guid, r.postdate,
rn.id as nfoID,
rn.id as nfoid,
g.name as groupname,
GROUP_CONCAT(rf.name) as filenames
FROM releases r
@@ -837,7 +837,7 @@ class Parsing
$catsql = "select id from groups";
$res = $db->query($catsql);
foreach ($res as $r2) {
$sql = sprintf("select r.id, name, searchname, categoryid, size, totalpart, musicinfoid, preid, groupid, rn.id as nfoID from releases r left outer join releasenfo rn ON rn.releaseid = r.id where groupid = %d", $r2['id']) . " %s ";
$sql = sprintf("select r.id, name, searchname, categoryid, size, totalpart, musicinfoid, preid, groupid, rn.id as nfoid from releases r left outer join releasenfo rn ON rn.releaseid = r.id where groupid = %d", $r2['id']) . " %s ";
$unbuf = $db->queryDirect(sprintf($sql, ($this->limited ? " and r.adddate BETWEEN NOW() - INTERVAL 1 DAY AND NOW() " : "")));
while ($r = $db->getAssocArray($unbuf)) {
@@ -1112,7 +1112,7 @@ class Parsing
$this->handleClean($r, "Modifying Release PC 0Day Size: " . $r['name'] . " - ", true);
continue;
}
if (strlen($r['name']) < 20 && $r['nfoID'] == null && !$r['preid']) {
if (strlen($r['name']) < 20 && $r['nfoid'] == null && !$r['preid']) {
$this->handleClean($r, "Modifying Release PC 0Day ReleaseLEN: " . $r['name'] . " - ");
continue;
}
+6 -6
View File
@@ -928,7 +928,7 @@ class Sphinx
$lookupQuery .= "SELECT releases.*, "
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
. "groups.name as group_name, rn.id AS nfoID, "
. "groups.name as group_name, rn.id AS nfoid, "
. "re.releaseid as reID, cp.id AS categoryParentID, "
. "pre.ctime, pre.nuketype, "
. "COALESCE(movieinfo.id, 0) AS movieinfoID "
@@ -1009,7 +1009,7 @@ class Sphinx
$lookupQuery .= "SELECT releases.*, "
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
. "groups.name AS group_name, rn.id AS nfoID, "
. "groups.name AS group_name, rn.id AS nfoid, "
. "re.releaseid AS reID "
. "FROM releases "
. "LEFT OUTER JOIN category c "
@@ -1077,7 +1077,7 @@ class Sphinx
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
. "groups.name AS group_name, "
. "rn.id AS nfoID FROM releases "
. "rn.id AS nfoid FROM releases "
. "LEFT OUTER JOIN groups "
. "ON groups.id = releases.groupid "
. "LEFT OUTER JOIN category c "
@@ -1153,7 +1153,7 @@ class Sphinx
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
. "groups.name AS group_name, "
. "rn.id AS nfoID FROM releases "
. "rn.id AS nfoid FROM releases "
. "LEFT OUTER JOIN musicinfo "
. "ON musicinfo.id = releases.musicinfoid "
. "LEFT JOIN genres "
@@ -1213,7 +1213,7 @@ class Sphinx
. "concat(cp.title, ' > ', c.title) AS category_name, "
. "concat(cp.id, ',', c.id) AS category_ids, "
. "groups.name AS group_name, "
. "rn.id AS nfoID "
. "rn.id AS nfoid "
. "FROM releases "
. "LEFT OUTER JOIN bookinfo "
. "ON bookinfo.id = releases.bookinfoid "
@@ -1269,7 +1269,7 @@ class Sphinx
. "CONCAT(cp.title, ' > ', c.title) AS category_name, "
. "CONCAT(cp.id, ',', c.id) AS category_ids, "
. "groups.name AS group_name, "
. "rn.id AS nfoID "
. "rn.id AS nfoid "
. "FROM releases "
. "LEFT OUTER JOIN category c "
. "ON c.id = releases.categoryid "
@@ -110,7 +110,7 @@
<div class="resextra">
<div class="btns" style="float:right">
{release_flag($result.searchname, browse)}
{if $result.nfoID > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
title="View Nfo" class="modal_nfo rndbtn" rel="nfo">
Nfo</a>{/if}
{if $result.imdbid > 0}
@@ -125,7 +125,7 @@
</a>
<div class="movextra">
{if $result.nfoID > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
title="View Nfo" class="btn btn-mini modal_nfo" rel="nfo">
Nfo</a>{/if}
{if $result.url != ""}<a class="btn btn-mini" target="_blank"
@@ -33,7 +33,7 @@
<li>PostDate: {$release.postdate|phpdate_format:"DATE_RSS"}</li>
<li>Password: {if $release.passwordstatus == 0}None{elseif $release.passwordstatus == 2}Passworded Rar Archive{elseif $release.passwordstatus == 1}Contains Cab/Ace/RAR Archive{else}Unknown{/if}</li>
{if $release.nfoID != ""}
{if $release.nfoid != ""}
<li>Nfo: <a href="{$serverroot}api?t=getnfo&amp;id={$release.guid}&amp;raw=1&amp;i={$uid}&amp;r={$rsstoken}">{$release.searchname}.nfo</a></li>
{/if}
@@ -77,7 +77,7 @@
<div class="resextra">
<div class="btns">
{if $result.nfoID > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
title="View Nfo" class="modal_nfo rndbtn" rel="nfo">
Nfo</a>{/if}
{if $result.haspreview == 1 && $userdata.canpreview == 1}<a
@@ -103,7 +103,7 @@
<div class="resextra">
<div class="btns">
{if $result.nfoID > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
{if $result.nfoid > 0}<a href="{$smarty.const.WWW_TOP}/nfo/{$result.guid}"
title="View Nfo" class="modal_nfo rndbtn" rel="nfo">
Nfo</a>{/if}
{if $result.haspreview == 1 && $userdata.canpreview == 1}<a