Commit fe2b8f89 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Reformatted all PHP files

parent 78b46d22
...@@ -25,14 +25,13 @@ require_once(__DIR__ . '/../qfq/QuickFormQuery.php'); ...@@ -25,14 +25,13 @@ require_once(__DIR__ . '/../qfq/QuickFormQuery.php');
* field-name: <field name> * field-name: <field name>
* field-message: <message> * field-message: <message>
* form-data: [ fieldname1 => value1, fieldname2 => value2, ... ] * form-data: [ fieldname1 => value1, fieldname2 => value2, ... ]
* form-control: [ fieldname1 => status1, fieldname2 => status2, ... ] status: show|hide, enabled|disabled, readonly|readwrite * form-control: [ fieldname1 => status1, fieldname2 => status2, ... ] status: show|hide, enabled|disabled,
* readonly|readwrite
* *
* Description: * Description:
* *
* Save successfull. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message if no redirect. * Save successfull. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message
* status = 'success' * if no redirect. status = 'success' message = <message> redirect = 'client'
* message = <message>
* redirect = 'client'
* *
* Save successfull. Button 'close': Form.forward: 'page'. Client redirect to url. * Save successfull. Button 'close': Form.forward: 'page'. Client redirect to url.
* status = 'success' * status = 'success'
...@@ -40,13 +39,9 @@ require_once(__DIR__ . '/../qfq/QuickFormQuery.php'); ...@@ -40,13 +39,9 @@ require_once(__DIR__ . '/../qfq/QuickFormQuery.php');
* redirect = 'url' * redirect = 'url'
* redirect-url = <URL> * redirect-url = <URL>
* *
* Save failed: Button: any. Show message and set 'alert' on _optional_ specified form element. Bring 'pill' of specified form element to front. * Save failed: Button: any. Show message and set 'alert' on _optional_ specified form element. Bring 'pill' of
* status = 'error' * specified form element to front. status = 'error' message = <message> redirect = 'no' Optional: field-name = <field
* message = <message> * name> field-message = <message appearing as tooltip (or similar) near the form element>
* redirect = 'no'
* Optional:
* field-name = <field name>
* field-message = <message appearing as tooltip (or similar) near the form element>
*/ */
$answer = array(); $answer = array();
......
...@@ -28,14 +28,13 @@ require_once(__DIR__ . '/../qfq/exceptions/DbException.php'); ...@@ -28,14 +28,13 @@ require_once(__DIR__ . '/../qfq/exceptions/DbException.php');
* field-name: <field name> * field-name: <field name>
* field-message: <message> * field-message: <message>
* form-data: [ fieldname1 => value1, fieldname2 => value2, ... ] * form-data: [ fieldname1 => value1, fieldname2 => value2, ... ]
* form-control: [ fieldname1 => status1, fieldname2 => status2, ... ] status: show|hide, enabled|disabled, readonly|readwrite * form-control: [ fieldname1 => status1, fieldname2 => status2, ... ] status: show|hide, enabled|disabled,
* readonly|readwrite
* *
* Description: * Description:
* *
* Save successfull. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message if no redirect. * Save successfull. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message
* status = 'success' * if no redirect. status = 'success' message = <message> redirect = 'client'
* message = <message>
* redirect = 'client'
* *
* Save successfull. Button 'close': Form.forward: 'page'. Client redirect to url. * Save successfull. Button 'close': Form.forward: 'page'. Client redirect to url.
* status = 'success' * status = 'success'
...@@ -43,13 +42,9 @@ require_once(__DIR__ . '/../qfq/exceptions/DbException.php'); ...@@ -43,13 +42,9 @@ require_once(__DIR__ . '/../qfq/exceptions/DbException.php');
* redirect = 'url' * redirect = 'url'
* redirect-url = <URL> * redirect-url = <URL>
* *
* Save failed: Button: any. Show message and set 'alert' on _optional_ specified form element. Bring 'pill' of specified form element to front. * Save failed: Button: any. Show message and set 'alert' on _optional_ specified form element. Bring 'pill' of
* status = 'error' * specified form element to front. status = 'error' message = <message> redirect = 'no' Optional: field-name = <field
* message = <message> * name> field-message = <message appearing as tooltip (or similar) near the form element>
* redirect = 'no'
* Optional:
* field-name = <field name>
* field-message = <message appearing as tooltip (or similar) near the form element>
*/ */
$answer = array(); $answer = array();
......
...@@ -56,6 +56,7 @@ class AutoCron { ...@@ -56,6 +56,7 @@ class AutoCron {
* Check if there started cronJobs, older than $ageMaxMinutes * Check if there started cronJobs, older than $ageMaxMinutes
* *
* @param int $ageMaxMinutes * @param int $ageMaxMinutes
*
* @throws CodeException * @throws CodeException
* @throws DbException * @throws DbException
*/ */
...@@ -66,6 +67,7 @@ class AutoCron { ...@@ -66,6 +67,7 @@ class AutoCron {
/** /**
* @param array $job * @param array $job
*
* @return array * @return array
* @throws CodeException * @throws CodeException
* @throws DbException * @throws DbException
...@@ -80,6 +82,7 @@ class AutoCron { ...@@ -80,6 +82,7 @@ class AutoCron {
// With no frequency: stop future repeating by setting nextRun=0 // With no frequency: stop future repeating by setting nextRun=0
if ($job[AUTOCRON_FREQUENCY] == '') { if ($job[AUTOCRON_FREQUENCY] == '') {
$job[AUTOCRON_NEXT_RUN] = 0; $job[AUTOCRON_NEXT_RUN] = 0;
return $job; return $job;
} }
...@@ -106,6 +109,7 @@ class AutoCron { ...@@ -106,6 +109,7 @@ class AutoCron {
* Calls the Webpage given in $job[AUTOCRON_CONTENT]. * Calls the Webpage given in $job[AUTOCRON_CONTENT].
* *
* @param array $job * @param array $job
*
* @return array $job, updated with AUTOCRON_LAST_STATUS * @return array $job, updated with AUTOCRON_LAST_STATUS
*/ */
private function doJobWebsite(array $job) { private function doJobWebsite(array $job) {
...@@ -133,6 +137,7 @@ class AutoCron { ...@@ -133,6 +137,7 @@ class AutoCron {
/** /**
* @param array $mailEntry * @param array $mailEntry
*
* @return array * @return array
*/ */
private function mailEntryFill(array $mailEntry) { private function mailEntryFill(array $mailEntry) {
...@@ -142,6 +147,7 @@ class AutoCron { ...@@ -142,6 +147,7 @@ class AutoCron {
$mailEntry[$key] = ''; $mailEntry[$key] = '';
} }
} }
return $mailEntry; return $mailEntry;
} }
...@@ -150,6 +156,7 @@ class AutoCron { ...@@ -150,6 +156,7 @@ class AutoCron {
* Do not send mails if: no record OR no receiver OR empty body * Do not send mails if: no record OR no receiver OR empty body
* *
* @param array $job * @param array $job
*
* @return array $job, updated with AUTOCRON_LAST_STATUS * @return array $job, updated with AUTOCRON_LAST_STATUS
*/ */
private function doJobMail(array $job) { private function doJobMail(array $job) {
......
...@@ -17,6 +17,7 @@ class BodytextParser { ...@@ -17,6 +17,7 @@ class BodytextParser {
/** /**
* @param $bodytext * @param $bodytext
*
* @return mixed|string * @return mixed|string
* @throws UserFormException * @throws UserFormException
*/ */
...@@ -39,13 +40,16 @@ class BodytextParser { ...@@ -39,13 +40,16 @@ class BodytextParser {
if (strpos($bodytext, NESTING_TOKEN_OPEN) !== false) { if (strpos($bodytext, NESTING_TOKEN_OPEN) !== false) {
throw new \qfq\UserFormException("Missing close delimiter: $bodytext", ERROR_MISSING_CLOSE_DELIMITER); throw new \qfq\UserFormException("Missing close delimiter: $bodytext", ERROR_MISSING_CLOSE_DELIMITER);
} }
return $bodytext; return $bodytext;
} }
/** /**
* Trim all lines, remove all empty lines and all lines which start with '#' * Trim all lines, remove all empty lines and all lines which start with '#'
*
* @param $bodytext * @param $bodytext
*
* @return string * @return string
*/ */
...@@ -97,6 +101,7 @@ class BodytextParser { ...@@ -97,6 +101,7 @@ class BodytextParser {
if ($firstLine === false || $firstLine === '' || $firstLine[0] !== '#') { if ($firstLine === false || $firstLine === '' || $firstLine[0] !== '#') {
$nestingOpen = '{'; $nestingOpen = '{';
$nestingClose = '}'; $nestingClose = '}';
return; return;
} }
...@@ -146,6 +151,7 @@ class BodytextParser { ...@@ -146,6 +151,7 @@ class BodytextParser {
* g,h: ^(\d+\.)*(sql|head)\s*= * g,h: ^(\d+\.)*(sql|head)\s*=
* *
* @param array $bodytextArray * @param array $bodytextArray
*
* @return string * @return string
*/ */
private function joinLine($bodytext, $nestingOpen, $nestingClose) { private function joinLine($bodytext, $nestingOpen, $nestingClose) {
...@@ -198,6 +204,7 @@ class BodytextParser { ...@@ -198,6 +204,7 @@ class BodytextParser {
* Valid close (complete line): } * Valid close (complete line): }
* *
* @param $bodytext * @param $bodytext
*
* @return mixed * @return mixed
*/ */
private function encryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose) { private function encryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose) {
...@@ -231,6 +238,7 @@ class BodytextParser { ...@@ -231,6 +238,7 @@ class BodytextParser {
* 10.20.30.sql = DELETE * 10.20.30.sql = DELETE
* *
* @param $bodytext * @param $bodytext
*
* @return mixed|string * @return mixed|string
* @throws UserFormException * @throws UserFormException
*/ */
...@@ -297,6 +305,7 @@ class BodytextParser { ...@@ -297,6 +305,7 @@ class BodytextParser {
* Decrypt complex token by '{\n' and '}\n' * Decrypt complex token by '{\n' and '}\n'
* *
* @param $bodytext * @param $bodytext
*
* @return mixed * @return mixed
*/ */
private function decryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose) { private function decryptNestingDelimeter($bodytext, $nestingOpen, $nestingClose) {
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
namespace qfq; namespace qfq;
use qfq; use qfq;
use qfq\UserFormException;
require_once(__DIR__ . '/../qfq/Constants.php'); require_once(__DIR__ . '/../qfq/Constants.php');
require_once(__DIR__ . '/../qfq/helper/OnArray.php'); require_once(__DIR__ . '/../qfq/helper/OnArray.php');
...@@ -72,6 +71,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -72,6 +71,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
/** /**
* @param string $addClass * @param string $addClass
*
* @return string * @return string
*/ */
public function getRowOpenTag($addClass = '') { public function getRowOpenTag($addClass = '') {
...@@ -116,7 +116,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -116,7 +116,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
public function head() { public function head() {
$html = ''; $html = '';
$html .= '<div ' . Support::doAttribute('class', $this->formSpec[F_CLASS], TRUE) . '>'; // main <div class=...> around everything, Whole FORM; class="container" or class="container-fluid" $html .= '<div ' . Support::doAttribute('class', $this->formSpec[F_CLASS], true) . '>'; // main <div class=...> around everything, Whole FORM; class="container" or class="container-fluid"
//TODO: nicer error reporting - make test with 'unknown index' here - unset($this->formSpec['title']) - See #3424 //TODO: nicer error reporting - make test with 'unknown index' here - unset($this->formSpec['title']) - See #3424
$title = Support::wrapTag('<div class="hidden-xs col-sm-6 col-md-8">', Support::wrapTag('<h3>', $this->formSpec['title'])); $title = Support::wrapTag('<div class="hidden-xs col-sm-6 col-md-8">', Support::wrapTag('<h3>', $this->formSpec['title']));
...@@ -170,7 +170,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -170,7 +170,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$queryStringArray = [ $queryStringArray = [
'id' => $this->store->getVar(SYSTEM_EDIT_FORM_PAGE, STORE_SYSTEM), 'id' => $this->store->getVar(SYSTEM_EDIT_FORM_PAGE, STORE_SYSTEM),
'form' => 'copyForm', 'form' => 'copyForm',
'r' => 0, 'r' => 0,
'idSrc' => $formId, 'idSrc' => $formId,
]; ];
$queryString = Support::arrayToQueryString($queryStringArray); $queryString = Support::arrayToQueryString($queryStringArray);
...@@ -216,7 +216,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -216,7 +216,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
$queryStringArray = [ $queryStringArray = [
'id' => $this->store->getVar(SYSTEM_EDIT_FORM_PAGE, STORE_SYSTEM), 'id' => $this->store->getVar(SYSTEM_EDIT_FORM_PAGE, STORE_SYSTEM),
'form' => $form, 'form' => $form,
'r' => 0 'r' => 0,
]; ];
$queryString = Support::arrayToQueryString($queryStringArray); $queryString = Support::arrayToQueryString($queryStringArray);
$sip = $this->store->getSipInstance(); $sip = $this->store->getSipInstance();
...@@ -318,6 +318,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -318,6 +318,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $icon * @param string $icon
* @param string $disabled * @param string $disabled
* @param string $class * @param string $class
*
* @return string * @return string
*/ */
private function buildButtonAnchor($url, $buttonHtmlId, $text, $toolTip, $icon, $disabled = '', $class = '') { private function buildButtonAnchor($url, $buttonHtmlId, $text, $toolTip, $icon, $disabled = '', $class = '') {
...@@ -344,6 +345,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -344,6 +345,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* @param string $tooltip * @param string $tooltip
* @param string $icon * @param string $icon
* @param string $disabled * @param string $disabled
*
* @return string * @return string
*/ */
private function buildButtonCode($buttonHtmlId, $text, $tooltip, $icon, $disabled = '', $buttonOnChangeClass = '', $class = '') { private function buildButtonCode($buttonHtmlId, $text, $tooltip, $icon, $disabled = '', $buttonOnChangeClass = '', $class = '') {
...@@ -363,6 +365,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -363,6 +365,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
/** /**
* @param $pillArray * @param $pillArray
*
* @return string * @return string
* @throws UserFormException * @throws UserFormException
*/ */
...@@ -423,6 +426,7 @@ class BuildFormBootstrap extends AbstractBuildForm { ...@@ -423,6 +426,7 @@ class BuildFormBootstrap extends AbstractBuildForm {
* Create an identifier for the pill navigation menu * Create an identifier for the pill navigation menu
* *
* @param $id * @param $id
*
* @return string * @return string
*/ */
private function createAnker($id) { private function createAnker($id) {
...@@ -531,8 +535,9 @@ EOF; ...@@ -531,8 +535,9 @@ EOF;
/** /**
* @param array $formElement * @param array $formElement
* @param $htmlFormElementName * @param $htmlFormElementName
* @param $value * @param $value
*
* @return mixed * @return mixed
*/ */
public function buildPill(array $formElement, $htmlFormElementName, $value, array &$json) { public function buildPill(array $formElement, $htmlFormElementName, $value, array &$json) {
...@@ -553,9 +558,10 @@ EOF; ...@@ -553,9 +558,10 @@ EOF;
} }
/** /**
* @param array $formElement Complete FormElement, especially some FE_WRAP * @param array $formElement Complete FormElement, especially some FE_WRAP
* @param string $htmlElement Content to wrap. * @param string $htmlElement Content to wrap.
* @param $htmlFormElementName * @param $htmlFormElementName
*
* @return string Wrapped $htmlElement * @return string Wrapped $htmlElement
* @throws \qfq\UserFormException * @throws \qfq\UserFormException
*/ */
...@@ -609,13 +615,14 @@ EOF; ...@@ -609,13 +615,14 @@ EOF;
* - if $formElement[$wrapName] is given: wrap with that one. Else: wrap with $wrapArray * - if $formElement[$wrapName] is given: wrap with that one. Else: wrap with $wrapArray
* - if $htmlId is give, inject it in $wrap. * - if $htmlId is give, inject it in $wrap.
* *
* @param array $formElement Complete FormElement, especially some FE_WRAP * @param array $formElement Complete FormElement, especially some FE_WRAP
* @param string $htmlElement Content to wrap. * @param string $htmlElement Content to wrap.
* @param string $wrapName FE_WRAP_ROW, FE_WRAP_LABEL, FE_WRAP_INPUT, FE_WRAP_NOTE * @param string $wrapName FE_WRAP_ROW, FE_WRAP_LABEL, FE_WRAP_INPUT, FE_WRAP_NOTE
* @param int $bsColumns * @param int $bsColumns
* @param array $wrapArray Systemwide Defaults: [ 'open wrap', 'close wrap' ] * @param array $wrapArray Systemwide Defaults: [ 'open wrap', 'close wrap' ]
* @param string $htmlId * @param string $htmlId
* @param string $class * @param string $class
*
* @return string Wrapped $htmlElement * @return string Wrapped $htmlElement
* @throws CodeException * @throws CodeException
* @throws \qfq\UserFormException * @throws \qfq\UserFormException
...@@ -649,6 +656,7 @@ EOF; ...@@ -649,6 +656,7 @@ EOF;
/** /**
* @param $formElement * @param $formElement
* @param $elementHtml * @param $elementHtml
*
* @return string * @return string
*/ */
public function buildRowPill(array $formElement, $elementHtml) { public function buildRowPill(array $formElement, $elementHtml) {
...@@ -692,6 +700,7 @@ EOF; ...@@ -692,6 +700,7 @@ EOF;
/** /**
* @param $formElement * @param $formElement
* @param $elementHtml * @param $elementHtml
*
* @return string * @return string
*/ */
public function buildRowSubrecord(array $formElement, $elementHtml) { public function buildRowSubrecord(array $formElement, $elementHtml) {
......
...@@ -61,6 +61,7 @@ class BuildFormPlain extends AbstractBuildForm { ...@@ -61,6 +61,7 @@ class BuildFormPlain extends AbstractBuildForm {
*/ */
public function doSubrecords() { public function doSubrecords() {
$json = array(); $json = array();
//TODO: $json is not returned - which is wrong. In this case, dynamic update won't work for subrecords //TODO: $json is not returned - which is wrong. In this case, dynamic update won't work for subrecords
return $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_SUBRECORD, $json); return $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_SUBRECORD, $json);
} }
...@@ -69,6 +70,7 @@ class BuildFormPlain extends AbstractBuildForm { ...@@ -69,6 +70,7 @@ class BuildFormPlain extends AbstractBuildForm {
* @param $htmlFormElementName * @param $htmlFormElementName
* @param $formElement * @param $formElement
* @param $value * @param $value
*
* @return string * @return string
*/ */
public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) { public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) {
...@@ -78,13 +80,13 @@ class BuildFormPlain extends AbstractBuildForm { ...@@ -78,13 +80,13 @@ class BuildFormPlain extends AbstractBuildForm {
// $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement[FE_TYPE]]; // $buildElementFunctionName = 'build' . $this->buildElementFunctionName[$formElement[FE_TYPE]];
if($formElement['nestedInFieldSet']==='no') { if ($formElement['nestedInFieldSet'] === 'no') {
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START]; $html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_START];
} }
$html .= $this->wrapItem(WRAP_SETUP_LABEL, $formElement[FE_LABEL]); $html .= $this->wrapItem(WRAP_SETUP_LABEL, $formElement[FE_LABEL]);
$html .= $this->wrapItem(WRAP_SETUP_INPUT, $htmlElement); $html .= $this->wrapItem(WRAP_SETUP_INPUT, $htmlElement);
$html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement[FE_NOTE]); $html .= $this->wrapItem(WRAP_SETUP_NOTE, $formElement[FE_NOTE]);
if($formElement['nestedInFieldSet']==='no') { if ($formElement['nestedInFieldSet'] === 'no') {
$html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END]; $html .= $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_END];
} }
......
...@@ -51,6 +51,7 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -51,6 +51,7 @@ class BuildFormTable extends AbstractBuildForm {
public function fillWrapLabelInputNote($label, $input, $note) { public function fillWrapLabelInputNote($label, $input, $note) {
} }
/** /**
* @return string * @return string
*/ */
...@@ -64,6 +65,7 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -64,6 +65,7 @@ class BuildFormTable extends AbstractBuildForm {
public function doSubrecords() { public function doSubrecords() {
//TODO: $json is not returned - which is wrong. In this case, dynamic update won't work for subrecords //TODO: $json is not returned - which is wrong. In this case, dynamic update won't work for subrecords
$json = array(); $json = array();
return $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_SUBRECORD, $json); return $this->elements($this->store->getVar(SIP_RECORD_ID, STORE_SIP), FORM_ELEMENTS_SUBRECORD, $json);
} }
...@@ -73,7 +75,7 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -73,7 +75,7 @@ class BuildFormTable extends AbstractBuildForm {
public function head() { public function head() {
$html = ''; $html = '';
$html .= '<div ' . Support::doAttribute('class', $this->formSpec[F_CLASS], TRUE) . '>'; // main <div class=...> around everything $html .= '<div ' . Support::doAttribute('class', $this->formSpec[F_CLASS], true) . '>'; // main <div class=...> around everything
// Logged in BE User will see a FormEdit Link // Logged in BE User will see a FormEdit Link
$sipParamString = OnArray::toString($this->store->getStore(STORE_SIP), ':', ', ', "'"); $sipParamString = OnArray::toString($this->store->getStore(STORE_SIP), ':', ', ', "'");
...@@ -94,6 +96,7 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -94,6 +96,7 @@ class BuildFormTable extends AbstractBuildForm {
* @param $htmlFormElementName * @param $htmlFormElementName
* @param $formElement * @param $formElement
* @param $value * @param $value
*
* @return string * @return string
*/ */
public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) { public function buildRowNative(array $formElement, $htmlElement, $htmlFormElementName) {
...@@ -117,7 +120,7 @@ class BuildFormTable extends AbstractBuildForm { ...@@ -117,7 +120,7 @@ class BuildFormTable extends AbstractBuildForm {
} else { } else {
$html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $formElement[FE_LABEL]); $html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $formElement[FE_LABEL]);
$html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $htmlElement); $html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $htmlElement);
if($formElement[FE_NOTE]!=='') if ($formElement[FE_NOTE] !== '')
$html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $formElement[FE_NOTE]); $html .= $this->wrapItem(WRAP_SETUP_IN_FIELDSET, $formElement[FE_NOTE]);
} }
} }
......
...@@ -35,10 +35,12 @@ class Delete { ...@@ -35,10 +35,12 @@ class Delete {
/** /**
* Deletes the record id=$recordId from table $form[F_TABLE_NAME]. * Deletes the record id=$recordId from table $form[F_TABLE_NAME].
* If the table has a column named COLUMN_PATH_FILE_NAME and the value of that specific record column points * If the table has a column named COLUMN_PATH_FILE_NAME and the value of that specific record column points
* to a file: delete such a file if their are no other records in the same table which also have a reference to that file. * to a file: delete such a file if their are no other records in the same table which also have a reference to
* that file.
* *
* @param string $tableName * @param string $tableName
* @param integer $recordId * @param integer $recordId
*
* @throws CodeException * @throws CodeException
* @throws DbException * @throws DbException
* @throws UserFormException * @throws UserFormException
...@@ -84,7 +86,8 @@ class Delete { ...@@ -84,7 +86,8 @@ class Delete {
* If no: do nothing, continue with the next column. * If no: do nothing, continue with the next column.
* *
* @param array $row * @param array $row