From 3de0a91af3905dac753e2835403a806997cd6ba9 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Thu, 22 Nov 2007 21:40:57 +0000 Subject: slight performance tweak --- lib/class/tmpplaylist.class.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/class/tmpplaylist.class.php') diff --git a/lib/class/tmpplaylist.class.php b/lib/class/tmpplaylist.class.php index 8d037179..a5e22897 100644 --- a/lib/class/tmpplaylist.class.php +++ b/lib/class/tmpplaylist.class.php @@ -331,6 +331,9 @@ class tmpPlaylist { "LEFT JOIN tmp_playlist ON tmp_playlist_data.tmp_playlist=tmp_playlist.id " . "WHERE tmp_playlist.id IS NULL"; $db_results = Dba::query($sql); + + // If we don't allow it, don't waste the time + if (!Config::get('allow_democratic_playback')) { return true; } // This deletes data without votes, if it's a voting democratic playlist $sql = "DELETE FROM tmp_playlist_data USING tmp_playlist_data " . -- cgit