瀏覽代碼

Core update (blåbär remix)

markseu 10 年之前
父節點
當前提交
2bee745a54
共有 3 個文件被更改,包括 17 次插入11 次删除
  1. 1 1
      README.md
  2. 3 2
      system/core/core-webinterface.php
  3. 13 8
      system/core/core.php

+ 1 - 1
README.md

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

+ 3 - 2
system/core/core-webinterface.php

@@ -5,7 +5,7 @@
 // Web interface core plugin
 // Web interface core plugin
 class YellowWebinterface
 class YellowWebinterface
 {
 {
-	const Version = "0.5.20";
+	const Version = "0.5.21";
 	var $yellow;				//access to API
 	var $yellow;				//access to API
 	var $active;				//web interface is active? (boolean)
 	var $active;				//web interface is active? (boolean)
 	var $userLoginFailed;		//web interface login failed? (boolean)
 	var $userLoginFailed;		//web interface login failed? (boolean)
@@ -87,7 +87,8 @@ class YellowWebinterface
 			$output = "<div class=\"".htmlspecialchars($name)."\">\n";
 			$output = "<div class=\"".htmlspecialchars($name)."\">\n";
 			if(empty($text))
 			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 {
 			} else {
 				foreach($this->yellow->config->getData($text) as $key=>$value) $output .= htmlspecialchars("$key = $value")."<br />\n";
 				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!");
 				if($page->parserSafeMode) $page->error(500, "Debug '$text' is not allowed!");

+ 13 - 8
system/core/core.php

@@ -5,7 +5,7 @@
 // Yellow main class
 // Yellow main class
 class Yellow
 class Yellow
 {
 {
-	const Version = "0.5.27";
+	const Version = "0.5.28";
 	var $page;				//current page
 	var $page;				//current page
 	var $pages;				//pages from file system
 	var $pages;				//pages from file system
 	var $files;				//files from file system
 	var $files;				//files from file system
@@ -65,9 +65,7 @@ class Yellow
 		$this->config->setDefault("parser", "markdown");
 		$this->config->setDefault("parser", "markdown");
 		$this->config->setDefault("parserSafeMode", "0");
 		$this->config->setDefault("parserSafeMode", "0");
 		$this->config->setDefault("multiLanguageMode", "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
 	// Handle request
@@ -317,13 +315,20 @@ class Yellow
 		return $ok;
 		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();
 		list($pathRoot, $pathHome) = $this->lookup->getContentInformation();
 		$this->config->set("contentRootDir", $pathRoot);
 		$this->config->set("contentRootDir", $pathRoot);
 		$this->config->set("contentHomeDir", $pathHome);
 		$this->config->set("contentHomeDir", $pathHome);
-		date_default_timezone_set($this->config->get("timeZone"));
 	}
 	}
 	
 	
 	// Execute command
 	// Execute command
@@ -2210,7 +2215,7 @@ class YellowToolbox
 	{
 	{
 		$serverSoftware = PHP_SAPI;
 		$serverSoftware = PHP_SAPI;
 		if(preg_match("/^(\S+)/", $_SERVER["SERVER_SOFTWARE"], $matches)) $serverSoftware = $matches[1];
 		if(preg_match("/^(\S+)/", $_SERVER["SERVER_SOFTWARE"], $matches)) $serverSoftware = $matches[1];
-		return $serverSoftware;
+		return $serverSoftware." ".PHP_OS;
 	}
 	}
 	
 	
 	// Return server scheme from current HTTP request
 	// Return server scheme from current HTTP request