summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-20 17:23:09 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-02-20 17:23:09 +0000
commitb1a9417f5d39cba83f62b218f85422abefb67bc4 (patch)
treefa5b90fea9d40852d6dd8b65476ba36b0777cc11 /lib
parent84b941a1ad9f10e0609f20934b2539918c890763 (diff)
downloadampache-b1a9417f5d39cba83f62b218f85422abefb67bc4.tar.gz
ampache-b1a9417f5d39cba83f62b218f85422abefb67bc4.tar.bz2
ampache-b1a9417f5d39cba83f62b218f85422abefb67bc4.zip
fixed old username references in playlist class
Diffstat (limited to 'lib')
-rw-r--r--lib/class/playlist.class.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/class/playlist.class.php b/lib/class/playlist.class.php
index af4962c9..0eeb6d4a 100644
--- a/lib/class/playlist.class.php
+++ b/lib/class/playlist.class.php
@@ -236,11 +236,11 @@ class Playlist {
/* If they are a full admin, then they always get rights */
if ($GLOBALS['user']->has_access(100)) { return true; }
- if ($this->user == $GLOBALS['user']->username) { return true; }
+ if ($this->user == $GLOBALS['user']->id) { return true; }
/* Check the Playlist_permission table */
$sql = "SELECT id FROM playlist_permission WHERE " .
- "playlist='" . sql_escape($this->id) . "' AND userid='" . sql_escape($GLOBALS['user']->username) . "'" .
+ "playlist='" . sql_escape($this->id) . "' AND userid='" . sql_escape($GLOBALS['user']->id) . "'" .
" AND level >= '25'";
$db_results = mysql_query($sql, dbh());
@@ -282,7 +282,7 @@ class Playlist {
*/
function _update_item($field,$value,$level) {
- if ($GLOBALS['user']->username != $this->user AND !$GLOBALS['user']->has_access($level)) {
+ if ($GLOBALS['user']->id != $this->user AND !$GLOBALS['user']->has_access($level)) {
return false;
}
@@ -381,13 +381,13 @@ class Playlist {
/**
* create
* This function creates an empty playlist, gives it a name and type
- * Assumes $GLOBALS['user']->username as the user
+ * Assumes $GLOBALS['user']->id as the user
*/
function create($name,$type) {
$name = sql_escape($name);
$type = sql_escape($type);
- $user = sql_escape($GLOBALS['user']->username);
+ $user = sql_escape($GLOBALS['user']->id);
$date = time();
$sql = "INSERT INTO playlist (`name`,`user`,`type`,`date`) " .