@@ -344,7 +343,7 @@
// generate a table based on data from most recent query to $DB
function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
- global $LoggedUser,$Categories,$ReleaseTypes, $SnatchedTorrents;
+ global $LoggedUser,$Categories,$ReleaseTypes;
?>
Top =$Limit.' '.$Caption?>
if(empty($_GET['advanced'])){ ?>
@@ -436,6 +435,7 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
if($GroupCategoryID==1 && $ReleaseType > 0) {
$DisplayName.= ' ['.$ReleaseTypes[$ReleaseType].']';
}
+
// append extra info to torrent title
$ExtraInfo='';
$AddExtra='';
@@ -448,15 +448,13 @@ function generate_torrent_table($Caption, $Tag, $Details, $Limit) {
if($Scene) { $ExtraInfo.=$AddExtra.'Scene'; $AddExtra=' / '; }
if($Year>0) { $ExtraInfo.=$AddExtra.$Year; $AddExtra=' '; }
if($RemasterTitle) { $ExtraInfo.=$AddExtra.$RemasterTitle; }
- if(array_key_exists($TorrentID, $SnatchedTorrents)) { $ExtraInfo.=' / Snatched!'; }
+ if(Torrents::has_snatched($TorrentID)) { $ExtraInfo.=' / Snatched!'; }
if($ExtraInfo!='') {
$ExtraInfo = "- [$ExtraInfo]";
}
-
-
-
+
$TagList=array();
-
+
$PrimaryTag = '';
if($TorrentTags!='') {
$TorrentTags=explode(' ',$TorrentTags);
diff --git a/sections/top10/users.php b/sections/top10/users.php
index 9f655302..80a0bbb2 100644
--- a/sections/top10/users.php
+++ b/sections/top10/users.php
@@ -19,8 +19,7 @@
[Torrents][Users][Tags]
-
+ [Favorites]
diff --git a/sections/top10/votes.php b/sections/top10/votes.php
index 3dc6c566..5798b653 100644
--- a/sections/top10/votes.php
+++ b/sections/top10/votes.php
@@ -6,7 +6,7 @@
if(!empty($_GET['advanced']) && check_perms('site_advanced_top10')) {
$Details = 'all';
$Limit = 10;
-
+
if($_GET['tags']) {
$Tags = explode(',', str_replace(".","_",trim($_GET['tags'])));
foreach ($Tags as $Tag) {
@@ -24,7 +24,7 @@
$Where[] = "g.Year BETWEEN $Year1 AND $Year2";
} elseif ($Year2 > 0 && $Year1 <= 0) {
$Where[] = "g.Year <= $Year2";
- }
+ }
} else {
$Details = 'all';
// defaults to 10 (duh)
@@ -33,14 +33,17 @@
}
$Filtered = !empty($Where);
-
-$Where = implode(' AND ', $Where);
+if ($_GET['anyall'] == 'any') {
+ $Where = '('.implode(' OR ', $Where).')';
+} else {
+ $Where = implode(' AND ', $Where);
+}
$WhereSum = (empty($Where)) ? '' : md5($Where);
// Unlike the other top 10s, this query just gets some raw stats
// We'll need to do some fancy-pants stuff to translate it into
// BPCI scores before getting the torrent data
-$Query = "SELECT v.GroupID
+$Query = "SELECT v.GroupID, v.Ups, v.Total, v.Score
FROM torrents_votes AS v";
if (!empty($Where)) {
$Query .= " JOIN torrents_group AS g ON g.ID = v.GroupID
@@ -52,13 +55,15 @@
$TopVotes = $Cache->get_value('top10votes_'.$Limit.$WhereSum);
if ($TopVotes === false) {
- if (true || $Cache->get_query_lock('top10votes')) {
+ if ($Cache->get_query_lock('top10votes')) {
$DB->query($Query);
$Results = $DB->collect('GroupID');
+ $Data = $DB->to_array('GroupID');
+
$Groups = Torrents::get_groups($Results);
if (count($Results) > 0) {
- $DB->query('SELECT ID, CategoryID FROM torrents_group
+ $DB->query('SELECT ID, CategoryID FROM torrents_group
WHERE ID IN ('.implode(',', $Results).')');
$Cats = $DB->to_array('ID');
}
@@ -67,15 +72,18 @@
foreach ($Results as $GroupID) {
$TopVotes[$GroupID] = $Groups['matches'][$GroupID];
$TopVotes[$GroupID]['CategoryID'] = $Cats[$GroupID]['CategoryID'];
+ $TopVotes[$GroupID]['Ups'] = $Data[$GroupID]['Ups'];
+ $TopVotes[$GroupID]['Total'] = $Data[$GroupID]['Total'];
+ $TopVotes[$GroupID]['Score'] = $Data[$GroupID]['Score'];
}
-
+
$Cache->cache_value('top10votes_'.$Limit.$WhereSum,$TopVotes,60*30);
$Cache->clear_query_lock('top10votes');
} else {
$TopVotes = false;
}
}
-$SnatchedTorrents = Torrents::get_snatched_torrents();
+
View::show_header('Top '.$Limit.' Voted Groups','browse');
?>
Note: Paranoia has nothing to do with your security on this site; the only thing affected by this setting is other users' ability to see your site activity and taste in music.
-
Select the elements you want to show on your profile. For example, if you tick "Show count" for "Snatched", users will be able to see that you have snatched =number_format($Snatched)?> torrents. If you tick "Show list", they will be able to see the full list of torrents you've snatched.
+
Select the elements you want to show on your profile. For example, if you tick "Show count" for "Snatched", users will be able to see how many torrents you have snatched. If you tick "Show list", they will be able to see the full list of torrents you've snatched.
Some information will still be available in the site log.
diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php
index c1eb30d0..6758ec8c 100644
--- a/sections/user/takeedit.php
+++ b/sections/user/takeedit.php
@@ -196,7 +196,6 @@
$Options['ShowSnatched'] = (!empty($_POST['showsnatched']) ? 1 : 0);
-
if(isset($LoggedUser['DisableFreeTorrentTop10'])) {
$Options['DisableFreeTorrentTop10'] = $LoggedUser['DisableFreeTorrentTop10'];
}
diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php
index 03d0f691..8ee09b37 100644
--- a/sections/user/takemoderate.php
+++ b/sections/user/takemoderate.php
@@ -365,7 +365,7 @@
}
if ($Warned == 1 && $Cur['Warned']=='0000-00-00 00:00:00' && check_perms('users_warn')) {
- Misc::send_pm($UserID,0,db_string('You have received a warning'),db_string("You have been [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&id=218]warned for $WarnLength week(s)[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason"));
+ Misc::send_pm($UserID,0,db_string('You have received a warning'),db_string("You have been [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&id=218]warned for $WarnLength week(s)[/url] by [user]".$LoggedUser['Username']."[/user]. The reason given was: $WarnReason"));
$UpdateSet[]="Warned='".sqltime()."' + INTERVAL $WarnLength WEEK";
$Msg = "warned for $WarnLength week(s)";
if ($WarnReason) { $Msg.=" for $WarnReason"; }
@@ -444,7 +444,7 @@
$EditSummary[]="avatar status changed";
$HeavyUpdates['DisableAvatar']=$DisableAvatar;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your avatar privileges have been disabled'),db_string("Your avatar privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your avatar privileges have been disabled'),db_string("Your avatar privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -454,7 +454,7 @@
$HeavyUpdates['DisableLeech']=$DisableLeech;
$HeavyUpdates['CanLeech']=$DisableLeech;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your leeching privileges have been disabled'),db_string("Your leeching privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your leeching privileges have been disabled'),db_string("Your leeching privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
Tracker::update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => $DisableLeech));
}
@@ -464,7 +464,7 @@
if ($DisableInvites == 1) {
//$UpdateSet[]="Invites='0'";
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your invite privileges have been disabled'),db_string("Your invite privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your invite privileges have been disabled'),db_string("Your invite privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
$EditSummary[]="invites status changed";
@@ -476,7 +476,7 @@
$EditSummary[]="posting status changed";
$HeavyUpdates['DisablePosting']=$DisablePosting;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your forum posting privileges have been disabled'),db_string("Your forum posting privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your forum posting privileges have been disabled'),db_string("Your forum posting privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -485,7 +485,7 @@
$EditSummary[]="forums status changed";
$HeavyUpdates['DisableForums']=$DisableForums;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your forum privileges have been disabled'),db_string("Your forum privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your forum privileges have been disabled'),db_string("Your forum privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -494,7 +494,7 @@
$EditSummary[]="tagging status changed";
$HeavyUpdates['DisableTagging']=$DisableTagging;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your tagging privileges have been disabled'),db_string("Your tagging privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your tagging privileges have been disabled'),db_string("Your tagging privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -503,7 +503,7 @@
$EditSummary[]="upload status changed";
$HeavyUpdates['DisableUpload']=$DisableUpload;
if ($DisableUpload == 1) {
- Misc::send_pm($UserID, 0, db_string('Your upload privileges have been disabled'),db_string("Your upload privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your upload privileges have been disabled'),db_string("Your upload privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -513,7 +513,7 @@
$HeavyUpdates['DisableWiki']=$DisableWiki;
$HeavyUpdates['site_edit_wiki']=0;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your site editing privileges have been disabled'),db_string("Your site editing privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your site editing privileges have been disabled'),db_string("Your site editing privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -523,7 +523,7 @@
$EditSummary[]="PM status changed";
$HeavyUpdates['DisablePM']=$DisablePM;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your PM privileges have been disabled'),db_string("Your PM privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
+ Misc::send_pm($UserID, 0, db_string('Your PM privileges have been disabled'),db_string("Your PM privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]."));
}
}
@@ -532,7 +532,7 @@
$EditSummary[]="IRC status changed";
$HeavyUpdates['DisableIRC']=$DisableIRC;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your IRC privileges have been disabled'),db_string("Your IRC privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled."));
+ Misc::send_pm($UserID, 0, db_string('Your IRC privileges have been disabled'),db_string("Your IRC privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled."));
}
}
@@ -541,7 +541,7 @@
$EditSummary[]="request status changed";
$HeavyUpdates['DisableRequests']=$DisableRequests;
if (!empty($UserReason)) {
- Misc::send_pm($UserID, 0, db_string('Your request privileges have been disabled'),db_string("Your request privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=http://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled."));
+ Misc::send_pm($UserID, 0, db_string('Your request privileges have been disabled'),db_string("Your request privileges have been disabled. The reason given was: $UserReason. If you would like to discuss this please join ".BOT_DISABLED_CHAN." on our IRC network. Instructions can be found [url=https://".NONSSL_SITE_URL."/wiki.php?action=article&name=IRC+-+How+to+join]here[/url]. This loss of privileges does not affect the ability to join and talk to staff in #what.cd-disabled."));
}
}
@@ -614,10 +614,10 @@
$DB->query("SELECT ID, Uploaded, Downloaded FROM users_main WHERE Username LIKE '".$MergeStatsFrom."'");
if($DB->record_count() > 0) {
list($MergeID, $MergeUploaded, $MergeDownloaded) = $DB->next_record();
- $DB->query("UPDATE users_main AS um JOIN users_info AS ui ON um.ID=ui.UserID SET um.Uploaded = 0, um.Downloaded = 0, ui.AdminComment = CONCAT('".sqltime()." - Stats merged into http://".NONSSL_SITE_URL."/user.php?id=".$UserID." (".$Cur['Username'].") by ".$LoggedUser['Username']."\n\n', ui.AdminComment) WHERE ID = ".$MergeID);
+ $DB->query("UPDATE users_main AS um JOIN users_info AS ui ON um.ID=ui.UserID SET um.Uploaded = 0, um.Downloaded = 0, ui.AdminComment = CONCAT('".sqltime()." - Stats merged into https://".NONSSL_SITE_URL."/user.php?id=".$UserID." (".$Cur['Username'].") by ".$LoggedUser['Username']."\n\n', ui.AdminComment) WHERE ID = ".$MergeID);
$UpdateSet[]="Uploaded = Uploaded + '$MergeUploaded'";
$UpdateSet[]="Downloaded = Downloaded + '$MergeDownloaded'";
- $EditSummary[]="stats merged from http://".NONSSL_SITE_URL."/user.php?id=".$MergeID." (".$MergeStatsFrom.")";
+ $EditSummary[]="stats merged from https://".NONSSL_SITE_URL."/user.php?id=".$MergeID." (".$MergeStatsFrom.")";
$Cache->delete_value('users_stats_'.$UserID);
$Cache->delete_value('users_stats_'.$MergeID);
}
diff --git a/sections/userhistory/quote_notifications.php b/sections/userhistory/quote_notifications.php
index c241e9b4..d34c6ce0 100644
--- a/sections/userhistory/quote_notifications.php
+++ b/sections/userhistory/quote_notifications.php
@@ -40,7 +40,7 @@