Changeset 1905

Show
Ignore:
Timestamp:
08/27/07 09:19:10 (1 year ago)
Author:
benjamin
Message:

parameter checking in subdomain creation, + translations added in dom_subdodel.php

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc/trunk/bureau/admin/dom_subdodel.php

    r107 r1905  
    4242</head> 
    4343<body> 
    44 <h3>Suppression du sous-domaine http://<?php ecif($sub,$sub."."); echo $domain; ?> : </h3> 
     44<h3><?=sprintf(_("Deleting the subdomain %s:"),"http://".(($sub)?$sub.".":$sub).$domain); ?></h3> 
    4545<?php 
    4646        if ($error) { 
     
    4848                exit(); 
    4949        } else { 
    50                echo "<p class=\"error\">Le sous-domaine a ete supprime, les modifications seront prises en comptes dans 5 minutes.</p>"; 
     50          echo "<p class=\"error\">"._("The subdomain has been deleted. Changes will take place in 5 minutes.")."</p>"; 
    5151        } 
    5252?> 
    53 <p><a href="dom_edit.php?domain=<?php echo urlencode($domain) ?>">Continuer</a></p> 
     53<p><a href="dom_edit.php?domain=<?php echo urlencode($domain) ?>"><?php __("Click here to continue"); ?></a></p> 
    5454</body> 
    5555</html> 
  • alternc/trunk/bureau/class/functions.php

    r1828 r1905  
    166166  // 1. Nom de domaine complet trop long. 
    167167  // 2. L'un des membres est trop long. 
    168   // 3. Caract?re interdit dans l'un des membres. 
     168  // 3. Caractere interdit dans l'un des membres. 
     169  // 4. Le fqdn ne fait qu'un seul membre (il n'est donc pas fq...) 
    169170  if (strlen($fqdn)>255) 
    170171    return 1; 
    171172  $members=explode(".", $fqdn); 
    172   if (count($members)>1) { 
    173     reset($members); 
    174     while (list ($key, $val) = each ($members)) { 
    175       if (strlen($val)>63) 
    176         return 2; 
    177       if (!eregi("^[a-z0-9][a-z0-9-]*[a-z0-9]$",$val)) { 
    178         /*"*/                  return 3; 
    179       } 
    180     } 
    181   } else { 
    182     return 4; 
    183   } 
    184   return 0; 
     173  if (count($members)>1) $ret=0; else $ret=4; 
     174  reset($members); 
     175  while (list ($key, $val) = each ($members)) { 
     176    if (strlen($val)>63) 
     177      return 2; 
     178    if (!eregi("^[a-z0-9][a-z0-9-]*[a-z0-9]$",$val)) { 
     179      /*"*/                  return 3; 
     180    } 
     181  } 
     182  return $ret; 
    185183} 
    186184 
  • alternc/trunk/bureau/class/m_dom.php

    r1904 r1905  
    632632    } 
    633633    $dest=trim($dest); 
     634    $sub=trim(trim($sub),"."); 
    634635    $dom=strtolower($dom); 
    635636    $sub=strtolower($sub); 
    636637 
    637638    //    if (!(($sub == '*') || ($sub=="") || (preg_match('/([a-z0-9][\.\-a-z0-9]*)?[a-z0-9]/', $sub)))) { 
    638     if (($sub != '*') && checkfqdn($sub)) { 
     639    $fqdn=checkfqdn($sub); 
     640    if (($sub != '*') && !($fqdn==0 || $fqdn==4)) { 
    639641      $err->raise("dom",24); 
    640642      return false; 
  • alternc/trunk/bureau/locales/en_US/LC_MESSAGES/manual.po

    r1904 r1905  
    861861#~ msgstr "No files in this folder" 
    862862 
    863 msgid "help_dns_mx
     863msgid "help_dns_mx %s %s
    864864msgstr "" 
    865865"If we manage your DNS <br />You can manage your mails elsewhere if you " 
     
    873873"If we don't manage the DNS for this domain <br />do we manage your mails?" 
    874874 
    875 #~ msgid "help_domain_del
    876 #~ msgstr "" 
    877 #~ "If you want to delete the domain %s, click the button below.Warning : " 
    878 #~ "this delete all the ftp, mails, mailing-lists ... associated with " 
    879 #~ "thisdomain and all its subdomains!" 
     875msgid "help_domain_del %s
     876msgstr "" 
     877"If you want to delete the domain %s, click the button below.Warning : " 
     878"this delete all the ftp, mails, mailing-lists ... associated with " 
     879"thisdomain and all its subdomains!" 
    880880 
    881881#~ msgid "Domain hosting" 
     
    11931193msgstr "" 
    11941194"You can create various databases<br />Click on 'SQL Admin' in the menu to " 
    1195 manage them<br />or use the table below to backup, retrieve or delete " 
     1195"manage them<br />or use the table below to backup, retrieve or delete " 
    11961196"them:" 
    11971197 
  • alternc/trunk/bureau/locales/fr_FR/LC_MESSAGES/messages.po

    r1896 r1905  
    22122212msgstr "Image_Graph n'est pas installĂ©e. Lancez 'aptitude install php-pear' puis 'pear --alldeps install Image_Graph-devel' pour voir le graphique." 
    22132213 
     2214msgstr "The subdomain has been deleted. Changes will take place in 5 minutes." 
     2215msgid "Le sous-domaine a ete supprime, les modifications seront prises en comptes dans 5 minutes." 
     2216 
     2217msgstr "Deleting the subdomain %s:" 
     2218msgid "Effacement du sous-domaine %s : " 
  • alternc/trunk/debian/changelog

    r1901 r1905  
    11alternc (0.9.6.5) testing; urgency=low 
    22 
     3  * parameter checking in subdomain creation (#1037) 
    34  * Changing ownership of /var/alternc/tmp, makes file upload work again (#1058) 
    45  * Force the restart of apache & apache-ssl (#1000)