aboutsummaryrefslogtreecommitdiffstats
path: root/include/Scrape.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-05-01 17:10:26 -0700
committerfriendica <info@friendica.com>2012-05-01 17:10:26 -0700
commitf24ffa8ef0bbda13c12f130a413a8660fff45493 (patch)
treeeaa1975b64864b340456fd16f47f99339c83ae39 /include/Scrape.php
parent6914bdce178e14cbdd834b286c35cd3f0bac7268 (diff)
downloadvolse-hubzilla-f24ffa8ef0bbda13c12f130a413a8660fff45493.tar.gz
volse-hubzilla-f24ffa8ef0bbda13c12f130a413a8660fff45493.tar.bz2
volse-hubzilla-f24ffa8ef0bbda13c12f130a413a8660fff45493.zip
improve handling of relative feed url's
Diffstat (limited to 'include/Scrape.php')
-rw-r--r--include/Scrape.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/Scrape.php b/include/Scrape.php
index b20d7d604..227252600 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -282,7 +282,7 @@ function scrape_feed($url) {
}
}
if(! $basename)
- $basename = substr($url,0,strrpos($url,'/')) . '/';
+ $basename = implode('/', array_slice(explode('/',$url),0,3)) . '/';
$items = $dom->getElementsByTagName('link');