Parcourir la source

Updated core, changed error for missing page

markseu il y a 7 ans
Parent
commit
ab7626afd2

+ 0 - 4
system/config/page-error-424.txt

@@ -1,4 +0,0 @@
----
-Title: File not found
----
-You can [create this page](javascript:yellow.action('edit');).

+ 4 - 0
system/config/page-error-434.txt

@@ -0,0 +1,4 @@
+---
+Title: File not found
+---
+The requested file was not found. [You can create this page](javascript:yellow.action('edit');).

+ 1 - 1
system/plugins/core.php

@@ -2881,8 +2881,8 @@ class YellowToolbox
 			case 400:	$text = "Bad request"; break;
 			case 403:	$text = "Forbidden"; break;
 			case 404:	$text = "Not found"; break;
-			case 424:	$text = "Not existing"; break;
 			case 430:	$text = "Login failed"; break;
+			case 434:	$text = "Not existing"; break;
 			case 500:	$text = "Server error"; break;
 			case 503:	$text = "Service unavailable"; break;
 			default:	$text = "Error $statusCode";

+ 1 - 1
system/plugins/edit.js

@@ -496,7 +496,7 @@ yellow.edit =
 				case "edit":	action = document.getElementById("yellow-pane-edit-page").value ? "edit" : "delete"; break;
 				case "delete":	action = "delete"; break;
 			}
-			if(yellow.page.statusCode==424 && paneAction!="delete") action = "create";
+			if(yellow.page.statusCode==434 && paneAction!="delete") action = "create";
 			if(yellow.config.userRestrictions) action = "";
 		}
 		return action;

+ 2 - 2
system/plugins/edit.php

@@ -65,7 +65,7 @@ class YellowEdit
 			{
 				if(empty($this->response->rawDataSource)) $this->response->rawDataSource = $page->rawData;
 				if(empty($this->response->rawDataEdit)) $this->response->rawDataEdit = $page->rawData;
-				if($page->statusCode==424) $this->response->rawDataEdit = $this->response->getRawDataNew($page->location);
+				if($page->statusCode==434) $this->response->rawDataEdit = $this->response->getRawDataNew($page->location);
 			}
 			if(empty($this->response->language)) $this->response->language = $page->get("language");
 			if(empty($this->response->action)) $this->response->action = $this->response->isUser() ? "none" : "login";
@@ -237,7 +237,7 @@ class YellowEdit
 				$location = $this->yellow->lookup->normaliseUrl($scheme, $address, $base, $location);
 				$statusCode = $this->yellow->sendStatus(301, $location);
 			} else {
-				$this->yellow->page->error($this->response->isUserRestrictions() ? 404 : 424);
+				$this->yellow->page->error($this->response->isUserRestrictions() ? 404 : 434);
 				$statusCode = $this->yellow->processRequest($scheme, $address, $base, $location, $fileName, false);
 			}
 		}