[TASK] Impexp Don't display error messages using DebugUtility::viewArray() 22/46022/4
authorReinhard Führicht <rf@typoheads.at>
Sat, 16 Jan 2016 17:19:03 +0000 (18:19 +0100)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Sun, 17 Jan 2016 09:48:26 +0000 (10:48 +0100)
Change impexp to just pass an array with the error messages
to the Fluid templates and take care of the output there.

Resolves: #72774
Releases: master
Change-Id: If5b995f998de4b5f2b69c3edd0b7c963bf8ac7fa
Reviewed-on: https://review.typo3.org/46022
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/impexp/Resources/Private/Templates/ImportExport/Export.html
typo3/sysext/impexp/Resources/Private/Templates/ImportExport/Import.html

index 7083a35..df846ca 100644 (file)
@@ -536,9 +536,7 @@ class ImportExportController extends BaseScriptClass
 
         $this->makeAdvancedOptionsForm($inData);
 
-        // Print errors that might be:
-        $errors = $this->export->printErrorLog();
-        $this->standaloneView->assign('errors', trim($errors));
+        $this->standaloneView->assign('errors', $this->export->errorLog);
 
         // Generate overview:
         $this->standaloneView->assign('contentOverview', $this->export->displayContentOverview());
@@ -859,9 +857,8 @@ class ImportExportController extends BaseScriptClass
                     }
                 }
             }
-            // Print errors that might be:
-            $errors = $import->printErrorLog();
-            $this->standaloneView->assign('errors', trim($errors));
+
+            $this->standaloneView->assign('errors', $import->errorLog);
         }
     }
 
index 1fdea61..bee1301 100644 (file)
@@ -19,7 +19,7 @@
                                <f:translate key="exportdata_advancedOptions" />
                        </a>
                </li>
-               <f:if condition="{errors}">
+               <f:if condition="{errors -> f:count()} > 0">
                        <li role="presentation">
                                <a class="text-capitalize" href="#export-errors" aria-controls="export-errors" role="tab" data-toggle="tab">
                                        <f:translate key="exportdata_messages" />
                                </div>
                        </div>
                </div>
-               <f:if condition="{errors}">
+               <f:if condition="{errors -> f:count()} > 0">
                        <div role="tabpanel" class="tab-pane" id="export-errors">
                                <div class="panel panel-tab">
                                        <div class="panel-body">
-                                               <f:format.raw>{errors}</f:format.raw>
+                                               <div class="callout callout-danger">
+                                                       <f:for each="{errors}" as="error">
+                                                               <p>{error}</p>
+                                                       </f:for>
+                                               </div>
                                        </div>
                                </div>
                        </div>
index b374c71..d42650b 100644 (file)
@@ -43,7 +43,7 @@
                                </a>
                        </li>
                </f:if>
-               <f:if condition="{errors}">
+               <f:if condition="{errors -> f:count()} > 0">
                        <li role="presentation">
                                <a class="text-capitalize" href="#import-errors" aria-controls="import-errors" role="tab" data-toggle="tab">
                                        <f:translate key="importdata_messages" />
                                </div>
                        </div>
                </f:if>
-               <f:if condition="{errors}">
+               <f:if condition="{errors -> f:count()} > 0">
                        <div role="tabpanel" class="tab-pane" id="import-errors">
                                <div class="panel panel-tab">
                                        <div class="panel-body">
-                                               <f:format.raw>{errors}</f:format.raw>
+                                               <div class="callout callout-danger">
+                                                       <f:for each="{errors}" as="error">
+                                                               <p>{error}</p>
+                                                       </f:for>
+                                               </div>
                                        </div>
                                </div>
                        </div>