summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-05-13 07:27:16 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-05-13 07:27:16 +0000
commit6546c826432b5c18c22a2ac2cd7dd1d77a7002c3 (patch)
tree425469fcd29d5fbb26455220b40d3f576802dc38 /modules
parentada740ec4123cf286c8abc3a09eb62ed80716fba (diff)
downloadampache-6546c826432b5c18c22a2ac2cd7dd1d77a7002c3.tar.gz
ampache-6546c826432b5c18c22a2ac2cd7dd1d77a7002c3.tar.bz2
ampache-6546c826432b5c18c22a2ac2cd7dd1d77a7002c3.zip
fixed playlists thing for real this time
Diffstat (limited to 'modules')
-rw-r--r--modules/amazon/AmazonSearchEngine.class.php25
1 files changed, 12 insertions, 13 deletions
diff --git a/modules/amazon/AmazonSearchEngine.class.php b/modules/amazon/AmazonSearchEngine.class.php
index 476468c2..f909b9ff 100644
--- a/modules/amazon/AmazonSearchEngine.class.php
+++ b/modules/amazon/AmazonSearchEngine.class.php
@@ -48,16 +48,17 @@ class AmazonSearch {
function AmazonSearch($token, $base_url_param = '', $associates_id = 'none') {
- if($base_url_param != ''){$this->base_url = $base_url_param . $this->url_suffix;
- if (conf('debug')) {
- log_event($GLOBALS['user']->username,'amazon-search-results',"Retrieving from " . $base_url_param . $this->url_suffix);
- }
+ /* If we have a base url then use it */
+ if ($base_url_param != '') {
+ $this->base_url = $base_url_param . $this->url_suffix;
+ debug_event('amazon-search-results','Retrieving from ' . $base_url_param . $this->url_suffix,'5');
}
- else{ $this->base_url=$this->base_url_default . $this->url_suffix;
- if (conf('debug')) {
- log_event($GLOBALS['user']->username,'amazon-search-results',"Retrieving from DEFAULT");
- }
- };
+ /* Default Operation */
+ else {
+ $this->base_url=$this->base_url_default . $this->url_suffix;
+ debug_event('amazon-search-results','Retrieving from DEFAULT','5');
+ }
+
$this->token = $token;
$this->associates_id = $associates_id;
@@ -99,12 +100,10 @@ class AmazonSearch {
$snoopy->fetch($url);
$contents = $snoopy->results;
- if (conf('debug')) {
- log_event($GLOBALS['user']->username,'amazon-search-results',"Retrieved $contents");
- }
+ debug_event('amazon-search-results','Retrieved ' . strlen($contents) . ' chars','5');
if (!xml_parse($this->_parser, $contents)) {
- die(sprintf('XML error: %s at line %d',xml_error_string(xml_get_error_code($this->_parser)),xml_get_current_line_number($this->_parser)));
+ debug_event('amazon-search-results','Error:' . sprintf('XML error: %s at line %d',xml_error_string(xml_get_error_code($this->_parser)),xml_get_current_line_number($this->_parser)),'1');
}
xml_parser_free($this->_parser);