Changeset 2905


Ignore:
Timestamp:
03/27/11 18:25:51 (2 years ago)
Author:
benjamin
Message:

trash ok for yes/no (was buggy)

Location:
alternc/trunk/bureau
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/bureau/admin/mail_doadd.php

    r2791 r2905  
    3131$trash->getfromform(); 
    3232 
     33$fields = array ( 
     34        "domain"    => array ("request", "string", ""), 
     35        "email"       => array ("request", "string", ""), 
     36        "pop"       => array ("request", "integer", 0), 
     37        "pass"       => array ("request", "string", ""), 
     38        "passconf"       => array ("request", "string", ""), 
     39        "alias"       => array ("request", "string", ""), 
     40); 
     41getFields($fields); 
     42 
     43 
    3344if ($pass != $passconf) { 
    3445        $error = _("Passwords do not match"); 
  • alternc/trunk/bureau/class/m_trash.php

    r2791 r2905  
    3838    $this->expiration_date_db=$expiration_date_db; 
    3939    $this->expiration_date=strtotime($this->expiration_date_db); 
     40    if ($this->expiration_date_db) $this->is_trash=true; 
    4041  } 
    4142 
    4243  function human_display() { 
    43     return strftime("%d/%m/%Y %T",$this->expiration_date); 
     44    return strftime("%d/%m/%Y",$this->expiration_date); 
    4445  } 
    4546 
    4647  function getfromform() { 
    4748    $fields = array ( 
    48           "trash_type_expiration"   => array ("request", "string", ""), 
    49           "trash_exp_in_value"      => array ("request", "string", ""), 
    50           "trash_exp_in_unit"       => array ("request", "string", ""), 
    51           "trash_datepicker"        => array ("request", "string", ""), 
     49                     "istrash"                => array ("request", "boolean", false), 
     50                     "trash_type_expiration"  => array ("request", "string", ""), 
     51                     "trash_exp_in_value"     => array ("request", "string", ""), 
     52                     "trash_exp_in_unit"      => array ("request", "string", ""), 
     53                     "trash_datepicker"       => array ("request", "string", ""), 
    5254    ); 
    5355    $champs=getFields($fields); 
    5456    foreach($champs as $k=>$v) $$k = $v;  
     57 
     58    if (!$istrash) $trash_type_expiration="no_exp"; 
    5559 
    5660    switch($trash_type_expiration) { 
Note: See TracChangeset for help on using the changeset viewer.