# HG changeset patch # User Tom Fredrik "BFG" Klaussen # Date 1457367152 -3600 # Node ID d0698ec07b0b2194a2fdaf972ed691ff32112019 # Parent b6381903122eec68516e2a519e56d59b2dea64a8# Parent 408ffecc90769024e3f36155fcda52a1e1c4b039 Branch merge diff -r 408ffecc9076 -r d0698ec07b0b FileCacheSet.inc --- a/FileCacheSet.inc Wed Oct 01 15:36:17 2014 +0200 +++ b/FileCacheSet.inc Mon Mar 07 17:12:32 2016 +0100 @@ -129,7 +129,7 @@ * * @return a CacheTimeCheck object */ - function instance($filename = False) + public static function instance($filename = False) { if (! self::$myInstance) self::$myInstance = new self($filename); diff -r 408ffecc9076 -r d0698ec07b0b InputParser.inc --- a/InputParser.inc Wed Oct 01 15:36:17 2014 +0200 +++ b/InputParser.inc Mon Mar 07 17:12:32 2016 +0100 @@ -77,7 +77,9 @@ */ function generateContent() { - $retVal = new PageContent($this->master->saveXml($this->master)); + //We may need to set and check the contenttype and replace + //saveHTML with saveXML + $retVal = new PageContent($this->master->saveHTML($this->master)); $retVal->setHeader('Content-Language', $this->options->getLang()); return $retVal; } @@ -90,7 +92,7 @@ * @return if the type is array, return an array, otherwise return a * scalar */ - function getParam($param) + static function getParam($param) { $param_type = $param->getAttribute("type"); $param_value; @@ -254,6 +256,7 @@ $clonedChild = $doc->importNode($child, true); $parent->insertBefore($clonedChild, $file); } + //We need to iterate in the opposite direction when removing, //so best shifting. array_unshift($toRemove, $file); @@ -312,7 +315,7 @@ $parent = $include->parentNode; $xml = getElementByTagName($subdoc,"xml"); foreach($xml->childNodes as $child) { - $text = $subdoc->saveXml($child); + $text = $subdoc->saveHTML($child); $clonedChild = $doc->importNode($child,true); $parent->insertBefore($clonedChild,$include); } diff -r 408ffecc9076 -r d0698ec07b0b Sitemap.inc --- a/Sitemap.inc Wed Oct 01 15:36:17 2014 +0200 +++ b/Sitemap.inc Mon Mar 07 17:12:32 2016 +0100 @@ -128,7 +128,7 @@ } } - usort($urls, cmp_length_lex); + usort($urls, "cmp_length_lex"); foreach($urls as $location) { $headers = Http::getHeaders($location, 5); diff -r 408ffecc9076 -r d0698ec07b0b sitemap.php --- a/sitemap.php Wed Oct 01 15:36:17 2014 +0200 +++ b/sitemap.php Mon Mar 07 17:12:32 2016 +0100 @@ -1,8 +1,9 @@ -