From e2b83a0c8cefbac292c227e5bd19a406dfef6f95 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 17 Jan 2013 22:20:28 -0500 Subject: [PATCH] CC-4857: Playlist length will increase every time I duplicate it. - fixed --- airtime_mvc/application/models/airtime/CcPlaylist.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcPlaylist.php b/airtime_mvc/application/models/airtime/CcPlaylist.php index c16ad2dea..d6cd550e1 100644 --- a/airtime_mvc/application/models/airtime/CcPlaylist.php +++ b/airtime_mvc/application/models/airtime/CcPlaylist.php @@ -91,13 +91,12 @@ class CcPlaylist extends BaseCcPlaylist { SELECT SUM(cliplength) FROM cc_playlistcontents as pc LEFT JOIN cc_files as f ON pc.file_id = f.id WHERE PLAYLIST_ID = :p1 - AND f.file_exists is NUll or f.file_exists = true + AND (f.file_exists is NUll or f.file_exists = true) SQL; $stmt = $con->prepare($sql); $stmt->bindValue(':p1', $this->getDbId()); $stmt->execute(); $length = $stmt->fetchColumn(); - if (is_null($length)) { $length = "00:00:00"; }