Better PHP compatibility (for Rafael)

This commit is contained in:
markseu 2015-07-15 13:03:24 +02:00
parent 1da8d029b6
commit 0e09a87fcd
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
Yellow 0.5.25
Yellow 0.5.26
=============
[![Yellow](https://raw.githubusercontent.com/wiki/datenstrom/yellow/images/yellow.jpg)](http://datenstrom.se/yellow)

View file

@ -5,7 +5,7 @@
// Yellow main class
class Yellow
{
const Version = "0.5.25";
const Version = "0.5.26";
var $page; //current page
var $pages; //pages from file system
var $files; //files from file system
@ -343,7 +343,8 @@ class Yellow
// Execute snippet
function snippet($name, $args = NULL)
{
$this->page->parseSnippet(func_get_args());
$this->pages->snippetArgs = func_get_args();
$this->page->parseSnippet($name);
}
}
@ -601,9 +602,8 @@ class YellowPage
}
// Parse snippet
function parseSnippet($args)
function parseSnippet($name)
{
list($name) = $this->yellow->pages->snippetArgs = $args;
$fileNameSnippet = $this->yellow->config->get("snippetDir").$this->yellow->lookup->normaliseName($name).".php";
if(is_file($fileNameSnippet))
{