Ignore:
Timestamp:
10/08/13 16:20:46 (11 years ago)
Author:
douglas
Message:

Ticket #0000 - Copiadas as alterações do Trunk. Versão final 2.5.1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/emailadmin/inc/class.ui.inc.php

    r7673 r8232  
    7777                        print $this->t->get('out','main'); 
    7878                } 
    79          
     79 
     80       function countProfiles(){ 
     81            $return =  $this->boemailadmin->getProfileList(); 
     82            (is_array($return) && count($return) > 0) ? $return = count($return) : $return = 0; 
     83                return $return; 
     84        } 
     85 
     86       function addDefaultProfile() 
     87       { 
     88            $emailServer = $_SESSION['phpgw_info']['expressomail']['email_server'];           
     89            $globalSettings = array( 
     90                        "profileID" => "", 
     91                        "description" => "Expresso", 
     92                        "defaultDomain" => $emailServer['defaultDomain'], 
     93                        "organisationName" => $emailServer['organisationName'], 
     94                        "userDefinedAccounts" => "0" 
     95            ); 
     96 
     97            $smtpSettings   = array( 
     98                "smtpServer" => "127.0.0.1", 
     99                "smtpPort" => "25", 
     100                "smtpAuth" => "", 
     101                    "smtpType" => "2",  
     102                    "smtpLDAPServer" => "127.0.0.1",  
     103                    "smtpLDAPAdminDN" => $emailServer['smtpLDAPAdminDN'], 
     104                    "smtpLDAPAdminPW" => $emailServer['smtpLDAPAdminPW'], 
     105                    "smtpLDAPBaseDN" =>  $emailServer['smtpLDAPBaseDN]'], 
     106                    "smtpLDAPUseDefault" => "yes" 
     107            ); 
     108 
     109            $imapSettings = array( 
     110                    'imapServer' => "127.0.0.1", 
     111                    'imapPort' => "143", 
     112                    'imapDelimiter' => "/", 
     113                    'imapType' => "3", 
     114                    'imapLoginType' => "standard", 
     115                    'imapTLSEncryption' => "1", 
     116                    'imapTLSAuthentication' => "", 
     117                    'imapoldcclient' => "", 
     118                    'imapEnableCyrusAdmin' => "yes", 
     119                    'imapAdminUsername' => "expresso-admin", 
     120                    'imapAdminPW' => $emailServer['imapAdminPW'], 
     121                    'imapEnableSieve' => "yes", 
     122                    'imapSieveServer' => "127.0.0.1", 
     123                    'imapSievePort' => "2000", 
     124                    'imapCreateSpamFolder' => "yes", 
     125                    'imapCyrusUserPostSpam' => "", 
     126                    'imapDefaultTrashFolder' => "Trash", 
     127                    'imapDefaultSentFolder' => "Sent", 
     128                    'imapDefaultDraftsFolder' => "Drafts", 
     129                    'imapDefaultSpamFolder' => "Spam" 
     130            ); 
     131 
     132            $this->boemailadmin->saveProfile($globalSettings, $smtpSettings, $imapSettings); 
     133        } 
     134 
    80135                function css() 
    81136                { 
Note: See TracChangeset for help on using the changeset viewer.