Fixes for bulk add results

This commit is contained in:
Matthew Barbour 2016-03-21 18:14:48 -05:00
parent cfad6087ab
commit 898bcfae94
2 changed files with 7 additions and 3 deletions

View file

@ -32,7 +32,11 @@ class BulkAdd extends Extension {
set_time_limit(0);
$bae = new BulkAddEvent($_POST['dir']);
send_event($bae);
if(strlen($bae->results) > 0) {
if(is_array($bae->results)) {
foreach($bae->results as $result) {
$this->theme->add_status("Adding files", $result);
}
} else if(strlen($bae->results) > 0) {
$this->theme->add_status("Adding files", $bae->results);
}
$this->theme->display_upload_results($page);

View file

@ -12,9 +12,9 @@ class BulkAddTheme extends Themelet {
$page->add_block(new NavBlock());
$html = "";
foreach($this->messages as $block) {
$html .= "<br/>" . html_escape($html);
$html .= "<br/>" . $block->body;
}
$page->add_block(new Block("Results", $block));
$page->add_block(new Block("Results", $html));
}
/*