add status messages during bulk_add

git-svn-id: file:///home/shish/svn/shimmie2/trunk@238 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-07-06 17:21:17 +00:00
parent 660ca7f8aa
commit fa49bf13f3
2 changed files with 7 additions and 2 deletions

View file

@ -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);
}
}

View file

@ -1,10 +1,15 @@
<?php
class BulkAddTheme extends Themelet {
var $messages = array();
public function display_upload_results($page) {
$page->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);
}
}
?>