Fix for bug #2002 - EDIT PLAYLIST only shows one item no matter how many items are in the playlist
This commit is contained in:
parent
0821cf18a0
commit
e3fbd34a58
1 changed files with 3 additions and 1 deletions
|
@ -333,6 +333,7 @@ class uiPlaylist
|
||||||
|
|
||||||
public function getFlat($id)
|
public function getFlat($id)
|
||||||
{
|
{
|
||||||
|
$this->flat = array();
|
||||||
$this->_plwalk($this->getPLArray($id));
|
$this->_plwalk($this->getPLArray($id));
|
||||||
|
|
||||||
if (count($this->flat) > 0) {
|
if (count($this->flat) > 0) {
|
||||||
|
@ -350,7 +351,8 @@ class uiPlaylist
|
||||||
|
|
||||||
private function _plwalk($arr, $parent=0, $attrs=0)
|
private function _plwalk($arr, $parent=0, $attrs=0)
|
||||||
{
|
{
|
||||||
$this->flat = array();
|
// Note: the array $this->flat needs to be initialized before
|
||||||
|
// this function is called.
|
||||||
foreach ($arr['children'] as $node => $sub) {
|
foreach ($arr['children'] as $node => $sub) {
|
||||||
if ($sub['elementname']===UI_PL_ELEM_PLAYLIST) {
|
if ($sub['elementname']===UI_PL_ELEM_PLAYLIST) {
|
||||||
$this->_plwalk($sub, $node, $sub['attrs']);
|
$this->_plwalk($sub, $node, $sub['attrs']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue