mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit ab7626afd297b73fbf63bfbc10fcef5e2410ad68
parent 328d116f709d3614bb1ad1aa1d1bbecb347944e7
Author: markseu <mark2011@mayberg.se>
Date:   Mon,  5 Mar 2018 11:42:44 +0100

Updated core, changed error for missing page

Diffstat:
Dsystem/config/page-error-424.txt | 5-----
Asystem/config/page-error-434.txt | 5+++++
Msystem/plugins/core.php | 2+-
Msystem/plugins/edit.js | 2+-
Msystem/plugins/edit.php | 4++--
5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/system/config/page-error-424.txt b/system/config/page-error-424.txt @@ -1,4 +0,0 @@ ---- -Title: File not found ---- -You can [create this page](javascript:yellow.action('edit');). -\ No newline at end of file diff --git a/system/config/page-error-434.txt b/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');). +\ No newline at end of file diff --git a/system/plugins/core.php b/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"; diff --git a/system/plugins/edit.js b/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; diff --git a/system/plugins/edit.php b/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); } }