diff --git a/ext/bulk_add/main.php b/ext/bulk_add/main.php index afff4aae..1a077481 100644 --- a/ext/bulk_add/main.php +++ b/ext/bulk_add/main.php @@ -11,8 +11,8 @@ class BulkAdd extends Extension { if($user->is_admin() && isset($_POST['dir'])) { set_time_limit(0); - $this->theme->display_upload_results($event->page_object); $this->add_dir($_POST['dir']); + $this->theme->display_upload_results($event->page_object); } } diff --git a/ext/bulk_add/theme.php b/ext/bulk_add/theme.php index a140558f..2081f416 100644 --- a/ext/bulk_add/theme.php +++ b/ext/bulk_add/theme.php @@ -1,10 +1,15 @@ set_title("Adding folder"); $page->set_heading("Adding folder"); $page->add_block(new NavBlock()); + foreach($this->messages as $block) { + $page->add_block($block); + } } public function display_admin_block($page) { @@ -23,7 +28,7 @@ class BulkAddTheme extends Themelet { } public function add_status($title, $body) { - $page->add_block(new Block($title, $body)); + $this->messages[] = new Block($title, $body); } } ?>