We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit c0cfca13 authored by Mike Sheldon's avatar Mike Sheldon

Fix infinite loop in banned song check

parent fb779346
......@@ -77,11 +77,11 @@ for($i=0; $i<count($tr); $i++) {
$res->Move($tr[$i]);
$row = $res->FetchRow();
$banres = $adodb->Execute('SELECT COUNT(*) FROM Banned_Tracks WHERE '
$banned = $adodb->GetOne('SELECT COUNT(*) FROM Banned_Tracks WHERE '
. 'artist = ' . $adodb->qstr($row['artist_name'])
. 'AND track = ' . $adodb->qstr($row['name'])
. 'AND userid = ' . $user->uniqueid);
if ($banres->RecordCount() > 0) {
if ($banned) {
// This track has been banned by the user, so select another one
$i--;
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment