diff --git a/e107_handlers/xml_class.php b/e107_handlers/xml_class.php index 6014ce08d..4b25f78a6 100644 --- a/e107_handlers/xml_class.php +++ b/e107_handlers/xml_class.php @@ -109,7 +109,7 @@ class xmlClass private $stringTags = false; - + private $urlPrefix = false; /** * Add root element to the result array @@ -284,6 +284,19 @@ class xmlClass return $this; } + + /** + * Set urlPrefix + * + * @param array $filter + * @return xmlClass + */ + public function setUrlPrefix($url) + { + $this->urlPrefix = $url; + return $this; + } + public function setFeedUrl($feed) @@ -319,6 +332,12 @@ class xmlClass // ... and there shouldn't be unprintable characters in the URL anyway } + if($this->urlPrefix !== false) + { + $address = $this->urlPrefix.$address; + } + + // ... and there shouldn't be unprintable characters in the URL anyway if (function_exists('file_get_contents') && ini_get('allow_url_fopen')) {