Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
fd2919d5
Commit
fd2919d5
authored
Mar 08, 2018
by
Carsten Rose
Browse files
Bug #5640 / UTF8 encoded strings: MAX LENGTH wrong
parent
2d89c225
Changes
2
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/AbstractBuildForm.php
View file @
fd2919d5
...
...
@@ -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
)
{
...
...
extension/qfq/qfq/report/Report.php
View file @
fd2919d5
...
...
@@ -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!
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment