From cc99790fc8047954853c7eeb5466b6f710718cfe Mon Sep 17 00:00:00 2001 From: Git Date: Tue, 6 Sep 2011 22:00:45 +0000 Subject: [PATCH] 96 changes from Sun Aug 21 14:42:15 2011 -0400 to Tue Sep 6 21:47:17 2011 +0000 faster query for unfilling requests Have better.php rely on get_group's cache management Fix collector for multi-artist albums Sanitize tags in top10 filter Sanitize query Fixes a bug showing the Disable Avatars box for users with the "Can disable users' posting rights" permission Revert "#trying to fix mono" fix unknown release (try 1) trying to roll this out with dirty cache support Go back to memcached's internal incr/decr functions fixed nextElementSibling() patappatch g [patapper] --- sections/better/transcode.php | 7 +++---- sections/requests/takeunfill.php | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sections/better/transcode.php b/sections/better/transcode.php index 9452e823..ab5621c4 100644 --- a/sections/better/transcode.php +++ b/sections/better/transcode.php @@ -26,15 +26,14 @@ $SS->set_index(SPHINX_INDEX.' delta'); -$Results = $SS->search($Query, 'torrent_group', 0, array(), '', ''); +$Results = $SS->search($Query, '', 0, array(), '', ''); if(count($Results) == 0) { error('No results found!'); } - +/* // If some were fetched from memcached, get their artists if(!empty($Results['matches'])) { // Fetch the artists for groups $GroupIDs = array_keys($Results['matches']); $Artists = get_artists($GroupIDs); - foreach($Artists as $GroupID=>$Data) { if(!empty($Data[1])) { $Results['matches'][$GroupID]['Artists']=$Data[1]; // Only use main artists @@ -42,7 +41,7 @@ ksort($Results['matches'][$GroupID]); } } - +*/ // These ones were not found in the cache, run SQL if(!empty($Results['notfound'])) { $SQLResults = get_groups($Results['notfound']); diff --git a/sections/requests/takeunfill.php b/sections/requests/takeunfill.php index 1eaf75d2..26b2c122 100644 --- a/sections/requests/takeunfill.php +++ b/sections/requests/takeunfill.php @@ -57,10 +57,14 @@ send_pm($UserID, 0, db_string("A request you created has been unfilled"), db_string("The request '[url=http://".NONSSL_SITE_URL."/requests.php?action=view&id=".$RequestID."]".$FullName."[/url]' was unfilled by [url=http://".NONSSL_SITE_URL."/user.php?id=".$LoggedUser['ID']."]".$LoggedUser['Username']."[/url] for the reason: ".$_POST['reason'])); } +$DB->query("SELECT UserID FROM requests_votes WHERE RequestID = ".$RequestID); +$VoterIDs = implode(',',$DB->collect('UserID')); + $DB->query("SELECT ID, UserID FROM pm_conversations AS pc JOIN pm_conversations_users AS pu ON pu.ConvID=pc.ID AND pu.UserID!=0 - WHERE Subject='The request \"".db_string($FullName)."\" has been filled'"); + WHERE Subject='".db_string("The request '{$FullName}' has been filled")."' + AND pu.UserID IN ($VoterIDs)"); $ConvIDs = implode(',',$DB->collect('ID')); $UserIDs = $DB->collect('UserID');