Skip to content
GitLab
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
87af8060
Commit
87af8060
authored
Jun 20, 2018
by
Carsten Rose
Browse files
sqlHint: Note if a query fails and contains some unreplaced variables.
parent
f6f4290c
Changes
5
Hide whitespace changes
Inline
Side-by-side
extension/Documentation/Manual.rst
View file @
87af8060
...
...
@@ -2089,6 +2089,8 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| class | string | HTML div with given class, surrounding the whole form. Eg.: class=container-fluid. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| classTitle | string | CSS class inside of the `title` div. Default 'qfq-form-title'. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| classPill | string | HTML div with given class, surrounding the `pill` title line. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| classBody | string | HTML div with given class, surrounding all *FormElement*. |
...
...
extension/qfq/qfq/BuildFormBootstrap.php
View file @
87af8060
...
...
@@ -125,7 +125,8 @@ class BuildFormBootstrap extends AbstractBuildForm {
// Show title / frame only if there is a title given.
if
(
$this
->
formSpec
[
F_TITLE
]
!=
''
)
{
$title
=
Support
::
wrapTag
(
'<div class="row"><div class="col-md-12">'
,
Support
::
wrapTag
(
'<div class="qfq-form-title">'
,
$this
->
formSpec
[
F_TITLE
]));
$classTitle
=
isset
(
$this
->
formSpec
[
F_CLASS_TITLE
])
?
$this
->
formSpec
[
F_CLASS_TITLE
]
:
"qfq-form-title"
;
$title
=
Support
::
wrapTag
(
'<div class="row"><div class="col-md-12">'
,
Support
::
wrapTag
(
'<div class="'
.
$classTitle
.
'">'
,
$this
->
formSpec
[
F_TITLE
]));
}
$html
.
=
$button
.
$title
;
...
...
extension/qfq/qfq/Constants.php
View file @
87af8060
...
...
@@ -801,6 +801,7 @@ const F_ESCAPE_TYPE_DEFAULT = SYSTEM_ESCAPE_TYPE_DEFAULT;
const
F_CLASS
=
'class'
;
const
F_CLASS_PILL
=
'classPill'
;
const
F_CLASS_BODY
=
'classBody'
;
const
F_CLASS_TITLE
=
'classTitle'
;
const
F_SHOW_BUTTON
=
'showButton'
;
...
...
extension/qfq/qfq/database/Database.php
View file @
87af8060
...
...
@@ -284,15 +284,22 @@ class Database {
* @return string
*/
private
function
getSqlHint
(
$sql
){
$msg
=
''
;
// Check if there is a comma before FROM: 'SELECT ... , FROM ...'
$pos
=
stripos
(
$sql
,
' FROM '
);
if
(
$pos
!==
false
&&
$pos
>
0
&&
$sql
[
$pos
-
1
]
==
','
){
return
'
HINT: remove extra
","
before FROM
'
;
$msg
.
=
"
HINT: remove extra
','
before FROM
\n
"
;
}
// Look for QFQ variables which haven't been replaced
$matches
=
array
();
preg_match_all
(
"/
{
{[^}}]*}
}
/"
,
$sql
,
$matches
);
if
(
count
(
$matches
[
0
])
>
0
){
$msg
.
=
"The following variables couldn't be replaced: "
.
implode
(
', '
,
$matches
[
0
])
.
"
\n
"
;
}
return
''
;
return
$msg
;
}
/**
...
...
extension/qfq/qfq/store/Sip.php
View file @
87af8060
...
...
@@ -329,7 +329,8 @@ class Sip {
* @param string|array $vars
*
* @return string
* @throws \qfq\UserFormException
* @throws UserFormException
* @throws UserReportException
*/
public
function
debugSip
(
$vars
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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