From 351c3469dcc63cbe72ef9ea7b639454ed8dc35d3 Mon Sep 17 00:00:00 2001 From: Shish Moom Date: Wed, 1 Jul 2009 16:45:06 -0700 Subject: [PATCH] regen_thumb still had event->page, and version bump --- contrib/regen_thumb/main.php | 8 +++----- index.php | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/contrib/regen_thumb/main.php b/contrib/regen_thumb/main.php index e3241194..99e19a69 100644 --- a/contrib/regen_thumb/main.php +++ b/contrib/regen_thumb/main.php @@ -16,21 +16,19 @@ class RegenThumb implements Extension { var $theme; public function receive_event(Event $event) { + global $config, $database, $page, $user; if(is_null($this->theme)) $this->theme = get_theme_object($this); if(($event instanceof PageRequestEvent) && $event->page_matches("regen_thumb")) { - global $user; if($user->is_admin() && isset($_POST['image_id'])) { - global $config; - global $database; $image = Image::by_id(int_escape($_POST['image_id'])); send_event(new ThumbnailGenerationEvent($image->hash, $image->ext)); - $this->theme->display_results($event->page, $image); + $this->theme->display_results($page, $image); } } if($event instanceof ImageAdminBlockBuildingEvent) { - if($event->user->is_admin()) { + if($user->is_admin()) { $event->add_part($this->theme->get_buttons_html($event->image->id)); } } diff --git a/index.php b/index.php index 646e48be..3cbb3ed6 100644 --- a/index.php +++ b/index.php @@ -2,7 +2,7 @@ // set up and purify the environment define("DEBUG", true); define("SCORE_VERSION", 's2hack'); -define("VERSION", 'trunk'); +define("VERSION", '2.3-beta4'); if(!file_exists("config.php")) { header("Location: install.php");