From 0ea0630e7913640be3654946de663e0cc55c6c83 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 21 Jul 2009 15:57:50 +0000 Subject: [PATCH] Change path in .htaccess file for stats when the client has been changed. --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 014163d72b..5f98d1c093 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -756,7 +756,7 @@ class apache2_plugin { } //* Create .htaccess and .htpasswd file for website statistics - if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess')) { + if(!is_file($data["new"]["document_root"].'/web/stats/.htaccess') or $data["old"]["document_root"] != $data["new"]["document_root"]) { if(!is_dir($data["new"]["document_root"].'/web/stats')) mkdir($data["new"]["document_root"].'/web/stats'); $ht_file = "AuthType Basic\nAuthName \"Members Only\"\nAuthUserFile ".$data["new"]["document_root"]."/.htpasswd_stats\n\nrequire valid-user\n"; file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file); -- GitLab