allow adding URLs to get-page

This commit is contained in:
Shish 2019-12-07 22:55:40 +00:00
parent 7f041a9f93
commit 151109ca0e

View file

@ -72,13 +72,18 @@ class AdminPage extends Extension
}
if ($event->cmd == "get-page") {
global $page;
if(isset($event->args[1])) {
parse_str($event->args[1], $_GET);
}
send_event(new PageRequestEvent($event->args[0]));
$page->display();
}
if ($event->cmd == "post-page") {
global $page;
$_SERVER['REQUEST_METHOD'] = "POST";
parse_str($event->args[1], $_POST);
if(isset($event->args[1])) {
parse_str($event->args[1], $_POST);
}
send_event(new PageRequestEvent($event->args[0]));
$page->display();
}