diff --git a/extension/qfq/qfq/AbstractBuildForm.php b/extension/qfq/qfq/AbstractBuildForm.php index 35154dd51d62e64abb482dc45b9da33609bd6023..acd4174fcbe9d7a5c7a331ac2152937f44991be8 100644 --- a/extension/qfq/qfq/AbstractBuildForm.php +++ b/extension/qfq/qfq/AbstractBuildForm.php @@ -1102,7 +1102,7 @@ abstract class AbstractBuildForm { if ($formElement[FE_MAX_LENGTH] > 0 && $value !== '') { // crop string only if it's not empty (substr returns false on empty strings) - $value = substr($value, 0, $formElement[FE_MAX_LENGTH]); + $value = mb_substr($value, 0, $formElement[FE_MAX_LENGTH]); } // 'maxLength' needs an upper 'L': naming convention for DB tables! if ($formElement[FE_MAX_LENGTH] > 0) { diff --git a/extension/qfq/qfq/report/Report.php b/extension/qfq/qfq/report/Report.php index 5aa4aee698185cfc353bbce2bf87889e5ab30ce4..2483a5bf18cf5c1b401056fae86aa7662d5babc3 100644 --- a/extension/qfq/qfq/report/Report.php +++ b/extension/qfq/qfq/report/Report.php @@ -620,7 +620,6 @@ class Report { $assoc[REPORT_TOKEN_FINAL_VALUE . $keyAssoc] = $renderedColumn; } - if ($flagOutput) { //prints $content .= $this->variables->doVariables($fsep); @@ -659,10 +658,16 @@ class Report { $flagOutput = true; $dummy = false; - // Empty column names are allowed: check with isset + // Special column name: '_...'? Empty column names are allowed: check with isset if (isset($columnName[0]) && $columnName[0] === TOKEN_COLUMN_CTRL) { $flagControl = true; $columnName = substr($columnName, 1); + + // Special column name and hide output: '__...'? (double '_' at the beginning) + if (isset($columnName[0]) && $columnName[0] === TOKEN_COLUMN_CTRL) { + $flagOutput = false; + $columnName = substr($columnName, 1); + } } //TODO: reserved names,not starting with '_' will be still accepted - stop this!