ftimme
2012-04-09 accfe5ed9238e8dba04ab2524fbc69cf3295739a
server/plugins-available/nginx_plugin.inc.php
@@ -1350,6 +1350,7 @@
      
      $awstats_conf_dir = $web_config['awstats_conf_dir'];
      
      if(!is_dir($data['new']['document_root']."/web/stats/")) mkdir($data['new']['document_root']."/web/stats");
      if(!@is_file($awstats_conf_dir.'/awstats.'.$data['new']['domain'].'.conf') || ($data['old']['domain'] != '' && $data['new']['domain'] != $data['old']['domain'])) {
         if ( @is_file($awstats_conf_dir.'/awstats.'.$data['old']['domain'].'.conf') ) {
            unlink($awstats_conf_dir.'/awstats.'.$data['old']['domain'].'.conf');
@@ -1366,7 +1367,6 @@
      }
      
      if(is_file($data['new']['document_root']."/web/stats/index.html")) unlink($data['new']['document_root']."/web/stats/index.html");
      if(!is_dir($data['new']['document_root']."/web/stats/")) mkdir($data['new']['document_root']."/web/stats");
      copy("/usr/local/ispconfig/server/conf/awstats_index.php.master",$data['new']['document_root']."/web/stats/index.php");
   }