Changeset 2664

Show
Ignore:
Timestamp:
03/04/10 16:10:05 (5 months ago)
Author:
benjamin
Message:

ergo: on ne cree plus les dossiers stats et backups, inutiles, et on pointe les nouveaux domaines dans <nom court sans - ni . du domaine>

Location:
alternc/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/class/m_dom.php

    r2562 r2664  
    180180  */ 
    181181  function add_domain($domain,$dns,$noerase=0,$force=0) { 
    182     global $db,$err,$quota,$classes,$L_MX,$L_FQDN,$tld,$cuid; 
     182    global $db,$err,$quota,$classes,$L_MX,$L_FQDN,$tld,$cuid,$bro; 
    183183    $err->log("dom","add_domain",$domain); 
    184184    $mx="1"; 
     
    259259 
    260260    // Creation du repertoire dans www 
    261     global $bro; 
    262261    $dest_root = $bro->get_userid_root($cuid); 
    263     $dest_www = $dest_root . '/www'; 
    264     $dest_www_domain = $dest_www . '/' . $domain; 
    265  
    266     if (! is_dir($dest_www)) { 
    267       mkdir($dest_www); 
    268     } 
    269  
    270     if (! is_dir($dest_www_domain)) { 
    271       mkdir($dest_www_domain); 
     262    $domshort=str_replace("-","",str_replace(".","",$domain)); 
     263 
     264    if (! is_dir($dest_root . "/". $domshort)) { 
     265      mkdir($dest_root . "/". $domshort); 
    272266    } 
    273267 
    274268    // Creation des 3 sous-domaines par défaut : Vide, www et mail 
    275269    $this->set_sub_domain($domain, '',     $this->type_url,     'add', 'http://www.'.$domain); 
    276     $this->set_sub_domain($domain, 'www',  $this->type_local,   'add', '/www/' . $domain); 
     270    $this->set_sub_domain($domain, 'www',  $this->type_local,   'add', '/'. $domshort); 
    277271    $this->set_sub_domain($domain, 'mail', $this->type_webmail, 'add', ''); 
    278272    // DEPENDANCE : 
  • alternc/trunk/src/mem_add

    r2448 r2664  
    2828my $PTH="/var/alternc/html/".substr($name,0,1)."/".$name; 
    2929 
    30 my @create_paths = ($PTH, $PTH . '/www', $PTH . '/stats', $PTH . '/backups'); 
     30my @create_paths = ($PTH); 
    3131 
    3232for my $p (@create_paths) {