Web interface update (new page fix for Juh)
This commit is contained in:
parent
e885d5f321
commit
059d386f0c
3 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
Yellow 0.5.3
|
||||
Yellow 0.5.4
|
||||
============
|
||||
[](http://datenstrom.se/yellow)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Web interface core plugin
|
||||
class YellowWebinterface
|
||||
{
|
||||
const Version = "0.5.3";
|
||||
const Version = "0.5.4";
|
||||
var $yellow; //access to API
|
||||
var $active; //web interface is active? (boolean)
|
||||
var $userLoginFailed; //web interface login failed? (boolean)
|
||||
|
@ -452,8 +452,8 @@ class YellowWebinterface
|
|||
{
|
||||
$fileName = $this->yellow->lookup->findFileFromLocation($this->yellow->page->location);
|
||||
$fileName = $this->yellow->lookup->findFileNew($fileName,
|
||||
$this->yellow->config->get("configDir"), $this->yellow->config->get("webinterfaceNewFile"),
|
||||
$this->yellow->config->get("contentDefaultFile"));
|
||||
$this->yellow->config->get("webinterfaceNewFile"), $this->yellow->config->get("configDir"),
|
||||
$this->yellow->config->get("template"));
|
||||
$fileData = $this->yellow->toolbox->getFileData($fileName);
|
||||
$fileData = preg_replace("/@datetime/i", date("Y-m-d H:i:s"), $fileData);
|
||||
$fileData = preg_replace("/@date/i", date("Y-m-d"), $fileData);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Yellow main class
|
||||
class Yellow
|
||||
{
|
||||
const Version = "0.5.3";
|
||||
const Version = "0.5.4";
|
||||
var $page; //current page
|
||||
var $pages; //pages from file system
|
||||
var $files; //files from file system
|
||||
|
@ -1928,13 +1928,13 @@ class YellowLookup
|
|||
}
|
||||
|
||||
// Return file path for new page
|
||||
function findFileNew($fileName, $pathBase, $fileNew, $fileDefault)
|
||||
function findFileNew($fileName, $fileNew, $pathBase, $nameDefault)
|
||||
{
|
||||
if(preg_match("/^.*\/(.+?)$/", dirname($fileName), $matches)) $name = $this->normaliseName($matches[1]);
|
||||
$fileName = strreplaceu("(.*)", $name, $pathBase.$fileNew);
|
||||
if(!is_file($fileName))
|
||||
{
|
||||
$name = $this->normaliseName($fileDefault, true, true);
|
||||
$name = $this->normaliseName($nameDefault);
|
||||
$fileName = strreplaceu("(.*)", $name, $pathBase.$fileNew);
|
||||
}
|
||||
return $fileName;
|
||||
|
|
Loading…
Add table
Reference in a new issue