# HG changeset patch # User Tom Fredrik "BFG" Klaussen # Date 1350589738 -7200 # Node ID c7de7a4641d75407cae523580715efa890eaba46 # Parent 8a9bfbe220ca2b692e9477c5a9d5581bc1763e75 Generate humanreadable urls for sitemap. diff -r 8a9bfbe220ca -r c7de7a4641d7 Sitemap.inc --- a/Sitemap.inc Thu Oct 18 17:40:21 2012 +0200 +++ b/Sitemap.inc Thu Oct 18 21:48:58 2012 +0200 @@ -51,7 +51,9 @@ '; $base = 'http://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; - $base = substr($base, 0, strrpos($base, '/')); + $l = strrpos($base, '/'); + if ($l) + $base = substr($base, 0, $l); $acceptedLanguages = $this->options->getAcceptedLanguages(); @@ -79,9 +81,10 @@ $opts['name'] = $name; } - $optstring = opttostring($opts); + $optstring = genUrl($opts, array(), array('lang', 'name')); - $location = "${base}/${optstring}"; + $location = "${base}${optstring}/"; + $headers = Http::getHeaders($location, 5); $location = htmlentities($location); diff -r 8a9bfbe220ca -r c7de7a4641d7 filters.inc --- a/filters.inc Thu Oct 18 17:40:21 2012 +0200 +++ b/filters.inc Thu Oct 18 21:48:58 2012 +0200 @@ -56,7 +56,6 @@ if ($active) $langbar .= ''; - //$flagUrl = "http://dev.bfginvest.no/php/flag.php"; $flagUrl = $options->getFlagUrl(); $langbar .= "