commit 2bee745a540430dea4bee8c317a0dfc0e6b83df5
parent f56a59c8c10d7f20ff98f9d18b9e52d7d315e66e
Author: markseu <mark2011@mayberg.se>
Date: Tue, 4 Aug 2015 10:28:42 +0200
Core update (blåbär remix)
Diffstat:
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
@@ -1,4 +1,4 @@
-Yellow 0.5.27
+Yellow 0.5.28
=============
[](http://datenstrom.se/yellow)
diff --git a/system/core/core-webinterface.php b/system/core/core-webinterface.php
@@ -5,7 +5,7 @@
// Web interface core plugin
class YellowWebinterface
{
- const Version = "0.5.20";
+ const Version = "0.5.21";
var $yellow; //access to API
var $active; //web interface is active? (boolean)
var $userLoginFailed; //web interface login failed? (boolean)
@@ -87,7 +87,8 @@ class YellowWebinterface
$output = "<div class=\"".htmlspecialchars($name)."\">\n";
if(empty($text))
{
- $output .= "Yellow ".Yellow::Version.", PHP ".PHP_VERSION.", ".$this->yellow->toolbox->getServerSoftware().", ".PHP_OS."\n";
+ $serverSoftware = $this->yellow->toolbox->getServerSoftware();
+ $output .= "Yellow ".Yellow::Version.", PHP ".PHP_VERSION.", $serverSoftware\n";
} else {
foreach($this->yellow->config->getData($text) as $key=>$value) $output .= htmlspecialchars("$key = $value")."<br />\n";
if($page->parserSafeMode) $page->error(500, "Debug '$text' is not allowed!");
diff --git a/system/core/core.php b/system/core/core.php
@@ -5,7 +5,7 @@
// Yellow main class
class Yellow
{
- const Version = "0.5.27";
+ const Version = "0.5.28";
var $page; //current page
var $pages; //pages from file system
var $files; //files from file system
@@ -65,9 +65,7 @@ class Yellow
$this->config->setDefault("parser", "markdown");
$this->config->setDefault("parserSafeMode", "0");
$this->config->setDefault("multiLanguageMode", "0");
- $this->config->load($this->config->get("configDir").$this->config->get("configFile"));
- $this->text->load($this->config->get("configDir").$this->config->get("textFile"));
- $this->updateConfig();
+ $this->load();
}
// Handle request
@@ -317,13 +315,20 @@ class Yellow
return $ok;
}
- // Update configuration
- function updateConfig()
+ // Load configuration and text strings
+ function load()
{
+ if(defined("DEBUG") && DEBUG>=3)
+ {
+ $serverSoftware = $this->toolbox->getServerSoftware();
+ echo "Yellow ".Yellow::Version.", PHP ".PHP_VERSION.", $serverSoftware<br>\n";
+ }
+ date_default_timezone_set($this->config->get("timeZone"));
+ $this->config->load($this->config->get("configDir").$this->config->get("configFile"));
+ $this->text->load($this->config->get("configDir").$this->config->get("textFile"));
list($pathRoot, $pathHome) = $this->lookup->getContentInformation();
$this->config->set("contentRootDir", $pathRoot);
$this->config->set("contentHomeDir", $pathHome);
- date_default_timezone_set($this->config->get("timeZone"));
}
// Execute command
@@ -2210,7 +2215,7 @@ class YellowToolbox
{
$serverSoftware = PHP_SAPI;
if(preg_match("/^(\S+)/", $_SERVER["SERVER_SOFTWARE"], $matches)) $serverSoftware = $matches[1];
- return $serverSoftware;
+ return $serverSoftware." ".PHP_OS;
}
// Return server scheme from current HTTP request