From d2212dda734bb8c4b899faab848fa1bd7c1bf66e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 19 Sep 2010 08:01:47 -0400
Subject: [PATCH] Fixed bug in maildirmake function: http://www.howtoforge.com/forums/showthread.php?t=48890

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

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index a404060..8832d98 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -415,9 +415,9 @@
 				}
 				else {
 					exec("cp /usr/local/ispconfig/server/conf/index/standard_index.html_".substr(escapeshellcmd($conf["language"]),0,2)." ".escapeshellcmd($data["new"]["document_root"])."/web/index.html");
-					exec("cp /usr/local/ispconfig/server/conf/index/favicon.ico ".escapeshellcmd($data["new"]["document_root"])."/web/");
-					exec("cp /usr/local/ispconfig/server/conf/index/robots.txt ".escapeshellcmd($data["new"]["document_root"])."/web/");
-					exec("cp /usr/local/ispconfig/server/conf/index/.htaccess ".escapeshellcmd($data["new"]["document_root"])."/web/");
+					if(is_file('/usr/local/ispconfig/server/conf/index/favicon.ico')) exec("cp /usr/local/ispconfig/server/conf/index/favicon.ico ".escapeshellcmd($data["new"]["document_root"])."/web/");
+					if(is_file('/usr/local/ispconfig/server/conf/index/robots.txt')) exec("cp /usr/local/ispconfig/server/conf/index/robots.txt ".escapeshellcmd($data["new"]["document_root"])."/web/");
+					if(is_file('/usr/local/ispconfig/server/conf/index/.htaccess')) exec("cp /usr/local/ispconfig/server/conf/index/.htaccess ".escapeshellcmd($data["new"]["document_root"])."/web/");
 				}
 			}
 			exec("chmod -R a+r ".escapeshellcmd($data["new"]["document_root"])."/web/");
@@ -489,7 +489,7 @@
 			$this->_exec("chmod 751 ".escapeshellcmd($data["new"]["document_root"])."/*");
 			$this->_exec("chmod 710 ".escapeshellcmd($data["new"]["document_root"]."/web"));
 
-			// make temp direcory writable for the apache user and the website user
+			// make temp directory writable for the apache and website users
 			$this->_exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
 
 			$command = 'usermod';
@@ -534,7 +534,7 @@
 			$this->_exec("chmod 755 ".escapeshellcmd($data["new"]["document_root"]."/*"));
 			$this->_exec("chown root:root ".escapeshellcmd($data["new"]["document_root"]."/"));
 
-			// make temp direcory writable for the apache user and the website user
+			// make temp directory writable for the apache and website users
 			$this->_exec("chmod 777 ".escapeshellcmd($data["new"]["document_root"]."/tmp"));
 		}
 
@@ -1325,4 +1325,4 @@
 
 } // end class
 
-?>
\ No newline at end of file
+?>

--
Gitblit v1.9.1