From cd568a72940b3ea6766a83c1437ceb4bc3f575b7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 09 Aug 2010 10:07:21 -0400
Subject: [PATCH] Fixed: FS#1277 - Empty server/conf/index/.htaccess
---
/dev/null | 2 --
server/plugins-available/apache2_plugin.inc.php | 6 +++---
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/server/conf/index/.htaccess b/server/conf/index/.htaccess
deleted file mode 100644
index e69de29..0000000
--- a/server/conf/index/.htaccess
+++ /dev/null
diff --git a/server/conf/index/favicon.ico b/server/conf/index/favicon.ico
deleted file mode 100644
index da6257c..0000000
--- a/server/conf/index/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/server/conf/index/robots.txt b/server/conf/index/robots.txt
deleted file mode 100644
index 4354fd9..0000000
--- a/server/conf/index/robots.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-User-agent: *
-Disallow: /stats/
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index a404060..611fbc1 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/");
--
Gitblit v1.9.1