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
2a190d01
Commit
2a190d01
authored
Aug 26, 2018
by
Carsten Rose
Browse files
Merge branch '4996-log-qfq-version-update' into 'master'
Feature #4996 - Log QFQ Version update See merge request
!65
parents
8f222b7f
867c1e58
Pipeline
#769
passed with stage
in 1 minute and 38 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/database/Database.php
View file @
2a190d01
...
...
@@ -949,4 +949,11 @@ class Database {
}
while
(
$this
->
mysqli
->
more_results
()
&&
$this
->
mysqli
->
next_result
());
}
/**
*
*/
public
function
getQfqLogFile
()
{
return
(
$this
->
store
==
null
)
?
SYSTEM_QFQ_LOG_FILE
:
$this
->
store
->
getVar
(
SYSTEM_QFQ_LOG
,
STORE_SYSTEM
);
}
}
\ No newline at end of file
extension/qfq/qfq/database/DatabaseUpdate.php
View file @
2a190d01
...
...
@@ -9,6 +9,7 @@
namespace
qfq
;
require_once
(
__DIR__
.
'/../exceptions/CodeException.php'
);
require_once
(
__DIR__
.
'/../helper/Logger.php'
);
require_once
(
__DIR__
.
'/Database.php'
);
/*
...
...
@@ -110,6 +111,7 @@ class DatabaseUpdate {
*
* @throws CodeException
* @throws DbException
* @throws UserFormException
*/
public
function
checkNupdate
(
$dbUpdate
)
{
...
...
@@ -124,6 +126,9 @@ class DatabaseUpdate {
$this
->
dbUpdateStatements
(
$old
,
$new
);
$this
->
db
->
playSqlFile
(
__DIR__
.
'/../../sql/formEditor.sql'
);
$qfqLog
=
$this
->
db
->
getQfqLogFile
();
Logger
::
logMessage
(
"Updated from QFQ version '
$old
' to '
$new
'"
,
$qfqLog
);
// Finally write the latest version number.
$this
->
setDatabaseVersion
(
$new
);
}
...
...
extension/qfq/qfq/helper/Logger.php
View file @
2a190d01
...
...
@@ -37,7 +37,7 @@ class Logger {
if
(
!
$handle
=
fopen
(
$filename
,
$mode
))
{
// If open fails, maybe
di
e directory does not exist. Create it:
// If open fails, maybe
th
e directory does not exist. Create it:
Support
::
mkDirParent
(
$filename
);
// Try to open the file a second time.
...
...
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