From 0ea0630e7913640be3654946de663e0cc55c6c83 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 21 Jul 2009 11:57:50 -0400 Subject: [PATCH] Change path in .htaccess file for stats when the client has been changed. --- server/plugins-available/apache2_plugin.inc.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 014163d..5f98d1c 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -756,7 +756,7 @@ } //* 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<limit GET PUT POST>\nrequire valid-user\n</limit>"; file_put_contents($data["new"]["document_root"].'/web/stats/.htaccess',$ht_file); -- Gitblit v1.9.1