From 898bcfae94c06e2f6c3872fd88e5a621609de676 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Mon, 21 Mar 2016 18:14:48 -0500 Subject: [PATCH] Fixes for bulk add results --- ext/bulk_add/main.php | 6 +++++- ext/bulk_add/theme.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ext/bulk_add/main.php b/ext/bulk_add/main.php index bb0d73b7..fa532526 100644 --- a/ext/bulk_add/main.php +++ b/ext/bulk_add/main.php @@ -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); diff --git a/ext/bulk_add/theme.php b/ext/bulk_add/theme.php index 02a31d13..99ed1754 100644 --- a/ext/bulk_add/theme.php +++ b/ext/bulk_add/theme.php @@ -12,9 +12,9 @@ class BulkAddTheme extends Themelet { $page->add_block(new NavBlock()); $html = ""; foreach($this->messages as $block) { - $html .= "
" . html_escape($html); + $html .= "
" . $block->body; } - $page->add_block(new Block("Results", $block)); + $page->add_block(new Block("Results", $html)); } /*