1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 17:54:44 +02:00
This commit is contained in:
Ryan Cramer
2024-12-13 10:20:32 -05:00
parent 68fa2b47f6
commit 9bc02399e5

View File

@@ -403,18 +403,16 @@ class ProcessPageEdit extends Process implements WirePageEditor, ConfigurableMod
if(in_array($this->input->urlSegment1, array('navJSON', 'bookmarks'))) return; if(in_array($this->input->urlSegment1, array('navJSON', 'bookmarks'))) return;
$getID = $this->input->get('id'); $getID = (int) $this->input->get('id');
if($getID === 'bookmark') {
$this->session->redirect('./bookmarks/');
return;
}
$getID = (int) $getID;
$postID = (int) $this->input->post('id'); $postID = (int) $this->input->post('id');
$id = abs($postID ? $postID : $getID); $id = abs($postID ? $postID : $getID);
if(!$id) { if(!$id || $this->input->get('id') === 'bookmark' || $this->input->urlSegment2 === 'bookmarks') {
$this->session->location('./bookmarks/'); // Init error: no page provided
throw new Wire404Exception($this->noticeUnknown, Wire404Exception::codeSecondary); // Init error: no page provided if($this->wire()->process === $this) {
$this->session->location($this->wire()->page->url . 'bookmarks/');
}
throw new Wire404Exception($this->noticeUnknown, Wire404Exception::codeSecondary);
} }
$this->page = $this->loadPage($id); $this->page = $this->loadPage($id);