more browse fixes
This commit is contained in:
parent
9e7ac33316
commit
b70c8d1b5d
|
@ -26,7 +26,7 @@
|
|||
<td {include file="scratchpad/actionhandler.tpl"} style="cursor: pointer">
|
||||
{if $i.type|lower == "playlist"}
|
||||
|
||||
{if $_PL_activeId == $i.id}
|
||||
{if $i.type == 'playlist' && $PL->isAvailable($i.id) == false}
|
||||
<div style="font-weight: bold; cursor: pointer">
|
||||
{else}
|
||||
<div style="cursor: pointer">
|
||||
|
@ -40,7 +40,7 @@
|
|||
{assign var="_duration" value=$i.duration}
|
||||
<td {include file="scratchpad/actionhandler.tpl"} style="text-align: right; cursor: pointer">{niceTime in=$_duration}</td>
|
||||
<td {include file="scratchpad/actionhandler.tpl"} style="border: 0; text-align: center; cursor: pointer">
|
||||
{if $_PL_activeId == $i.id}
|
||||
{if $i.type == 'playlist' && $PL->isAvailable($i.id) == false}
|
||||
<div align="left"><img src="img/ico_lock.png">
|
||||
<img src="img/{$i.type}.png" border="0" alt="{$i.type|capitalize}" {* include file="sub/alttext.tpl"*} /></div>
|
||||
{else}
|
||||
|
|
|
@ -1294,10 +1294,12 @@ class BasicStor {
|
|||
else if ($category === "dcterms:extent") {
|
||||
$columnName = $pl_cat[$category];
|
||||
|
||||
$sql = "SELECT DISTINCT SUM(cliplength) AS $columnName FROM ".$CC_CONFIG["playListContentsTable"]." GROUP BY playlist_id";
|
||||
$limitPart = ($limit != 0 ? " LIMIT $limit" : '' ).
|
||||
($offset != 0 ? " OFFSET $offset" : '' );
|
||||
$countRowsSql = "SELECT COUNT(DISTINCT SUM(cliplength)) FROM ".$CC_CONFIG["playListContentsTable"]." GROUP BY playlist_id";
|
||||
|
||||
$sql = "SELECT DISTINCT length AS $columnName FROM ".$CC_CONFIG["playListTimeView"];
|
||||
|
||||
$countRowsSql = "SELECT COUNT(DISTINCT length) FROM ".$CC_CONFIG["playListTimeView"];
|
||||
|
||||
$pl_cnt = $CC_DBC->GetOne($countRowsSql);
|
||||
if (PEAR::isError($cnt)) {
|
||||
|
|
|
@ -310,9 +310,14 @@ if (!camp_db_table_exists($CC_CONFIG['playListContentsTable'])) {
|
|||
CREATE TRIGGER calculate_position AFTER INSERT OR DELETE ON ".$CC_CONFIG['playListContentsTable']."
|
||||
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;
|
||||
CREATE OR REPLACE VIEW cc_playlisttimes AS (
|
||||
SELECT PL.id, COALESCE(T.length, '00:00:00') AS length
|
||||
from ".$CC_CONFIG['playListTable']." AS PL LEFT JOIN
|
||||
(SELECT playlist_id AS id, text(SUM(cliplength)) AS length
|
||||
FROM ".$CC_CONFIG['playListContentsTable']." GROUP BY playlist_id) AS T
|
||||
|
||||
ON PL.id = T.id
|
||||
);
|
||||
|
||||
";
|
||||
|
||||
|
|
Loading…
Reference in New Issue