From 5fcc29bd2ee6b2d2a9e6f173bfa7cacc6d8beb65 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 2 May 2013 14:20:19 -0700 Subject: [PATCH] urlPrefix experiment --- e107_handlers/xml_class.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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')) {