From e3fbd34a584be2522c4a069eb9ab1f231db9fa6b Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 21 Nov 2006 20:08:26 +0000 Subject: [PATCH] Fix for bug #2002 - EDIT PLAYLIST only shows one item no matter how many items are in the playlist --- campcaster/src/modules/htmlUI/var/ui_playlist.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/campcaster/src/modules/htmlUI/var/ui_playlist.class.php b/campcaster/src/modules/htmlUI/var/ui_playlist.class.php index e84c198a0..3dd878caa 100644 --- a/campcaster/src/modules/htmlUI/var/ui_playlist.class.php +++ b/campcaster/src/modules/htmlUI/var/ui_playlist.class.php @@ -333,6 +333,7 @@ class uiPlaylist public function getFlat($id) { + $this->flat = array(); $this->_plwalk($this->getPLArray($id)); if (count($this->flat) > 0) { @@ -350,7 +351,8 @@ class uiPlaylist 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) { if ($sub['elementname']===UI_PL_ELEM_PLAYLIST) { $this->_plwalk($sub, $node, $sub['attrs']);