From 40e6e695e09dd88a316af2cd464749a7c5521af7 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sat, 15 Feb 2014 10:46:08 -0500
Subject: [PATCH] Fixed: FS#3326 - Can't provide database to phpMyAdmin URL

---
 server/plugins-available/apache2_plugin.inc.php |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 0901c23..aec93b9 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -689,7 +689,7 @@
 			if($web_config['security_level'] == 20) {
 
 				$app->system->chmod($data['new']['document_root'], 0755);
-				$app->system->chmod($data['new']['document_root'].'/web', 0710);
+				$app->system->chmod($data['new']['document_root'].'/web', 0711);
 				$app->system->chmod($data['new']['document_root'].'/webdav', 0710);
 				$app->system->chmod($data['new']['document_root'].'/private', 0710);
 				$app->system->chmod($data['new']['document_root'].'/ssl', 0755);
@@ -892,6 +892,8 @@
 		// Make sure we only have Unix linebreaks
 		$vhost_data['apache_directives'] = str_replace("\r\n", "\n", $vhost_data['apache_directives']);
 		$vhost_data['apache_directives'] = str_replace("\r", "\n", $vhost_data['apache_directives']);
+		$trans = array('{DOCROOT}' => $vhost_data['web_document_root_www']);
+		$vhost_data['apache_directives'] = strtr($vhost_data['apache_directives'], $trans);
 
 		// Check if a SSL cert exists
 		$ssl_dir = $data['new']['document_root'].'/ssl';

--
Gitblit v1.9.1