Ignore:
Timestamp:
09/11/08 16:42:44 (16 years ago)
Author:
rafaelraymundo
Message:

Melhoria implementada, relativo a ocorrencia #314 da comunidade.
Contatos dinamicos no envio de emails de forma configuravel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/preferences.php

    r389 r413  
    5050                        $GLOBALS['phpgw']->template->set_var('checked_mainscreen_showmail',''); 
    5151 
     52                if (!is_numeric($_SESSION['phpgw_info']['server']['expressomail']['expressoMail_Number_of_dynamic_contacts']))  
     53                {                                                                                
     54                        $GLOBALS['phpgw']->template->set_var('checked_dynamic_contacts',''); 
     55                        $GLOBALS['phpgw']->template->set_var('checked_dynamic_contacts','disabled'); 
     56                } 
     57                else 
     58                { 
     59                        if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) 
     60                                $GLOBALS['phpgw']->template->set_var('checked_dynamic_contacts','checked'); 
     61                        else 
     62                                $GLOBALS['phpgw']->template->set_var('checked_dynamic_contacts',''); 
     63                } 
     64 
    5265                if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts']) 
    5366                        $GLOBALS['phpgw']->template->set_var('checked_shortcuts','checked'); 
     
    147160                else 
    148161                        $GLOBALS['phpgw']->preferences->add('expressoMail','mainscreen_showmail',$_POST['mainscreen_showmail']); 
     162 
     163                if (!is_numeric($_SESSION['phpgw_info']['server']['expressomail']['expressoMail_Number_of_dynamic_contacts']))  
     164                {                                                                                
     165                        $GLOBALS['phpgw']->template->set_var('checked_dynamic_contacts',''); 
     166                        $GLOBALS['phpgw']->template->set_var('checked_dynamic_contacts','disabled'); 
     167                } 
     168                else 
     169                { 
     170                        if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_dynamic_contacts']) 
     171                        { 
     172                                $GLOBALS['phpgw']->preferences->change('expressoMail','use_dynamic_contacts',$_POST['use_dynamic_contacts']); 
     173                                if($_POST['use_dynamic_contacts'] == '') 
     174                                { 
     175                                        $contacts = CreateObject('expressoMail1_2.dynamic_contacts'); 
     176                                        $contacts->delete_dynamic_contacts(); 
     177                                } 
     178                        } 
     179                        else 
     180                        $GLOBALS['phpgw']->preferences->add('expressoMail','use_dynamic_contacts',$_POST['use_dynamic_contacts']); 
     181                } 
    149182 
    150183                if ($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_shortcuts']) 
     
    220253        $GLOBALS['phpgw']->template->set_var('lang_line_height',lang('What is the height of the lines in the list of messages?')); 
    221254        $GLOBALS['phpgw']->template->set_var('lang_font_size',lang('What the font size in the list of messages?')); 
     255        $GLOBALS['phpgw']->template->set_var('lang_use_dynamic_contacts',lang('Use dynamic contacts?')); 
    222256        $GLOBALS['phpgw']->template->set_var('lang_use_shortcuts',lang('Use shortcuts?')); 
    223257        $GLOBALS['phpgw']->template->set_var('lang_auto_save_draft',lang('Auto save draft')); 
Note: See TracChangeset for help on using the changeset viewer.