From 36633e70259d9f56f74a45075d30bd38f164096f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 14 Aug 2014 17:18:14 -0400
Subject: [PATCH] Changed .htpasswd path in ispconfig_htaccess.php script.

---
 server/scripts/ispconfig_htaccess.php |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/server/scripts/ispconfig_htaccess.php b/server/scripts/ispconfig_htaccess.php
index 568ec50..b72e791 100644
--- a/server/scripts/ispconfig_htaccess.php
+++ b/server/scripts/ispconfig_htaccess.php
@@ -29,8 +29,9 @@
 */
 
 
-$path = realpath(dirname(__FILE__)) . '/..';
-$iface_path = realpath(dirname(__FILE__)) . '/../../interface/web';
+$path = realpath(dirname(__FILE__) . '/..');
+$iface_path = realpath(dirname(__FILE__) . '/../../interface/web');
+$iface_base_path = realpath(dirname(__FILE__) . '/../../interface');
 
 require $path . '/lib/mysql_clientdb.conf';
 
@@ -55,13 +56,13 @@
 
 if($cont == '') die('No users found' . "\n");
 
-if(file_exists($iface_path . '/.htpasswd')) rename($iface_path . '/.htpasswd', $iface_path . '/.htpasswd.old');
-file_put_contents($iface_path . '/.htpasswd', $cont);
-chmod($iface_path . '/.htpasswd', 0644);
+if(file_exists($iface_base_path . '/.htpasswd')) rename($iface_base_path . '/.htpasswd', $iface_base_path . '/.htpasswd.old');
+file_put_contents($iface_base_path . '/.htpasswd', $cont);
+chmod($iface_base_path . '/.htpasswd', 0644);
 
 $cont = 'AuthType Basic
 AuthName "Login"
-AuthUserFile ' . $iface_path . '/.htpasswd
+AuthUserFile ' . $iface_base_path . '/.htpasswd
 require valid-user';
 
 if(file_exists($iface_path . '/.htaccess')) rename($iface_path . '/.htaccess', $iface_path . '/.htaccess.old');

--
Gitblit v1.9.1