Empty commit

This commit is contained in:
Git 2011-12-31 08:00:21 +00:00
parent 1050e24946
commit 7ed6df4ca7
3 changed files with 24 additions and 24 deletions

View File

@ -91,16 +91,16 @@ function generate_tag_json($Caption, $Tag, $Details, $Limit) {
foreach ($Details as $Detail) { foreach ($Details as $Detail) {
$results[] = array( $results[] = array(
'name' => $Detail['Name'], 'name' => $Detail['Name'],
'uses' => $Detail['Uses'], 'uses' => (int) $Detail['Uses'],
'posVotes' => $Detail['PosVotes'], 'posVotes' => (int) $Detail['PosVotes'],
'negVotes' => $Detail['NegVotes'] 'negVotes' => (int) $Detail['NegVotes']
); );
} }
return array( return array(
'caption' => $Caption, 'caption' => $Caption,
'tag' => $Tag, 'tag' => $Tag,
'limit' => $Limit, 'limit' => (int) $Limit,
'results' => $results 'results' => $results
); );
} }

View File

@ -162,32 +162,32 @@ function generate_torrent_json($Caption, $Tag, $Details, $Limit) {
// Append to the existing array. // Append to the existing array.
$results[] = array( $results[] = array(
'torrentId' => $TorrentID, 'torrentId' => (int) $TorrentID,
'groupId' => $GroupID, 'groupId' => (int) $GroupID,
'artist' => $TruncArtist, 'artist' => $TruncArtist,
'groupName' => $GroupName, 'groupName' => $GroupName,
'groupCategory' => $GroupCategoryID, 'groupCategory' => (int) $GroupCategory,
'groupYear' => $GroupYear, 'groupYear' => (int) $GroupYear,
'remasterTitle' => $RemasterTitle, 'remasterTitle' => $RemasterTitle,
'format' => $Format, 'format' => $Format,
'encoding' => $Encoding, 'encoding' => $Encoding,
'hasLog' => $HasLog, 'hasLog' => $HasLog == 1,
'hasCue' => $HasCue, 'hasCue' => $HasCue == 1,
'media' => $Media, 'media' => $Media,
'scene' => $Scene, 'scene' => $Scene == 1,
'year' => $Year, 'year' => (int) $Year,
'tags' => $TagList, 'tags' => $TagList,
'snatched' => $Snatched, 'snatched' => (int) $Snatched,
'seeders' => $Seeders, 'seeders' => (int) $Seeders,
'leechers' => $Leechers, 'leechers' => (int) $Leechers,
'data' => $Data 'data' => (int) $Data
); );
} }
return array( return array(
'caption' => $Caption, 'caption' => $Caption,
'tag' => $Tag, 'tag' => $Tag,
'limit' => $Limit, 'limit' => (int) $Limit,
'results' => $results 'results' => $results
); );
} }

View File

@ -94,20 +94,20 @@ function generate_user_json($Caption, $Tag, $Details, $Limit) {
$results = array(); $results = array();
foreach($Details as $Details) { foreach($Details as $Details) {
$results[] = array( $results[] = array(
'id' => $Detail['ID'], 'id' => (int) $Detail['ID'],
'username' => $Detail['Username'], 'username' => $Detail['Username'],
'uploaded' => $Detail['Uploaded'], 'uploaded' => (float) $Detail['Uploaded'],
'upSpeed' => $Detail['UpSpeed'], 'upSpeed' => (float) $Detail['UpSpeed'],
'downloaded' => $Detail['Downloaded'], 'downloaded' => (float) $Detail['Downloaded'],
'downSpeed' => $Detail['DownSpeed'], 'downSpeed' => (float) $Detail['DownSpeed'],
'numUploads' => $Detail['NumUploads'], 'numUploads' => (int) $Detail['NumUploads'],
'joinDate' => $Detail['JoinDate'] 'joinDate' => $Detail['JoinDate']
); );
} }
return array( return array(
'caption' => $Caption, 'caption' => $Caption,
'tag' => $Tag, 'tag' => $Tag,
'limit' => $Limit, 'limit' => (int) $Limit,
'results' => $results 'results' => $results
); );
} }