From cd568a72940b3ea6766a83c1437ceb4bc3f575b7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 9 Aug 2010 14:07:21 +0000
Subject: [PATCH] Fixed: FS#1277 - Empty server/conf/index/.htaccess

---
 server/conf/index/.htaccess                     |   0
 server/conf/index/favicon.ico                   | Bin 1406 -> 0 bytes
 server/conf/index/robots.txt                    |   2 --
 server/plugins-available/apache2_plugin.inc.php |   6 +++---
 4 files changed, 3 insertions(+), 5 deletions(-)
 delete mode 100644 server/conf/index/.htaccess
 delete mode 100644 server/conf/index/favicon.ico
 delete mode 100644 server/conf/index/robots.txt

diff --git a/server/conf/index/.htaccess b/server/conf/index/.htaccess
deleted file mode 100644
index e69de29bb..000000000
diff --git a/server/conf/index/favicon.ico b/server/conf/index/favicon.ico
deleted file mode 100644
index da6257c84cce5c550eb7118581ed2a22f15af248..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 1406
zcmeH_Sxl5y6vzL!*4AoOwAHFiof!oc0gFpZTWqzpwSq7+ezSbczOW1o%P<Te+W@w*
zIirOtYm6qE@S+b&gA2GM;7mveBqSsxJP=AqAfN(1u!O|%jD6|5PbNJ#_nv!i?m6do
z@BadfT2K&ZT!XaLz*YeJsM8ii)C2ngJI>y^e~16f{eD0E{?}MuUc#$a^LYMz22)d$
z7$5%!KA#sQE*Bb`n^9C;46o0JM~@%lVP_}qKX`yUckklH&6{X!YQmL<2GrHp!|m}v
zrPe^fCqi#B!)nWb&R|5MMhjbJ7Sd>KO}D|4oC1?22?jc&H=0mTScIHhC$e)KI3rg=
z#wj3?aZqdZ6srTT)<VgvAy@J+ngekbX!S;DbOt1+q#}v(xys5>aJCS6`2}$1<s;Xb
z2M6V}Q_iexJ2C?GsdiIy3mO`mQ2*Cu{8?8I&&5lqz2HW5O)aXbYjD1@3gs2&P*z?+
z400q$IVe<Wa0(tes;N{ZBHflrx#%uwHl$k9iNOj>QVPtLWSEH0NPGsPnQG@E+wMSS
zmK`cygVxroC@pm%pBP`fc!~c00eHPWJbUKFlP6En+1Z7A_wJ*;{cqg5bsN{NT}Mkx
zE1HS9j#%Ap4^~!INUvoqEiGYjaS;m(3z(mu$K2c;W@l$HGc$wf>1on&3X_wQn3$L#
zJ;yONHipsBQH+d?V0d^KLqkIt92~^JzyNXdqpz<Iy}iA}<3&$T54yX%(bd(3j*brE
zX-8XI8yZMw7yXIAzxm(Z?-z)Uj@BGWOJ1Mq`N<GN3w4NgOA&i(g&Wl&-)#^5=3|z7
zzVi1nC;MZ2Xs94&6U)|f(xb*ppJfSRVx)p|to+NJ(jV58rhG3I2o$o_%&L^hxL-0p
zs#VBjJoh29@f>&ND@k=3d0w8wG85%;ak?x27%!La5<1xDJA}dmp9B@3*d-M17dhFF
z!6K39P(;P2`$eK)@mc2nVw-sDh7#x6V6pgMR3$4ptP4A>Ik|4f!Kf%n*k;BqBpmws
zx8pSzC1GK);ZbJBOnG*?LRD;d_@0QpD$6RyK5!Hy{k$h4A~HU5pJey1Cr^EQI4&+S
JKK@<RdjqILJA?oL

diff --git a/server/conf/index/robots.txt b/server/conf/index/robots.txt
deleted file mode 100644
index 4354fd969..000000000
--- 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 a40406034..611fbc1c8 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -415,9 +415,9 @@ class apache2_plugin {
 				}
 				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/");
-- 
GitLab