Core update (Nibreh remix)

This commit is contained in:
markseu 2015-05-06 09:19:31 +02:00
parent d509829f24
commit bca669843b
5 changed files with 13 additions and 16 deletions

View file

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

View file

@ -1,4 +1,4 @@
/* Yellow web interface 0.5.7 */
/* Yellow web interface 0.5.8 */
.yellow-bar { position:relative; overflow:hidden; line-height:2em; margin-bottom:10px; }
.yellow-bar-left { display:block; float:left; }

View file

@ -4,7 +4,7 @@
// Yellow main API
var yellow =
{
version: "0.5.7",
version: "0.5.8",
action: function(text) { yellow.webinterface.action(text); },
onClick: function(e) { yellow.webinterface.hidePanesOnClick(yellow.toolbox.getEventElement(e)); },
onKeydown: function(e) { yellow.webinterface.hidePanesOnKeydown(yellow.toolbox.getEventKeycode(e)); },

View file

@ -5,7 +5,7 @@
// Web interface core plugin
class YellowWebinterface
{
const Version = "0.5.7";
const Version = "0.5.8";
var $yellow; //access to API
var $active; //web interface is active? (boolean)
var $userLoginFailed; //web interface login failed? (boolean)
@ -168,15 +168,12 @@ class YellowWebinterface
if($statusCode == 0)
{
$statusCode = $this->yellow->processRequest($serverScheme, $serverName, $base, $location, $fileName, false);
if($this->userLoginFailed)
if($this->users->getNumber())
{
if(!$this->users->getNumber())
{
$url = $this->yellow->text->get("webinterfaceUserAccountUrl");
$this->yellow->page->error(500, "You are not authorised on this server, [please add a user account]($url)!");
} else {
$this->yellow->page->error(401);
}
if($this->userLoginFailed) $this->yellow->page->error(401);
} else {
$url = $this->yellow->text->get("webinterfaceUserAccountUrl");
$this->yellow->page->error(500, "You are not authorised on this server, [please add a user account]($url)!");
}
}
return $statusCode;

View file

@ -5,7 +5,7 @@
// Yellow main class
class Yellow
{
const Version = "0.5.7";
const Version = "0.5.8";
var $page; //current page
var $pages; //pages from file system
var $files; //files from file system
@ -1113,9 +1113,9 @@ class YellowPages
}
// Return page collection with all pages
function index($showInvisible = false, $showMultiLanguage = false, $levelMax = 0)
function index($showInvisible = false, $multiLanguage = false, $levelMax = 0)
{
$rootLocation = $showMultiLanguage ? "" : $this->getRootLocation($this->yellow->page->location);
$rootLocation = $multiLanguage ? "" : $this->getRootLocation($this->yellow->page->location);
return $this->getChildrenRecursive($rootLocation, $showInvisible, $levelMax);
}
@ -1316,7 +1316,7 @@ class YellowFiles
}
// Return page collection with all media files
function index($showInvisible = false, $showMultiPass = false, $levelMax = 0)
function index($showInvisible = false, $multiPass = false, $levelMax = 0)
{
return $this->getChildrenRecursive("", $showInvisible, $levelMax);
}