From e6f46e88ce87968efd18cd30cca5dae3d99cef1f Mon Sep 17 00:00:00 2001 From: Hani Rouatbi Date: Sun, 13 Aug 2023 17:42:11 +0100 Subject: [PATCH] fix for rename htaccess.txt --- includes/adm/a_configs.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/includes/adm/a_configs.php b/includes/adm/a_configs.php index d2f693b..1c54e73 100755 --- a/includes/adm/a_configs.php +++ b/includes/adm/a_configs.php @@ -214,15 +214,11 @@ while ($row=$SQL->fetch_array($result)) { if (! file_exists(PATH . '.htaccess') && file_exists(PATH . 'htaccess.txt') && function_exists('rename')) { - rename(PATH . 'htaccess.txt', PATH . '.htaccess'); - - if (! file_exists(PATH . '.htaccess')) + if (! rename(PATH . 'htaccess.txt', PATH . '.htaccess')) { - chmod(PATH . '.htaccess', K_FILE_CHMOD); + chmod(PATH . 'htaccess.txt', K_FILE_CHMOD); + rename(PATH . 'htaccess.txt', PATH . '.htaccess'); } - - //re-do after chmod - rename(PATH . 'htaccess.txt', PATH . '.htaccess'); } } }