From d7c3ede9e757dab9889503a415d78c7937a311b3 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 14 Jan 2008 01:38:50 +0000 Subject: fixed public/private aspect of playlists, default is to filter out non-owned private playlists now --- lib/class/playlist.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/class/playlist.class.php') diff --git a/lib/class/playlist.class.php b/lib/class/playlist.class.php index 8310219c..b5cb8f71 100644 --- a/lib/class/playlist.class.php +++ b/lib/class/playlist.class.php @@ -78,6 +78,8 @@ class Playlist { $this->f_name = truncate_with_ellipsis($this->name,Config::get('ellipse_threshold_title')); $this->f_link = '' . $this->f_name . ''; + $this->f_type = ($this->type == 'private') ? get_user_icon('lock',_('Private')) : ''; + $client = new User($this->user); $this->f_user = $client->fullname; @@ -263,6 +265,9 @@ class Playlist { if ($data['name'] != $this->name) { $this->update_name($data['name']); } + if ($data['pl_type'] != $this->type) { + $this->update_type($data['pl_type']); + } } // update @@ -296,7 +301,7 @@ class Playlist { */ private function _update_item($field,$value,$level) { - if ($GLOBALS['user']->id != $this->user AND !$GLOBALS['user']->has_access($level)) { + if ($GLOBALS['user']->id != $this->user AND !Access::check('interface',$level)) { return false; } -- cgit