Преглед изворни кода

Core update (Nibreh remix)

markseu пре 10 година
родитељ
комит
bca669843b

+ 1 - 1
README.md

@@ -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)
 

+ 1 - 1
system/core/core-webinterface.css

@@ -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; }

+ 1 - 1
system/core/core-webinterface.js

@@ -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)); },

+ 6 - 9
system/core/core-webinterface.php

@@ -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;

+ 4 - 4
system/core/core.php

@@ -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);
 	}