Mercurial > SimpleWebPresenter
changeset 106:d0698ec07b0b
Branch merge
| author | Tom Fredrik "BFG" Klaussen <bfg@blenning.no> |
|---|---|
| date | Mon, 07 Mar 2016 17:12:32 +0100 |
| parents | b6381903122e (diff) 408ffecc9076 (current diff) |
| children | d5f3efba33e2 |
| files | |
| diffstat | 4 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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); }
