fixes for searching for an empty playlist.
This commit is contained in:
parent
dfe86e4423
commit
9e7ac33316
|
@ -35,7 +35,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
|
|||
</li>
|
||||
<li class="nav-main"><a>##Playlists##</a>
|
||||
<ul>
|
||||
{if $PL->getActiveArr()}
|
||||
{if $PL->getActiveId()}
|
||||
<li><a href="{$UI_BROWSER}?id={$START.fid}&act=PL.simpleManagement">##Edit Playlist##</a></li>
|
||||
{else}
|
||||
{if $PL->reportLookedPL()}
|
||||
|
|
|
@ -1173,14 +1173,12 @@ class BasicStor {
|
|||
}
|
||||
|
||||
$sql = "SELECT * FROM ((".$plSelect."PL.id, 'playlist' AS ftype
|
||||
FROM ".$CC_CONFIG["playListTable"]." AS PL,
|
||||
(SELECT playlist_id AS id, text(SUM(cliplength)) AS length
|
||||
FROM ".$CC_CONFIG["playListContentsTable"]." group by playlist_id) AS T
|
||||
WHERE PL.id = T.id)
|
||||
|
||||
FROM ".$CC_CONFIG["playListTable"]." AS PL
|
||||
LEFT JOIN ".$CC_CONFIG['playListTimeView']." PLT ON PL.id = PLT.id)
|
||||
|
||||
UNION
|
||||
|
||||
".$fileSelect."id, ftype FROM " .$CC_CONFIG["filesTable"].") AS Content ";
|
||||
(".$fileSelect."id, ftype FROM ".$CC_CONFIG["filesTable"]." AS FILES)) AS RESULTS ";
|
||||
|
||||
$sql .= $whereClause;
|
||||
|
||||
|
@ -1188,7 +1186,7 @@ class BasicStor {
|
|||
$sql .= " ORDER BY ".join(",", $orderBySql);
|
||||
}
|
||||
|
||||
$_SESSION["br"] = $sql;
|
||||
//$_SESSION["br"] = $sql;
|
||||
|
||||
$res = $CC_DBC->getAll($sql);
|
||||
if (PEAR::isError($res)) {
|
||||
|
@ -1199,6 +1197,7 @@ class BasicStor {
|
|||
}
|
||||
|
||||
$count = count($res);
|
||||
$_SESSION["br"] .= " COUNT: ".$count;
|
||||
|
||||
$res = array_slice($res, $offset != 0 ? $offset : 0, $limit != 0 ? $limit : 10);
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ $CC_CONFIG['prefTable'] = $CC_CONFIG['tblNamePrefix'].'pref';
|
|||
//$CC_CONFIG['playlogTable'] = $CC_CONFIG['tblNamePrefix'].'playlog';
|
||||
$CC_CONFIG['scheduleTable'] = $CC_CONFIG['tblNamePrefix'].'schedule';
|
||||
$CC_CONFIG['backupTable'] = $CC_CONFIG['tblNamePrefix'].'backup';
|
||||
$CC_CONFIG['playListTimeView'] = $CC_CONFIG['tblNamePrefix'].'playlisttimes';
|
||||
|
||||
$CC_CONFIG['playListSequence'] = $CC_CONFIG['playListTable'].'_id';
|
||||
$CC_CONFIG['filesSequence'] = $CC_CONFIG['filesTable'].'_id';
|
||||
|
|
|
@ -308,7 +308,13 @@ if (!camp_db_table_exists($CC_CONFIG['playListContentsTable'])) {
|
|||
LANGUAGE 'plpgsql';
|
||||
|
||||
CREATE TRIGGER calculate_position AFTER INSERT OR DELETE ON ".$CC_CONFIG['playListContentsTable']."
|
||||
FOR EACH ROW EXECUTE PROCEDURE calculate_position();";
|
||||
FOR EACH ROW EXECUTE PROCEDURE calculate_position();
|
||||
|
||||
CREATE OR REPLACE VIEW cc_playlisttimes AS
|
||||
SELECT playlist_id AS id, text(SUM(cliplength)) AS length
|
||||
FROM ".$CC_CONFIG['playListContentsTable']." group by playlist_id;
|
||||
|
||||
";
|
||||
|
||||
camp_install_query($sql);
|
||||
|
||||
|
|
Loading…
Reference in New Issue