summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-25 15:45:39 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-25 15:45:39 +0000
commit8442e4c7dbb9bad0386489418567c667e7b5ed91 (patch)
tree630eb98e7d83287912600adc06e457cd510c043f
parentb89350528c02ff220c2cf67ea590fc667823a607 (diff)
downloadampache-8442e4c7dbb9bad0386489418567c667e7b5ed91.tar.gz
ampache-8442e4c7dbb9bad0386489418567c667e7b5ed91.tar.bz2
ampache-8442e4c7dbb9bad0386489418567c667e7b5ed91.zip
dont even try to do handshake if password or username have a strlen of 0
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--modules/plugins/Lastfm.plugin.php6
2 files changed, 6 insertions, 2 deletions
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 39071b5f..f4b9fb9f 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.4-Beta2
+ - Fixed LastFM plugin username and password checking to not even try
+ if there is no username or password
--------------------------------------------------------------------------
v.3.4-Beta1 12/25/2007
diff --git a/modules/plugins/Lastfm.plugin.php b/modules/plugins/Lastfm.plugin.php
index 0804bb26..6e4b2ab4 100644
--- a/modules/plugins/Lastfm.plugin.php
+++ b/modules/plugins/Lastfm.plugin.php
@@ -172,16 +172,18 @@ class AmpacheLastfm {
*/
public function load($data,$user_id) {
- if (isset($data['lastfm_user'])) {
+ if (strlen($data['lastfm_user'])) {
$this->username = $data['lastfm_user'];
}
else {
+ debug_event('LastFM','No Username, not scrobbling','3');
return false;
}
- if (isset($data['lastfm_pass'])) {
+ if (strlen($data['lastfm_pass'])) {
$this->password = $data['lastfm_pass'];
}
else {
+ debug_event('LastFM','No Password, not scrobbling','3');
return false;
}