From cdd04457a590696dc48e3367696dabfdf4f97b2f Mon Sep 17 00:00:00 2001 From: Git Date: Mon, 5 Nov 2012 08:00:16 +0000 Subject: [PATCH] Empty commit --- classes/class_torrents.php | 6 +- design/privateheader.php | 2 +- sections/ajax/bookmarks/torrents.php | 143 ------------------- sections/bookmarks/torrents.php | 6 +- sections/collages/collage.php | 6 +- sections/top10/votes.php | 8 +- sections/torrents/browse.php | 4 +- sections/torrents/details.php | 6 +- sections/userhistory/subscribed_collages.php | 2 +- 9 files changed, 20 insertions(+), 163 deletions(-) diff --git a/classes/class_torrents.php b/classes/class_torrents.php index b14bbe0c..30cccaf5 100644 --- a/classes/class_torrents.php +++ b/classes/class_torrents.php @@ -453,9 +453,9 @@ public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = fa if (count($EditionInfo)) { $Info[]=implode(' ',$EditionInfo); } } if ($Data['IsSnatched']) { $Info[]='Snatched!'; } - if ($Data['FreeTorrent'] == '1') { $Info[]='Freeleech!'; } - if ($Data['FreeTorrent'] == '2') { $Info[]='Neutral Leech!'; } - if ($Data['PersonalFL']) { $Info[]='Personal Freeleech!'; } + if ($Data['FreeTorrent'] == '1') { $Info[]='Freeleech!'; } + if ($Data['FreeTorrent'] == '2') { $Info[]='Neutral Leech!'; } + if ($Data['PersonalFL']) { $Info[]='Personal Freeleech!'; } return implode(' / ', $Info); } diff --git a/design/privateheader.php b/design/privateheader.php index 5902caeb..f2fdb6b4 100644 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -207,7 +207,7 @@ $Cache->cache_value('forums_quotes_'.$LoggedUser['ID'], $QuoteNotificationsCount, 0); } if($QuoteNotificationsCount > 0) { - $Alerts[] = ''. 'New Quote'. ($QuoteNotificationsCount > 1 ? 's' : '') . ''; + $Alerts[] = ''. 'New quote'. ($QuoteNotificationsCount > 1 ? 's' : '') . ''; } } diff --git a/sections/ajax/bookmarks/torrents.php b/sections/ajax/bookmarks/torrents.php index a8babc40..93443646 100644 --- a/sections/ajax/bookmarks/torrents.php +++ b/sections/ajax/bookmarks/torrents.php @@ -48,149 +48,6 @@ function compare($X, $Y){ } } -$Title = ($Sneaky)?"$Username's bookmarked torrents":'Your bookmarked torrents'; - - -// Loop through the result set, building up $Collage and $TorrentTable -// Then we print them. -$Collage = array(); -$TorrentTable = ''; - -$NumGroups = 0; -$Artists = array(); -$Tags = array(); - -foreach ($TorrentList as $GroupID=>$Group) { - list($GroupID, $GroupName, $GroupYear, $GroupRecordLabel, $GroupCatalogueNumber, $TagList, $ReleaseType, $GroupVanityHouse, $Torrents, $GroupArtists) = array_values($Group); - list($GroupID2, $Image, $GroupCategoryID, $AddedTime) = array_values($CollageDataList[$GroupID]); - - // Handle stats and stuff - $NumGroups++; - - if($GroupArtists) { - foreach($GroupArtists as $Artist) { - if(!isset($Artists[$Artist['id']])) { - $Artists[$Artist['id']] = array('name'=>$Artist['name'], 'count'=>1); - } else { - $Artists[$Artist['id']]['count']++; - } - } - } - - $TagList = explode(' ',str_replace('_','.',$TagList)); - - $TorrentTags = array(); - foreach($TagList as $Tag) { - if(!isset($Tags[$Tag])) { - $Tags[$Tag] = array('name'=>$Tag, 'count'=>1); - } else { - $Tags[$Tag]['count']++; - } - $TorrentTags[]=''.$Tag.''; - } - $PrimaryTag = $TagList[0]; - $TorrentTags = implode(', ', $TorrentTags); - $TorrentTags='
'.$TorrentTags.'
'; - - $DisplayName = ''; - if(count($GroupArtists)>0) { - $DisplayName = Artists::display_artists(array('1'=>$GroupArtists)); - } - $DisplayName .= ''.$GroupName.''; - if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';} - if($GroupVanityHouse) { $DisplayName .= ' [VH]'; } - - // Start an output buffer, so we can store this output in $TorrentTable - ob_start(); - if(count($Torrents)>1 || $GroupCategoryID==1) { - // Grouped torrents - $ShowGroups = !(!empty($LoggedUser['TorrentGrouping']) && $LoggedUser['TorrentGrouping'] == 1); - $LastRemasterYear = '-'; - $LastRemasterTitle = ''; - $LastRemasterRecordLabel = ''; - $LastRemasterCatalogueNumber = ''; - $LastMedia = ''; - - $EditionID = 0; - unset($FirstUnknown); - - foreach ($Torrents as $TorrentID => $Torrent) { - - if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) { - $FirstUnknown = !isset($FirstUnknown); - } - - if($Torrent['RemasterTitle'] != $LastRemasterTitle || $Torrent['RemasterYear'] != $LastRemasterYear || - $Torrent['RemasterRecordLabel'] != $LastRemasterRecordLabel || $Torrent['RemasterCatalogueNumber'] != $LastRemasterCatalogueNumber || $FirstUnknown || $Torrent['Media'] != $LastMedia) { - - $EditionID++; - if($Torrent['Remastered'] && $Torrent['RemasterYear'] != 0) { - - $RemasterName = $Torrent['RemasterYear']; - $AddExtra = " - "; - if($Torrent['RemasterRecordLabel']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterRecordLabel']); $AddExtra=' / '; } - if($Torrent['RemasterCatalogueNumber']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterCatalogueNumber']); $AddExtra=' / '; } - if($Torrent['RemasterTitle']) { $RemasterName .= $AddExtra.display_str($Torrent['RemasterTitle']); $AddExtra=' / '; } - $RemasterName .= $AddExtra.display_str($Torrent['Media']); - - } else { - $AddExtra = " / "; - if (!$Torrent['Remastered']) { - $MasterName = "Original Release"; - if($GroupRecordLabel) { $MasterName .= $AddExtra.$GroupRecordLabel; $AddExtra=' / '; } - if($GroupCatalogueNumber) { $MasterName .= $AddExtra.$GroupCatalogueNumber; $AddExtra=' / '; } - } else { - $MasterName = "Unknown Release(s)"; - } - $MasterName .= $AddExtra.display_str($Torrent['Media']); - } - } - $LastRemasterTitle = $Torrent['RemasterTitle']; - $LastRemasterYear = $Torrent['RemasterYear']; - $LastRemasterRecordLabel = $Torrent['RemasterRecordLabel']; - $LastRemasterCatalogueNumber = $Torrent['RemasterCatalogueNumber']; - $LastMedia = $Torrent['Media']; - } - } else { - // Viewing a type that does not require grouping - - list($TorrentID, $Torrent) = each($Torrents); - - $DisplayName = ''.$GroupName.''; - - if(!empty($Torrent['FreeTorrent'])) { - $DisplayName .=' Freeleech!'; - } - } - $TorrentTable.=ob_get_clean(); - - // Album art - - ob_start(); - - $DisplayName = ''; - if(!empty($GroupArtists)) { - $DisplayName.= Artists::display_artists(array('1'=>$GroupArtists), false); - } - $DisplayName .= $GroupName; - if($GroupYear>0) { $DisplayName = $DisplayName. ' ['. $GroupYear .']';} - $Collage[]=ob_get_clean(); - -} - -uasort($Tags, 'compare'); -$i = 0; -foreach ($Tags as $TagName => $Tag) { - $i++; - if($i>5) { break; } -} -uasort($Artists, 'compare'); -$i = 0; -foreach ($Artists as $ID => $Artist) { - $i++; - if($i>10) { break; } -} - $JsonBookmarks = array(); foreach ($TorrentList as $Torrent) { $JsonTorrents = array(); diff --git a/sections/bookmarks/torrents.php b/sections/bookmarks/torrents.php index fbd8553c..350c78bb 100644 --- a/sections/bookmarks/torrents.php +++ b/sections/bookmarks/torrents.php @@ -193,11 +193,11 @@ function compare($X, $Y){ $DisplayName .= ' Snatched!'; } if ($Torrent['FreeTorrent'] == '1') { - $DisplayName .= ' Freeleech!'; + $DisplayName .= ' Freeleech!'; } elseif ($Torrent['FreeTorrent'] == '2') { - $DisplayName .= ' Neutral Leech!'; + $DisplayName .= ' Neutral Leech!'; } elseif ($Torrent['PersonalFL']) { - $DisplayName .= 'Personal Freeleech!'; + $DisplayName .= 'Personal Freeleech!'; } ?> diff --git a/sections/collages/collage.php b/sections/collages/collage.php index 7428c799..f84b334c 100644 --- a/sections/collages/collage.php +++ b/sections/collages/collage.php @@ -268,11 +268,11 @@ function compare($X, $Y){ $DisplayName .= ' Snatched!'; } if ($Torrent['FreeTorrent'] == '1') { - $DisplayName .= ' Freeleech!'; + $DisplayName .= ' Freeleech!'; } elseif ($Torrent['FreeTorrent'] == '2') { - $DisplayName .= ' Neutral Leech!'; + $DisplayName .= ' Neutral Leech!'; } elseif ($Torrent['PersonalFL']) { - $DisplayName .= $AddExtra.'Personal Freeleech!'; + $DisplayName .= 'Personal Freeleech!'; } ?> diff --git a/sections/top10/votes.php b/sections/top10/votes.php index 26a6836f..46458dde 100644 --- a/sections/top10/votes.php +++ b/sections/top10/votes.php @@ -312,11 +312,11 @@ $DisplayName .= ' Snatched!'; } if ($Torrent['FreeTorrent'] == '1') { - $DisplayName .= ' Freeleech!'; + $DisplayName .= ' Freeleech!'; } elseif ($Torrent['FreeTorrent'] == '2') { - $DisplayName .= ' Neutral Leech!'; - } elseif(Torrents::has_token($TorrentID)) { - $DisplayName .= $AddExtra.'Personal Freeleech!'; + $DisplayName .= ' Neutral Leech!'; + } elseif (Torrents::has_token($TorrentID)) { + $DisplayName .= 'Personal Freeleech!'; } ?> diff --git a/sections/torrents/browse.php b/sections/torrents/browse.php index 98df16c3..ef1711cb 100644 --- a/sections/torrents/browse.php +++ b/sections/torrents/browse.php @@ -948,7 +948,7 @@ function header_link($SortKey,$DefaultWay="DESC") { if(trim($Torrents['remastertitle'][$Key])) { $ExtraInfo.=$AddExtra.$Torrents['remastertitle'][$Key]; $AddExtra=" - "; } elseif($Torrents['remastered'][$Key]=="1") { $ExtraInfo.=$AddExtra."Remastered"; $AddExtra=" - "; } if($Torrents['year'][$Key]>"0") { $ExtraInfo.=$AddExtra.$Torrents['year'][$Key]; $AddExtra=" / "; } - if($Torrents['freetorrent'][$Key]=="1") { $ExtraInfo.=$AddExtra."Freeleech!"; $AddExtra=" / "; } + if($Torrents['freetorrent'][$Key]=="1") { $ExtraInfo.=$AddExtra.'Freeleech!'; $AddExtra=" / "; } ?> @@ -988,7 +988,7 @@ function header_link($SortKey,$DefaultWay="DESC") { if(trim($Torrents['remastertitle'][0])) { $ExtraInfo.=$AddExtra.$Torrents['remastertitle'][0]; $AddExtra=" - "; } elseif($Torrents['remastered'][0]=="1") { $ExtraInfo.=$AddExtra."Remastered"; $AddExtra=" - "; } if($Torrents['year'][0]>"0") { $ExtraInfo.=$AddExtra.$Torrents['year'][0]; $AddExtra=" / "; } - if($Torrents['freetorrent'][0]=="1") { $ExtraInfo.=$AddExtra."Freeleech!"; $AddExtra=" / "; } + if($Torrents['freetorrent'][0]=="1") { $ExtraInfo.=$AddExtra.'Freeleech!'; $AddExtra=" / "; } if($ExtraInfo!='') { $ExtraInfo="[".$ExtraInfo."]"; } if($GroupYear>0) { $ExtraInfo.=" [".$GroupYear."]"; } diff --git a/sections/torrents/details.php b/sections/torrents/details.php index 911ce0a0..b41eec2e 100644 --- a/sections/torrents/details.php +++ b/sections/torrents/details.php @@ -467,9 +467,9 @@ function filelist($Str) { $ExtraInfo = $GroupName ; $AddExtra=' / '; } if($IsSnatched) { $ExtraInfo.=$AddExtra.'Snatched!'; $AddExtra=' / '; } - if($FreeTorrent == '1') { $ExtraInfo.=$AddExtra.'Freeleech!'; $AddExtra=' / '; } - if($FreeTorrent == '2') { $ExtraInfo.=$AddExtra.'Neutral Leech!'; $AddExtra=' / '; } - if($PersonalFL) { $ExtraInfo.=$AddExtra.'Personal Freeleech!'; $AddExtra=' / '; } + if($FreeTorrent == '1') { $ExtraInfo.=$AddExtra.'Freeleech!'; $AddExtra=' / '; } + if($FreeTorrent == '2') { $ExtraInfo.=$AddExtra.'Neutral Leech!'; $AddExtra=' / '; } + if($PersonalFL) { $ExtraInfo.=$AddExtra.'Personal Freeleech!'; $AddExtra=' / '; } if($Reported) { $ExtraInfo.=$AddExtra.'Reported'; $AddExtra=' / '; } if(!empty($BadTags)) { $ExtraInfo.=$AddExtra.'Bad Tags'; $AddExtra=' / '; } if(!empty($BadFolders)) { $ExtraInfo.=$AddExtra.'Bad Folders'; $AddExtra=' / '; } diff --git a/sections/userhistory/subscribed_collages.php b/sections/userhistory/subscribed_collages.php index afcef1a9..2f8cb179 100644 --- a/sections/userhistory/subscribed_collages.php +++ b/sections/userhistory/subscribed_collages.php @@ -246,7 +246,7 @@ $DisplayName .=' Snatched!'; } if(!empty($Torrent['FreeTorrent'])) { - $DisplayName .=' Freeleech!'; + $DisplayName .=' Freeleech!'; } ?>