make non-nice images work
This commit is contained in:
parent
17c85ba549
commit
ab128b4b24
@ -150,18 +150,14 @@ class ImageIO extends Extension {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onPageRequest(PageRequestEvent $event) {
|
public function onPageRequest(PageRequestEvent $event) {
|
||||||
$num = $event->get_arg(0);
|
|
||||||
$matches = array();
|
|
||||||
if(!is_null($num) && preg_match("/(\d+)/", $num, $matches)) {
|
|
||||||
$num = $matches[1];
|
|
||||||
|
|
||||||
if($event->page_matches("image")) {
|
if($event->page_matches("image")) {
|
||||||
|
$num = int_escape($event->get_arg(0));
|
||||||
$this->send_file($num, "image");
|
$this->send_file($num, "image");
|
||||||
}
|
}
|
||||||
else if($event->page_matches("thumb")) {
|
if($event->page_matches("thumb")) {
|
||||||
|
$num = int_escape($event->get_arg(0));
|
||||||
$this->send_file($num, "thumb");
|
$this->send_file($num, "thumb");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if($event->page_matches("image_admin/delete")) {
|
if($event->page_matches("image_admin/delete")) {
|
||||||
global $page, $user;
|
global $page, $user;
|
||||||
if($user->can("delete_image") && isset($_POST['image_id']) && $user->check_auth_token()) {
|
if($user->can("delete_image") && isset($_POST['image_id']) && $user->check_auth_token()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user