Merge pull request #5435 from annando/htaccess

Automatically create a .htaccess when not existing
2022.09-rc
Tobias Diekershoff 2018-07-21 07:48:15 +02:00 zatwierdzone przez GitHub
commit eded252a40
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -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);