Updated core, changed error for missing page

This commit is contained in:
markseu 2018-03-05 11:42:44 +01:00
parent 328d116f70
commit ab7626afd2
5 changed files with 8 additions and 8 deletions

View file

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

View file

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

View file

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

View file

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

View file

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