mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
urlPrefix experiment
This commit is contained in:
@@ -109,7 +109,7 @@ class xmlClass
|
|||||||
|
|
||||||
private $stringTags = false;
|
private $stringTags = false;
|
||||||
|
|
||||||
|
private $urlPrefix = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add root element to the result array
|
* Add root element to the result array
|
||||||
@@ -285,6 +285,19 @@ class xmlClass
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set urlPrefix
|
||||||
|
*
|
||||||
|
* @param array $filter
|
||||||
|
* @return xmlClass
|
||||||
|
*/
|
||||||
|
public function setUrlPrefix($url)
|
||||||
|
{
|
||||||
|
$this->urlPrefix = $url;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function setFeedUrl($feed)
|
public function setFeedUrl($feed)
|
||||||
{
|
{
|
||||||
@@ -319,6 +332,12 @@ class xmlClass
|
|||||||
// ... and there shouldn't be unprintable characters in the URL anyway
|
// ... 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
|
// ... and there shouldn't be unprintable characters in the URL anyway
|
||||||
if (function_exists('file_get_contents') && ini_get('allow_url_fopen'))
|
if (function_exists('file_get_contents') && ini_get('allow_url_fopen'))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user