Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
88795cdd
Commit
88795cdd
authored
Jan 30, 2019
by
Carsten Rose
Browse files
Fixes #7714: autocron fails to open logfiles - adjust CWD based on argv(0).
parent
7f9fcf8b
Pipeline
#1449
passed with stage
in 2 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Source/external/autocron.php
View file @
88795cdd
...
...
@@ -18,6 +18,20 @@ try {
$verbose
=
true
;
}
// If this script is started via an absolute path: set CWD to the T3 installation directory
if
(
$argv
[
0
][
0
]
==
'/'
)
{
$baseDir
=
''
;
// /var/www/html/typo3conf/ext/qfq/Source/external/autocron.php
$arr
=
explode
(
'/'
,
$argv
[
0
]);
$cnt
=
count
(
$arr
)
-
6
;
// Strip the last '6' entries, these are below T3 basedir until this script.
for
(
$ii
=
0
;
$ii
<
$cnt
;
$ii
++
)
{
if
(
$arr
[
$ii
]
!=
''
)
{
$baseDir
.
=
'/'
.
$arr
[
$ii
];
}
}
chdir
(
$baseDir
);
}
$autoCron
=
new
\
qfq\AutoCron
(
$verbose
);
$autoCron
->
process
();
...
...
Write
Preview
Markdown
is supported
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