瀏覽代碼

Core update (fika remix)

markseu 9 年之前
父節點
當前提交
98faa872b2
共有 4 個文件被更改,包括 21 次插入6 次删除
  1. 1 1
      system/plugins/commandline.php
  2. 12 2
      system/plugins/core.php
  3. 7 2
      system/plugins/webinterface.php
  4. 1 1
      system/themes/flatsite.css

+ 1 - 1
system/plugins/commandline.php

@@ -77,7 +77,7 @@ class YellowCommandline
 				++$updates;
 			}
 		}
-		if($statusCode != 200) echo "ERROR checking updates at $url, $versionLatest[error]\n";
+		if($statusCode != 200) echo "ERROR checking updates at $url: $versionLatest[error]\n";
 		if(!$this->yellow->config->isExisting("sitename"))
 		{
 			$fileNames = $this->yellow->toolbox->getDirectoryEntries(

+ 12 - 2
system/plugins/core.php

@@ -1524,7 +1524,7 @@ class YellowPlugins
 		foreach($this->plugins as $key=>$value)
 		{
 			$this->plugins[$key]["obj"] = new $value["class"];
-			if(defined("DEBUG") && DEBUG>=3) echo "YellowPlugins::load class:$value[class] $value[version]<br/>\n";
+			if(defined("DEBUG") && DEBUG>=3) echo "YellowPlugins::load $value[class]:$value[version]<br/>\n";
 			if(method_exists($this->plugins[$key]["obj"], "onLoad")) $this->plugins[$key]["obj"]->onLoad($yellow);
 		}
 	}
@@ -1546,7 +1546,17 @@ class YellowPlugins
 		return $this->plugins[$name]["obj"];
 	}
 	
-	// Return plugins modification date, Unix time or HTTP format
+	// Return plugin version
+	function getData()
+	{
+		$version = array();
+		$version["YellowCore"] = YellowCore::Version;
+		foreach($this->plugins as $key=>$value) $version[$value["class"]] = $value[version];
+		uksort($version, strnatcasecmp);
+		return $version;
+	}
+	
+	// Return plugin modification date, Unix time or HTTP format
 	function getModified($httpFormat = false)
 	{
 		return $httpFormat ? $this->yellow->toolbox->getHttpDateFormatted($this->modified) : $this->modified;

+ 7 - 2
system/plugins/webinterface.php

@@ -90,13 +90,18 @@ class YellowWebinterface
 			{
 				$serverSoftware = $this->yellow->toolbox->getServerSoftware();
 				$output .= "Yellow ".YellowCore::Version.", PHP ".PHP_VERSION.", $serverSoftware\n";
+			} else if($text == "version") {
+				foreach($this->yellow->plugins->getData() as $key=>$value)
+				{
+					$output .= htmlspecialchars("$key: $value")."<br />\n";
+				}
 			} else {
 				foreach($this->yellow->config->getData($text) as $key=>$value)
 				{
 					$output .= htmlspecialchars(ucfirst($key).": ".$value)."<br />\n";
 				}
-				if($page->parserSafeMode) $page->error(500, "Debug '$text' is not allowed!");
 			}
+			if(!empty($text) && $page->parserSafeMode) $page->error(500, "Debug '$text' is not allowed in safe mode!");
 			$output .= "</div>\n";
 		}
 		return $output;
@@ -598,7 +603,7 @@ class YellowUsers
 				   !empty($matches[5]) && !empty($matches[6]))
 				{
 					$this->set($matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]);
-					if(defined("DEBUG") && DEBUG>=3) echo "YellowUsers::load email:$matches[1] $matches[5]<br/>\n";
+					if(defined("DEBUG") && DEBUG>=3) echo "YellowUsers::load email:$matches[1]<br/>\n";
 				}
 			}
 		}

+ 1 - 1
system/themes/flatsite.css

@@ -1,4 +1,4 @@
-/* Flatsite theme 0.5.7 */
+/* Flatsite theme 0.6.1 */
 /* Designer: Mark Mayberg */
 
 @import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,700);