Changeset 5934 for trunk/reports


Ignore:
Timestamp:
04/12/12 15:18:08 (12 years ago)
Author:
marcosw
Message:

Ticket #2398 - Compatibilizacao com PHP-5.3 em alguns módulos do expresso

Location:
trunk/reports/inc
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/reports/inc/class.uireports_cota.inc.php

    r5291 r5934  
    101101                        // Save query 
    102102                        $varorganizacao = explode(",",$contextsdn); 
    103                         $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 
    104                         $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 
     103                        $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 
     104                        $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 
    105105                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 
    106106 
     
    137137                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector))) 
    138138                                                { 
    139                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 
    140                                                         $sectorok = trim(strtoupper(ereg_replace("DC=","",$sectorok))); 
     139                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/',"",$sector))); 
     140                                                        $sectorok = trim(strtoupper(preg_replace('/DC=/',"",$sectorok))); 
    141141                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 
    142142                                                } 
     
    205205                { 
    206206                        $grouplist = trim($_POST[setor]); 
    207                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     207                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    208208                        $organizacao = trim($_POST[organizacao]); 
    209209                        $setordn = trim($_POST[setordn]); 
     
    514514 
    515515                        $grouplist = trim($_POST[setor]); 
    516                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     516                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    517517 
    518518                        $setordn = trim($_POST[setordn]); 
  • trunk/reports/inc/class.uireports_logon.inc.php

    r5291 r5934  
    6767 
    6868                        $grouplist = trim($_POST[setor]); 
    69                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     69                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    7070 
    7171                        $setordn = trim($_POST[setordn]); 
     
    286286                        // Save query 
    287287                        $varorganizacao = explode(",",$contextsdn); 
    288                         $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 
    289                         $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 
     288                        $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 
     289                        $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 
    290290                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 
    291291 
     
    329329                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector))) 
    330330                                                { 
    331                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 
    332                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 
     331                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 
     332                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 
    333333                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 
    334334                                                } 
     
    403403 
    404404                        $grouplist = trim($_POST[setor]); 
    405                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     405                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    406406                        $organizacao = trim($_POST[organizacao]); 
    407407                        $setordn = trim($_POST[setordn]); 
  • trunk/reports/inc/class.uireports_maillists.inc.php

    r5291 r5934  
    6666 
    6767                        $grouplist = trim($_POST[setor]); 
    68                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     68                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    6969 
    7070                        $setordn = trim($_POST[setordn]); 
     
    192192                        // Save query 
    193193                        $varorganizacao = explode(",",$contextsdn); 
    194                         $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 
    195                         $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 
     194                        $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 
     195                        $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 
    196196                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 
    197197 
     
    235235                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector))) 
    236236                                                { 
    237                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 
    238                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 
     237                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 
     238                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 
    239239                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 
    240240                                                } 
     
    301301                { 
    302302                        $grouplist = trim($_POST[setor]); 
    303                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     303                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    304304                        $organizacao = trim($_POST[organizacao]); 
    305305                        $setordn = trim($_POST[setordn]); 
  • trunk/reports/inc/class.uireports_users.inc.php

    r5291 r5934  
    6666 
    6767                        $grouplist = trim($_POST[setor]); 
    68                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     68                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    6969 
    7070                        $setordn = trim($_POST[setordn]); 
     
    211211                        // Save query 
    212212                        $varorganizacao = explode(",",$contextsdn); 
    213                         $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 
    214                         $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 
     213                        $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 
     214                        $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 
    215215                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 
    216216 
     
    254254                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector))) 
    255255                                                { 
    256                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 
    257                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 
     256                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 
     257                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 
    258258                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 
    259259                                                } 
     
    320320                { 
    321321                        $grouplist = trim($_POST[setor]); 
    322                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     322                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    323323                        $organizacao = trim($_POST[organizacao]); 
    324324                        $setordn = trim($_POST[setordn]); 
  • trunk/reports/inc/class.uireports_usersgroups.inc.php

    r5291 r5934  
    6666 
    6767                        $grouplist = trim($_POST[setor]); 
    68                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     68                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    6969 
    7070                        $setordn = trim($_POST[setordn]); 
     
    189189                        // Save query 
    190190                        $varorganizacao = explode(",",$contextsdn); 
    191                         $varorganizacao_nome = trim(strtoupper(ereg_replace("ou=","",$varorganizacao[0]))); 
    192                         $varorganizacao_nome = trim(strtoupper(ereg_replace("DC=","",$varorganizacao_nome))); 
     191                        $varorganizacao_nome = trim(strtoupper(preg_replace('/ou=/','',$varorganizacao[0]))); 
     192                        $varorganizacao_nome = trim(strtoupper(preg_replace('/DC=/','',$varorganizacao_nome))); 
    193193                        $user_logon = $GLOBALS['phpgw_info']['user'][account_lid]; 
    194194 
     
    232232                                                if ( trim(strtoupper($varorganizacao_nome)) !=  trim(strtoupper($sector))) 
    233233                                                { 
    234                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sector))); 
    235                                                         $sectorok = trim(strtoupper(ereg_replace("dc=","",$sectorok))); 
     234                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sector))); 
     235                                                        $sectorok = trim(strtoupper(preg_replace('/dc=/','',$sectorok))); 
    236236                                                        $sector_options .= "<option value='" . $sectordn . "'>". $sectorok . "</option>"; 
    237237                                                } 
     
    298298                { 
    299299                        $grouplist = trim($_POST[setor]); 
    300                         $grouplist = trim(ereg_replace("-","",$grouplist)); 
     300                        $grouplist = trim(preg_replace('/-/','',$grouplist)); 
    301301                        $organizacao = trim($_POST[organizacao]); 
    302302                        $setordn = trim($_POST[setordn]); 
Note: See TracChangeset for help on using the changeset viewer.