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
6267461b
Commit
6267461b
authored
Jul 22, 2020
by
Marc Egger
Browse files
Refs #10120 DatbaseUpdate.php: Move form as file code before version number update
parent
f4cfb74a
Pipeline
#3657
passed with stages
in 4 minutes and 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Core/Database/DatabaseUpdate.php
View file @
6267461b
...
...
@@ -153,27 +153,28 @@ class DatabaseUpdate {
$this
->
dbUpdateStatements
(
$old
,
$new
);
if
(
$old
!==
false
)
{
// Import files from form path. (Creates path and exports all forms to it, if it doesn't exist)
// If Form table exists, import all form files so everything is up to date.
// Note: Creates path and exports all forms to it, if it doesn't exist
FormAsFile
::
importAllForms
(
$this
->
db
,
true
,
true
);
}
$this
->
db
->
playSqlFile
(
__DIR__
.
'/../../Sql/formEditor.sql'
);
$qfqLog
=
$this
->
db
->
getQfqLogFile
();
Logger
::
logMessage
(
date
(
'Y.m.d H:i:s '
)
.
": Updated from QFQ version '
$old
' to '
$new
'"
,
$qfqLog
);
// Finally write the latest version number.
$versionInfo
[
QFQ_VERSION_KEY
]
=
$new
;
$this
->
setDatabaseVersion
(
$versionInfo
);
if
(
$old
===
false
)
{
// new installation: export native forms + import existing user forms
// new installation: export native
qfq
forms + import existing user forms
FormAsFIle
::
exportAllForms
(
$this
->
db
,
false
);
FormAsFile
::
importAllForms
(
$this
->
db
);
}
else
{
// Export forms + delete files which were removed since the import above
// Ex
isting installation: ex
port forms + delete files which were removed since the import above
FormAsFIle
::
exportAllForms
(
$this
->
db
,
true
);
}
$qfqLog
=
$this
->
db
->
getQfqLogFile
();
Logger
::
logMessage
(
date
(
'Y.m.d H:i:s '
)
.
": Updated from QFQ version '
$old
' to '
$new
'"
,
$qfqLog
);
// Finally write the latest version number.
$versionInfo
[
QFQ_VERSION_KEY
]
=
$new
;
$this
->
setDatabaseVersion
(
$versionInfo
);
}
if
(
$old
===
false
)
{
...
...
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