Changeset 5988


Ignore:
Timestamp:
04/20/12 18:13:08 (12 years ago)
Author:
marcieli
Message:

Ticket #2633 - Concluído: Inserir validação de limite de marcadores no Administrador.

Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/class.uiconfig.inc.php

    r5875 r5988  
    334334 
    335335                        $GLOBALS['phpgw']->hooks->single('config',$appname); 
    336  
     336                         
    337337                        /* Seta o valor padrão para a configuração de número máximo de marcadores */ 
    338338                        $current_config['expressoMail_limit_labels'] = (isset($current_config['expressoMail_limit_labels']) && !!$current_config['expressoMail_limit_labels'] ) ? $current_config['expressoMail_limit_labels'] : 20; 
     339                        /* Recupera o número mínimo de marcadores que pode ser definido */ 
     340                        $db = ''; 
     341                        $db = $db ? $db : $GLOBALS['phpgw']->db;        // this is to allow setup to set the db 
     342                        $db->query("SELECT max(slot) as slot from expressomail_label",__LINE__,__FILE__); 
     343                        while( $db->next_record() ) 
     344                        { 
     345                                $cont_labels = $db->f('slot'); 
     346                        } 
    339347 
    340348                        foreach($vars as $value) 
     
    410418                        } 
    411419 
     420                        $t->set_var('min_labels',$cont_labels); 
     421                         
    412422                        $t->pfp('out','body'); 
    413423 
  • trunk/admin/setup/phpgw_pt-br.lang

    r5875 r5988  
    563563day(s)  admin   pt-br   dia(s) 
    564564Number max of labels    admin   pt-br   Número máximo de marcadores 
     565There are users with an quantity greater than of markers. Respect the minimum number indicated. admin   pt-br   Existem usuários com uma quantidade superior de marcadores. Respeito o número mínimo indicado. 
     566Minimum number of labels allowed        admin   pt-br   Número mínimo de marcadores permitido 
  • trunk/expressoMail1_2/setup/default_records.inc.php

    r5982 r5988  
    1111                        /* Seta o valor padrão para a configuração de número máximo de marcadores */ 
    1212                        $oProc->query("INSERT INTO phpgw_config(config_app, config_name, config_value) VALUES ('expressoMail1_2', 'expressoMail_limit_labels', 20);"); 
     13                         
     14                        /* Registra o hook de validação do administrador*/ 
     15                        $oProc->query("INSERT INTO phpgw_hooks( \"hook_appname\", \"hook_location\", \"hook_filename\") VALUES ('expressoMail1_2', 'config_validate', 'hook_config_validate.inc.php')"); 
     16 
    1317                 
    1418?> 
  • trunk/expressoMail1_2/setup/setup.inc.php

    r5981 r5988  
    1313$setup_info['expressoMail1_2']['name'] = 'expressoMail1_2'; 
    1414$setup_info['expressoMail1_2']['title'] = 'Expresso Mail'; 
    15 $setup_info['expressoMail1_2']['version'] = '2.4.5'; 
     15$setup_info['expressoMail1_2']['version'] = '2.4.6'; 
    1616$setup_info['expressoMail1_2']['app_order'] = 2; 
    1717$setup_info['expressoMail1_2']['tables'][] = 'phpgw_expressomail_contacts'; 
  • trunk/expressoMail1_2/setup/tables_update.inc.php

    r5982 r5988  
    196196                        $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Don''t forward');"); 
    197197                        $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Don''t answer');"); 
    198                          
    199                         /* Seta o valor padrão para a configuração de número máximo de marcadores */ 
    200                         $oProc->query("INSERT INTO phpgw_config(config_app, config_name, config_value) VALUES ('expressoMail1_2', 'expressoMail_limit_labels', 20);"); 
     198 
    201199                                                 
    202200                $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.1'; 
     
    254252        } 
    255253         
     254                $test[] = '2.4.5'; 
     255        function expressoMail1_2_upgrade2_4_5() { 
     256                $oProc = $GLOBALS['phpgw_setup']->oProc; 
     257                /* Seta o valor padrão para a configuração de número máximo de marcadores */ 
     258                $oProc->query("INSERT INTO phpgw_config(config_app, config_name, config_value) VALUES ('expressoMail1_2', 'expressoMail_limit_labels', 20);"); 
     259                /* Registra o hook de validação do administrador*/ 
     260                $oProc->query("INSERT INTO phpgw_hooks( \"hook_appname\", \"hook_location\", \"hook_filename\") VALUES ('expressoMail1_2', 'config_validate', 'hook_config_validate.inc.php')"); 
     261 
     262            $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.6'; 
     263            return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 
     264        } 
     265         
    256266?> 
  • trunk/expressoMail1_2/templates/default/config.tpl

    r5875 r5988  
    2727    <td colspan="2"><font color="{th_text}">&nbsp;<b>{title}</b></font></td> 
    2828   </tr> 
     29        <tr bgcolor="{th_err}"> 
     30                <td colspan="2"><b>{error}</b></td> 
     31        </tr> 
    2932<!-- END header --> 
    3033<!-- BEGIN body --> 
     
    160163                <td>{lang_Number_max_of_labels}</td> 
    161164                <td> 
    162                 <input type="text" name="newsettings[expressoMail_limit_labels]" value="{value_expressoMail_limit_labels}" size="3" />  
     165                <input type="text" name="newsettings[expressoMail_limit_labels]" value="{value_expressoMail_limit_labels}" size="3" /> 
     166                <span style="color: red;margin-left: 30px"> *{lang_Minimum number of labels allowed} {min_labels}</span>                 
    163167                </td> 
    164168        </tr> 
Note: See TracChangeset for help on using the changeset viewer.