diff --git a/ajax_dropsong.php b/ajax_dropsong.php old mode 100644 new mode 100755 index 8b8ff55..d798002 --- a/ajax_dropsong.php +++ b/ajax_dropsong.php @@ -15,7 +15,8 @@ if ( false !== ($row = $sth->fetch()) ) { exit(); } -$query = "DELETE FROM " . QUEUECONTENTSTABLE . " WHERE qid=(SELECT id FROM " . QUEUESTABLE . " WHERE active='true' AND type='user') AND songid=(SELECT songid FROM " . RECENTSTABLE . " ORDER BY timeplayed DESC LIMIT 1)"; +$query = "DELETE FROM " . QUEUECONTENTSTABLE . " WHERE qid=(SELECT id FROM " . QUEUESTABLE . " "; +$query .= "WHERE active='true' AND type='user') AND songid=(SELECT songid FROM " . RECENTSTABLE . " ORDER BY timeplayed DESC LIMIT 1)"; $sth = $globaldbh->prepare($query); $sth->execute(); diff --git a/minimal.js b/minimal.js old mode 100644 new mode 100755 index 230065d..aef05f8 --- a/minimal.js +++ b/minimal.js @@ -374,8 +374,8 @@ function emptyJukebox (callingElement) { function dropSong (callingElement) { callingElement.blur(); - callingElement.addClass("buttonactive"); if ( gettingJukeboxList || gettingSongList ) return false; + callingElement.addClass("buttonactive"); $.ajax({ url: 'ajax_dropsong.php', async: false,