parent
db0f6260c7
commit
ffbdba6f6b
|
@ -90,17 +90,21 @@ class Application_Model_Datatables
|
||||||
// we need to go over all items and fix length for playlist
|
// we need to go over all items and fix length for playlist
|
||||||
// in case the playlist contains dynamic block
|
// in case the playlist contains dynamic block
|
||||||
foreach ($results as &$r) {
|
foreach ($results as &$r) {
|
||||||
if ($r['ftype'] == 'playlist') {
|
//this function is also called for Manage Users so in
|
||||||
$pl = new Application_Model_Playlist($r['id']);
|
//this case there will be no 'ftype'
|
||||||
$r['length'] = $pl->getLength();
|
if (isset($r['ftype'])) {
|
||||||
} else if ($r['ftype'] == "block") {
|
if ($r['ftype'] == 'playlist') {
|
||||||
$bl = new Application_Model_Block($r['id']);
|
$pl = new Application_Model_Playlist($r['id']);
|
||||||
if ($bl->isStatic()) {
|
$r['length'] = $pl->getLength();
|
||||||
$r['bl_type'] = 'static';
|
} else if ($r['ftype'] == "block") {
|
||||||
} else {
|
$bl = new Application_Model_Block($r['id']);
|
||||||
$r['bl_type'] = 'dynamic';
|
if ($bl->isStatic()) {
|
||||||
|
$r['bl_type'] = 'static';
|
||||||
|
} else {
|
||||||
|
$r['bl_type'] = 'dynamic';
|
||||||
|
}
|
||||||
|
$r['length'] = $bl->getLength();
|
||||||
}
|
}
|
||||||
$r['length'] = $bl->getLength();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in New Issue