Changeset 785


Ignore:
Timestamp:
Apr 26, 2017, 12:51:43 PM (7 years ago)
Author:
autocommit@…
Message:

mas debug y primera version del caso mailman

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/alternc/patches/class/m_mail_egw.php

    r784 r785  
    44class m_mail_egw extends m_mail {
    55
    6         function create($dom_id, $mail, $type = "", $dontcheck = false) {
    7            if ($this->_add_egw_account($dom_id, $mail, $type = "", $dontcheck = false))
    8                         if (parent::create($dom_id,$mail,$type="",$dontcheck=false))
    9                                 return true;
    10                         else
    11                                 return false;
    12                 else
    13                         return false;
    14         }
     6    # override mail create function to add an alias
     7    function create($dom_id, $mail, $type = "", $dontcheck = false) {
     8        $status = TRUE;
     9        if ($type != 'mailman') {
     10            # check if egw worked
     11            $status = $this->_add_egw_account($dom_id, $mail, $type, $dontcheck);
     12        }
     13        return parent::create($dom_id,$mail,$type,$dontcheck) && $status;
     14    }
    1515
    1616        function set_passwd($mail_id, $pass) {
     
    8585        }       
    8686
    87         function _add_egw_account($dom_id, $mail, $type = "", $dontcheck = false) {
     87        function _add_egw_account($dom_id, $mail, $type, $dontcheck = false) {
    8888        global $err, $db, $quota, $dom, $hooks, $L_EGW_ADMINCLI, $L_EGW_ADMINUSER, $L_EGW_ADMINCLAVE;
    8989        $res = true;
    90                 $err->log("mail", "create_egwclass", "$mail $dom_id");
     90                $err->log("mail", "create_egwclass", "$type $mail $dom_id");
    9191        $domain = $dom->get_domain_byid($dom_id);
    92                 $err->log("mail", "create_egwclass", "$mail $domain");
    93 
     92                $err->log("mail", "create_egwclass", "$type $mail $domain");
    9493
    9594        $dominio = explode('.',$domain);
Note: See TracChangeset for help on using the changeset viewer.