summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-14 06:51:38 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-08-14 06:51:38 +0000
commitdf2f009920f2ed128eea364870f4df94d9b89486 (patch)
tree73bb6560cb3db510f64141a0f826a51db420224b /lib/class
parent6983cb8e0cdb661053c9f6336518f2549cfb13a5 (diff)
downloadampache-df2f009920f2ed128eea364870f4df94d9b89486.tar.gz
ampache-df2f009920f2ed128eea364870f4df94d9b89486.tar.bz2
ampache-df2f009920f2ed128eea364870f4df94d9b89486.zip
fixed lastfm for reals this time, I think also fixed not being able to re-enable users
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/scrobbler.class.php6
-rw-r--r--lib/class/user.class.php12
2 files changed, 7 insertions, 11 deletions
diff --git a/lib/class/scrobbler.class.php b/lib/class/scrobbler.class.php
index ad379940..26aad0f1 100644
--- a/lib/class/scrobbler.class.php
+++ b/lib/class/scrobbler.class.php
@@ -42,10 +42,6 @@ class scrobbler {
$this->challenge = '';
$this->queued_tracks = array();
- $this->submit_host = $_SESSION['state']['lastfm']['submit_host'];
- $this->submit_port = $_SESSION['state']['lastfm']['submit_port'];
- $this->submit_url = $_SESSION['state']['lastfm']['submit_url'];
-
} // scrobbler
/**
@@ -120,7 +116,7 @@ class scrobbler {
return false;
}
- $this->challenge = $response[1];
+ $data['challenge'] = $response[1];
return $data;
} // handshake
diff --git a/lib/class/user.class.php b/lib/class/user.class.php
index 8cb28513..32b5d59d 100644
--- a/lib/class/user.class.php
+++ b/lib/class/user.class.php
@@ -512,10 +512,10 @@ class User {
* enable
* this enables the current user
*/
- function enable() {
+ public function enable() {
$sql = "UPDATE `user` SET `disabled`='0' WHERE id='" . $this->id . "'";
- $db_results = mysql_query($sql,dbh());
+ $db_results = Dba::query($sql);
return true;
@@ -574,11 +574,11 @@ class User {
if (!empty($this->prefs['lastfm_user']) AND !empty($this->prefs['lastfm_pass'])) {
$song_info->format();
-
$lastfm = new scrobbler($this->prefs['lastfm_user'],$this->prefs['lastfm_pass']);
- $lastfm->submit_host = $this->prefs['lastfm_host'];
- $lastfm->submit_port = $this->prefs['lastfm_port'];
- $lastfm->submit_url = $this->prefs['lastfm_url'];
+ $lastfm->submit_host = $this->prefs['lastfm_host'];
+ $lastfm->submit_port = $this->prefs['lastfm_port'];
+ $lastfm->submit_url = $this->prefs['lastfm_url'];
+ $lastfm->challenge = $this->prefs['lastfm_challenge'];
if (!$lastfm->queue_track($song_info->f_artist_full,$song_info->f_album_full,$song_info->title,time(),$song_info->time)) {
debug_event('LastFM','Error: Queue Failed: ' . $lastfm->error_msg,'3');