Commit eea6b786 authored by bbaer's avatar bbaer
Browse files

Code Conventions Not Enabled = true

parent 44205040
Pipeline #1480 passed with stage
in 2 minutes and 11 seconds
......@@ -27,8 +27,8 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
public function showAction() {
$origErrorReporting = '';
$flagNOk = true;
$exception = '';
$hasError = true;
$error = '';
$hasContent = false;
try {
......@@ -42,37 +42,37 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
$qfq = new \qfq\QuickFormQuery($contentObject->data);
$html = $qfq->process();
$hasContent = (strlen(trim($html))<=0);
$flagNOk = false;
$hasError = false;
} catch (qfq\UserFormException $e) {
$exception = $e->formatMessage();
$error = $e->formatMessage();
} catch (qfq\UserReportException $e) {
$exception = $e->formatMessage();
$error = $e->formatMessage();
} catch (qfq\CodeException $e) {
$exception = $e->formatMessage();
$error = $e->formatMessage();
} catch (qfq\DbException $e) {
$exception = $e->formatMessage();
$error = $e->formatMessage();
} catch (qfq\ShellException $e) {
$exception = $e->formatMessage();
$error = $e->formatMessage();
} catch (qfq\DownloadException $e) {
$exception = $e->formatMessage();
$error = $e->formatMessage();
} catch (\Exception $e) {
$exception = "Generic Exception: " . $e->getMessage();
$error = "Generic Exception: " . $e->getMessage();
}
// Restore has to be outside of try/catch - E_NOTICE needs to unset for further T3 handling after an QFQ Exception.
error_reporting($origErrorReporting);
$this->view->assign('qfqOutput', $html);
$this->view->assign('qfqNotOkay', $flagNOk);
$this->view->assign('qfqError', $error);
$this->view->assign('qfqHasError', $hasError);
$this->view->assign('qfqHasContent', $hasContent);
$this->view->assign('qfqException', $exception);
return $this->view->render();
}
......
......@@ -7,8 +7,8 @@
</div>
</f:if>
<f:if condition="{qfqNotOkay}">
<div class="warning warning-danger">
<f:format.raw value="{qfqException}"/>
<f:if condition="{qfqHasError}">
<div class="alert alert-warning">
<f:format.raw value="{qfqError}"/>
</div>
</f:if>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment