https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4a652c
)
Automatically create a .htaccess when not existing
author
Michael
<heluecht@pirati.ca>
Sat, 21 Jul 2018 05:41:19 +0000
(
05:41
+0000)
committer
Michael
<heluecht@pirati.ca>
Sat, 21 Jul 2018 05:41:19 +0000
(
05:41
+0000)
src/Worker/Cron.php
patch
|
blob
|
history
diff --git
a/src/Worker/Cron.php
b/src/Worker/Cron.php
index
644ef6b
..
bf1b44f
100644
(file)
--- a/
src/Worker/Cron.php
+++ b/
src/Worker/Cron.php
@@
-112,6
+112,13
@@
class Cron
Config::set('system', 'last_cron_hourly', time());
}
+ // Ensure to have a .htaccess file.
+ // this is a precaution for systems that update automatically
+ $basepath = $a->get_basepath();
+ if (!file_exists($basepath . '/.htaccess')) {
+ copy($basepath . '/.htaccess-dist', $basepath . '/.htaccess');
+ }
+
// Poll contacts
self::pollContacts($parameter, $generation);