Empty commit

This commit is contained in:
Git 2012-02-11 08:00:22 +00:00
parent 135b61a80f
commit 678e6b0f9d
3 changed files with 44 additions and 35 deletions

View File

@ -370,7 +370,6 @@ function header_link($SortKey,$DefaultWay="desc") {
if($GroupYear>0) { $DisplayName.=" [".$GroupYear."]"; }
if($GroupVanityHouse) { $DisplayName .= ' [<abbr title="This is a vanity house release">VH</abbr>]'; }
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
$LastRemasterYear = '-';
$LastRemasterTitle = '';
$LastRemasterRecordLabel = '';
@ -546,6 +545,7 @@ function header_link($SortKey,$DefaultWay="desc") {
$JsonGroups[] = array(
'groupId' => (int) $GroupID,
'groupName' => $GroupName,
'artist' => $DisplayName,
'tags' => $TagList,
'bookmarked' => in_array($GroupID, $Bookmarks),
'vanityHouse' => $GroupVanityHouse == '1',

View File

@ -26,9 +26,6 @@
case 'created':
$Title = 'My requests';
$SS->set_filter('userid', array($LoggedUser['ID']));
if(empty($_GET['show_filled'])) {
$SS->set_filter('torrentid', array(0));
}
break;
case 'voted':
if(!empty($_GET['userid'])) {
@ -47,9 +44,6 @@
$Title = "Requests I've voted on";
$SS->set_filter('voter', array($LoggedUser['ID']));
}
if(empty($_GET['show_filled']) && $Submitted) {
$SS->set_filter('torrentid', array(0));
}
break;
case 'filled':
if(empty($_GET['userid']) || !is_number($_GET['userid'])) {
@ -301,16 +295,29 @@
}
}
$PageLinks = get_pages($Page, $NumResults, REQUESTS_PER_PAGE);
$Requests = $SphinxResults['matches'];
$CurrentURL = get_url(array('order', 'sort'));
$JsonResults = array();
if ($NumResults != 0) {
if ($NumResults == 0) {
print json_encode(
array(
'status' => 'success',
'response' => array(
'currentPage' => 1,
'pages' => 1,
'results' => array()
)
)
);
die();
} else {
$JsonResults = array();
$TimeCompare = 1267643718; // Requests v2 was implemented 2010-03-03 20:15:18
foreach ($Requests as $RequestID => $Request) {
//list($BitrateList, $CatalogueNumber, $CategoryID, $Description, $FillerID, $FormatList, $RequestID, $Image, $LogCue, $MediaList, $ReleaseType,
// $Tags, $TimeAdded, $TimeFilled, $Title, $TorrentID, $RequestorID, $RequestorName, $Year, $RequestID, $Categoryid, $FillerID, $LastVote,
// $ReleaseType, $TagIDs, $TimeAdded, $TimeFilled, $TorrentID, $RequestorID, $Voters) = array_values($Request);
list($RequestID, $RequestorID, $RequestorName, $TimeAdded, $LastVote, $CategoryID, $Title, $Year, $Image, $Description, $CatalogueNumber,
$ReleaseType, $BitrateList, $FormatList, $MediaList, $LogCue, $FillerID, $FillerName, $TorrentID, $TimeFilled) = $Request;
@ -324,12 +331,12 @@
$CategoryName = $Categories[$CategoryID - 1];
}
$IsFilled = ($TorrentID != 0);
$ArtistLink = "";
if($CategoryName == "Music") {
$ArtistForm = get_request_artists($RequestID);
$ArtistLink = display_artists($ArtistForm, false, false);
}
$Tags = $Request['Tags'];
$JsonResults[] = array(
'requestId' => (int) $RequestID,
@ -337,7 +344,10 @@
'requestorName' => $RequestorName,
'timeAdded' => $TimeAdded,
'lastVote' => $LastVote,
'voteCount' => $VoteCount,
'bounty' => $RequestVotes['TotalBounty'],
'categoryId' => (int) $CategoryID,
'categoryName' => $CategoryName,
'artist' => $ArtistLink,
'title' => $Title,
'year' => (int) $Year,
@ -351,23 +361,22 @@
'logCue' => $LogCue,
'isFilled' => ($TorrentID > 0),
'fillerId' => (int) $FillerID,
'fillterName' => $FillerName,
'fillerName' => $FillerName == 0 ? "" : $FillerName,
'torrentId' => (int) $TorrentID,
'timeFilled' => $TimeFilled
'timeFilled' => $TimeFilled == 0 ? "" : $TimeFilled
);
}
}
print
json_encode(
array(
'status' => 'success',
'response' => array(
'currentPage' => intval($Page),
'pages' => ceil($NumResults/REQUESTS_PER_PAGE),
'results' => $JsonResults
print
json_encode(
array(
'status' => 'success',
'response' => array(
'currentPage' => intval($Page),
'pages' => ceil($NumResults/REQUESTS_PER_PAGE),
'results' => $JsonResults
)
)
)
);
);
}
?>

View File

@ -7,12 +7,12 @@
show_header();
//requires wget, unzip commands to be installed
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'03.zip');
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'07.zip');
//shell_exec('wget http://debug.what.cd/GeoLiteCity_'.date('Ym').'01.zip');
shell_exec('unzip GeoLiteCity_'.date('Ym').'03.zip');
shell_exec('rm GeoLiteCity_'.date('Ym').'03.zip');
shell_exec('unzip GeoLiteCity_'.date('Ym').'07.zip');
shell_exec('rm GeoLiteCity_'.date('Ym').'07.zip');
if(($Locations = file("GeoLiteCity_".date('Ym')."03/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
if(($Locations = file("GeoLiteCity_".date('Ym')."07/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
error("Download or extraction of maxmind database failed");
}
array_shift($Locations);
@ -31,7 +31,7 @@
echo "There are ".count($CountryIDs)." CountryIDs";
echo "<br />";
if(($Blocks = file("GeoLiteCity_".date('Ym')."03/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
if(($Blocks = file("GeoLiteCity_".date('Ym')."07/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
echo "Error";
}
array_shift($Blocks);