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');