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 { ...@@ -27,8 +27,8 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
public function showAction() { public function showAction() {
$origErrorReporting = ''; $origErrorReporting = '';
$flagNOk = true; $hasError = true;
$exception = ''; $error = '';
$hasContent = false; $hasContent = false;
try { try {
...@@ -42,37 +42,37 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController { ...@@ -42,37 +42,37 @@ class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
$qfq = new \qfq\QuickFormQuery($contentObject->data); $qfq = new \qfq\QuickFormQuery($contentObject->data);
$html = $qfq->process(); $html = $qfq->process();
$hasContent = (strlen(trim($html))<=0); $hasContent = (strlen(trim($html))<=0);
$flagNOk = false; $hasError = false;
} catch (qfq\UserFormException $e) { } catch (qfq\UserFormException $e) {
$exception = $e->formatMessage(); $error = $e->formatMessage();
} catch (qfq\UserReportException $e) { } catch (qfq\UserReportException $e) {
$exception = $e->formatMessage(); $error = $e->formatMessage();
} catch (qfq\CodeException $e) { } catch (qfq\CodeException $e) {
$exception = $e->formatMessage(); $error = $e->formatMessage();
} catch (qfq\DbException $e) { } catch (qfq\DbException $e) {
$exception = $e->formatMessage(); $error = $e->formatMessage();
} catch (qfq\ShellException $e) { } catch (qfq\ShellException $e) {
$exception = $e->formatMessage(); $error = $e->formatMessage();
} catch (qfq\DownloadException $e) { } catch (qfq\DownloadException $e) {
$exception = $e->formatMessage(); $error = $e->formatMessage();
} catch (\Exception $e) { } 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. // Restore has to be outside of try/catch - E_NOTICE needs to unset for further T3 handling after an QFQ Exception.
error_reporting($origErrorReporting); error_reporting($origErrorReporting);
$this->view->assign('qfqOutput', $html); $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('qfqHasContent', $hasContent);
$this->view->assign('qfqException', $exception);
return $this->view->render(); return $this->view->render();
} }
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
</div> </div>
</f:if> </f:if>
<f:if condition="{qfqNotOkay}"> <f:if condition="{qfqHasError}">
<div class="warning warning-danger"> <div class="alert alert-warning">
<f:format.raw value="{qfqException}"/> <f:format.raw value="{qfqError}"/>
</div> </div>
</f:if> </f:if>
\ No newline at end of file
Supports Markdown
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