diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-01-14 01:38:50 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-01-14 01:38:50 +0000 |
commit | d7c3ede9e757dab9889503a415d78c7937a311b3 (patch) | |
tree | 4311b7aac78600968bdb151c6873eaca80caee5f /lib/class/playlist.class.php | |
parent | fda4bd6deb683fc937f1ae831d9c8ed5b4748eaf (diff) | |
download | ampache-d7c3ede9e757dab9889503a415d78c7937a311b3.tar.gz ampache-d7c3ede9e757dab9889503a415d78c7937a311b3.tar.bz2 ampache-d7c3ede9e757dab9889503a415d78c7937a311b3.zip |
fixed public/private aspect of playlists, default is to filter out non-owned private playlists now
Diffstat (limited to 'lib/class/playlist.class.php')
-rw-r--r-- | lib/class/playlist.class.php | 7 |
1 files changed, 6 insertions, 1 deletions
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 = '<a href="' . Config::get('web_path') . '/playlist.php?action=show_playlist&playlist_id=' . $this->id . '">' . $this->f_name . '</a>'; + $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; } |