Rename htaccess file in source code and automatically name it when required during install

This commit is contained in:
Ben Nottelling committed 2021-12-06 22:45:54 -08:00
1 parent 26a5165a89
commit 99db52cef6
3 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@
<include name="bb-data/cache"/>
<include name="bb-data/uploads"/>
<include name="bb-data/index.html"/>
<include name="bb-data/.htaccess"/>
<include name="bb-data/.htaccess.txt"/>
<exclude name="bb-data/log/*"/>
<exclude name="bb-data/cache/*"/>
View File
File renamed without changes.
+7
View File
@@ -39,6 +39,9 @@ define('BB_PATH_CONFIG', BB_PATH_ROOT . '/bb-config.php');
define('BB_PATH_CRON', BB_PATH_ROOT . '/bb-cron.php');
define('BB_PATH_LANGS', BB_PATH_ROOT . '/bb-locale');
define('BB_PATH_HTACCESS', BB_PATH_ROOT . '/.htaccess');
define('BB_PATH_HTACCESS_TEMPLATE', BB_PATH_ROOT . '/.htaccess.txt');
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, [
BB_PATH_LIBRARY,
@@ -315,6 +318,10 @@ final class Box_Installer
// E-mail was not sent, but that is not a problem
error_log($e->getMessage());
}
if(!file_exists(BB_PATH_HTACCESS) && file_exists(BB_PATH_HTACCESS_TEMPLATE)) {
rename(BB_PATH_HTACCESS_TEMPLATE, BB_PATH_HTACCESS);
}
return true;
}