From 929f1808bab2b16a42d4e80f31069439ba7c3567 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Thu, 4 Mar 2010 15:10:05 +0000 Subject: [PATCH] ergo: on ne cree plus les dossiers stats et backups, inutiles, et on pointe les nouveaux domaines dans --- bureau/class/m_dom.php | 16 +++++----------- src/mem_add | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index abe31891..5113af4f 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -179,7 +179,7 @@ class m_dom { $ @return boolean Retourne FALSE si une erreur s'est produite, TRUE sinon. */ function add_domain($domain,$dns,$noerase=0,$force=0) { - global $db,$err,$quota,$classes,$L_MX,$L_FQDN,$tld,$cuid; + global $db,$err,$quota,$classes,$L_MX,$L_FQDN,$tld,$cuid,$bro; $err->log("dom","add_domain",$domain); $mx="1"; // Locked ? @@ -258,22 +258,16 @@ class m_dom { $db->query("insert into domaines_standby (compte,domaine,mx,gesdns,gesmx,action) values ('$cuid','$domain','$L_MX','$dns','$mx',0);"); // INSERT // Creation du repertoire dans www - global $bro; $dest_root = $bro->get_userid_root($cuid); - $dest_www = $dest_root . '/www'; - $dest_www_domain = $dest_www . '/' . $domain; + $domshort=str_replace("-","",str_replace(".","",$domain)); - if (! is_dir($dest_www)) { - mkdir($dest_www); - } - - if (! is_dir($dest_www_domain)) { - mkdir($dest_www_domain); + if (! is_dir($dest_root . "/". $domshort)) { + mkdir($dest_root . "/". $domshort); } // Creation des 3 sous-domaines par défaut : Vide, www et mail $this->set_sub_domain($domain, '', $this->type_url, 'add', 'http://www.'.$domain); - $this->set_sub_domain($domain, 'www', $this->type_local, 'add', '/www/' . $domain); + $this->set_sub_domain($domain, 'www', $this->type_local, 'add', '/'. $domshort); $this->set_sub_domain($domain, 'mail', $this->type_webmail, 'add', ''); // DEPENDANCE : // Lancement de add_dom sur les classes domain_sensitive : diff --git a/src/mem_add b/src/mem_add index 6f09db5c..77d54f2f 100755 --- a/src/mem_add +++ b/src/mem_add @@ -27,7 +27,7 @@ $( = $); my $PTH="/var/alternc/html/".substr($name,0,1)."/".$name; -my @create_paths = ($PTH, $PTH . '/www', $PTH . '/stats', $PTH . '/backups'); +my @create_paths = ($PTH); for my $p (@create_paths) { mkdir($p);