From 29974f93dfd68417bee6b1c5d4d989af05b4d825 Mon Sep 17 00:00:00 2001
From: latham <latham@ispconfig3>
Date: Mon, 23 May 2011 10:21:30 -0400
Subject: [PATCH] Use some Industry Standards. Default language can now be set in the localconfig.
---
server/plugins-available/apache2_plugin.inc.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index de6a043..4868e28 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -441,6 +441,9 @@
// copy the standard index page
if (file_exists('/usr/local/ispconfig/server/conf-custom/index/standard_index.html_'.substr(escapeshellcmd($conf['language']),0,2))) {
exec('cp /usr/local/ispconfig/server/conf-custom/index/standard_index.html_'.substr(escapeshellcmd($conf['language']),0,2).' '.escapeshellcmd($data['new']['document_root']).'/web/index.html');
+ if(is_file('/usr/local/ispconfig/server/conf-custom/index/favicon.ico')) exec('cp /usr/local/ispconfig/server/conf-custom/index/favicon.ico '.escapeshellcmd($data['new']['document_root']).'/web/');
+ if(is_file('/usr/local/ispconfig/server/conf-custom/index/robots.txt')) exec('cp /usr/local/ispconfig/server/conf-custom/index/robots.txt '.escapeshellcmd($data['new']['document_root']).'/web/');
+ if(is_file('/usr/local/ispconfig/server/conf-custom/index/.htaccess')) exec('cp /usr/local/ispconfig/server/conf-custom/index/.htaccess '.escapeshellcmd($data['new']['document_root']).'/web/');
}
else {
if (file_exists('/usr/local/ispconfig/server/conf-custom/index/standard_index.html')) {
@@ -866,7 +869,7 @@
$vhost_file = escapeshellcmd($web_config['vhost_conf_dir'].'/'.$data['new']['domain'].'.vhost');
//* Make a backup copy of vhost file
- copy($vhost_file,$vhost_file.'~');
+ if(file_exists($vhost_file)) copy($vhost_file,$vhost_file.'~');
//* Write vhost file
file_put_contents($vhost_file,$tpl->grab());
@@ -1418,4 +1421,4 @@
} // end class
-?>
+?>
\ No newline at end of file
--
Gitblit v1.9.1