Changeset 5593
- Timestamp:
- 03/01/12 10:37:23 (12 years ago)
- Location:
- trunk/expressoAdmin1_2/inc
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.bomessages_size.inc.php
r5144 r5593 78 78 } 79 79 /* Verifica se esse valor é um número */ 80 if((! eregi("^[0-9]+$", $params['max_messages_size'])))80 if((!preg_match("/^[0-9]+$/i", $params['max_messages_size']))) 81 81 { 82 82 $result['status'] = false; … … 178 178 } 179 179 /* Verifica se esse valor é um número */ 180 if((! eregi("^[0-9]+$", $params['max_messages_size'])))180 if((!preg_match('/^[0-9]+$/i', $params['max_messages_size']))) 181 181 { 182 182 $result['status'] = false; -
trunk/expressoAdmin1_2/inc/class.db_functions.inc.php
r5509 r5593 55 55 } 56 56 57 $all_contexts = split("%", $context);57 $all_contexts = preg_split('/%/', $context); 58 58 foreach ($all_contexts as $index=>$context) 59 59 { -
trunk/expressoAdmin1_2/inc/class.functions.inc.php
r5133 r5593 512 512 $array_dn = ldap_explode_dn($context, 1 ); 513 513 foreach($array_dn as $key=>$value){ 514 $array_dn[$key]=preg_replace( "/\\\([0-9A-Fa-f]{2})/e", "''.chr(hexdec('\\1')).''",$value);514 $array_dn[$key]=preg_replace('/\\\([0-9A-Fa-f]{2})/e', "''.chr(hexdec('\\1')).''",$value); 515 515 } 516 516 … … 725 725 726 726 /* formato do CPF */ 727 if (!( ereg("^[0-9]{3}[.][0-9]{3}[.][0-9]{3}[-][0-9]{2}$",$cpf)))727 if (!(preg_match('/^[0-9]{3}[.][0-9]{3}[.][0-9]{3}[-][0-9]{2}$/',$cpf))) 728 728 return false; 729 729 … … 732 732 733 733 /*Retorna falso se houver letras no cpf */ 734 if (!( ereg("[0-9]",$cpf)))734 if (!(preg_match('/[0-9]/',$cpf))) 735 735 return false; 736 736 … … 772 772 function make_lang($ram_lang) 773 773 { 774 $a_lang = split("_", $ram_lang);774 $a_lang = preg_split('/_/', $ram_lang); 775 775 $a_lang_reverse = array_reverse ( $a_lang, true ); 776 776 array_pop ( $a_lang_reverse ); -
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r5509 r5593 131 131 } 132 132 133 if (! eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $params['mail']) )133 if (! preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/i', $params['mail']) ) 134 134 { 135 135 $result['status'] = false; … … 235 235 } 236 236 237 if (! eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $params['mail']) )237 if (! preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/i', $params['mail']) ) 238 238 { 239 239 $result['status'] = false; … … 338 338 } 339 339 340 if (! eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $params['mail']) )340 if (! preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/i', $params['mail']) ) 341 341 { 342 342 $result['status'] = false; … … 461 461 } 462 462 463 if (! eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$", $params['mail']) )463 if (! preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/i', $params['mail']) ) 464 464 { 465 465 $result['status'] = false; … … 656 656 { 657 657 //Obtenho UID sem a organização. Na criação o uid já vem sem a organização 658 $tmp_uid_without_org = split("-", $params['uid']);658 $tmp_uid_without_org = preg_split('/-/', $params['uid']); 659 659 $tmp_reverse_uid_without_org = array_reverse($tmp_uid_without_org); 660 660 array_pop($tmp_reverse_uid_without_org); … … 671 671 { 672 672 //Obtenho UID sem a organização. Na criação o uid já vem sem a organização 673 $tmp_uid_without_org = split("-", $params['uid']);673 $tmp_uid_without_org = preg_split('/-/', $params['uid']); 674 674 $tmp_reverse_uid_without_org = array_reverse($tmp_uid_without_org); 675 675 array_pop($tmp_reverse_uid_without_org); … … 724 724 //Obtenho UID sem a organização 725 725 /* 726 $tmp_uid_without_org = split("-", $params['uid']);726 $tmp_uid_without_org = preg_split('/-/', $params['uid']); 727 727 if (count($tmp_uid_without_org) < 2) 728 728 { … … 2666 2666 else 2667 2667 { 2668 $tmp_user_context = split(",", utf8_decode($entrie[0]['dn']));2668 $tmp_user_context = preg_split('/,/', utf8_decode($entrie[0]['dn'])); 2669 2669 $tmp_reverse_user_context = array_reverse($tmp_user_context); 2670 2670 array_pop($tmp_reverse_user_context); … … 2760 2760 else 2761 2761 { 2762 $tmp_user_context = split(",", $entrie[0]['dn']);2762 $tmp_user_context = preg_split('/,/', $entrie[0]['dn']); 2763 2763 $tmp_reverse_user_context = array_reverse($tmp_user_context); 2764 2764 array_pop($tmp_reverse_user_context); -
trunk/expressoAdmin1_2/inc/class.manager.inc.php
r5133 r5593 74 74 $return['status'] = 'true'; 75 75 76 $contexts = split("%", $params['contexts']);76 $contexts = preg_split('/%/', $params['contexts']); 77 77 $manager_lid = $params['manager_lid']; 78 78 $type = $params['type']; -
trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
r5220 r5593 132 132 { 133 133 // limit query to limit characters 134 if( eregi('^[a-z_0-9_-].+$',$_POST['query']))134 if(preg_match('/^[a-z_0-9_-].+$/i',$_POST['query'])) 135 135 { 136 136 $GLOBALS['query'] = $_POST['query']; -
trunk/expressoAdmin1_2/inc/class.uicomputers.inc.php
r414 r5593 67 67 { 68 68 // limit query to limit characters 69 if( eregi('^[a-z_0-9_-].+$',$_POST['query']))69 if(preg_match('/^[a-z_0-9_-].+$/i',$_POST['query'])) 70 70 { 71 71 $GLOBALS['query'] = $_POST['query']; -
trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
r5133 r5593 68 68 { 69 69 // limit query to limit characters 70 if( eregi('^[a-z_0-9_-].+$',$_POST['query']))70 if(preg_match('/^[a-z_0-9_-].+$/i',$_POST['query'])) 71 71 $GLOBALS['query'] = $_POST['query']; 72 72 } -
trunk/expressoAdmin1_2/inc/class.uilogs.inc.php
r414 r5593 125 125 126 126 //Date treatment 127 $a_date = split(" ", $log['date']);128 $a_day = split("-", $a_date[0]);127 $a_date = preg_split('/ /', $log['date']); 128 $a_day = preg_split('/-/', $a_date[0]); 129 129 $a_day_tmp = array_reverse($a_day); 130 130 $a_day = join($a_day_tmp, "/"); 131 $a_hour = split("\.", $a_date[1]);131 $a_hour = preg_split('/\./', $a_date[1]); 132 132 133 133 $var = array( -
trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php
r5133 r5593 64 64 { 65 65 // limit query to limit characters 66 if( eregi('^[a-z_0-9_%-].+$',$_POST['query']))66 if(preg_match('/^[a-z_0-9_%-].+$/i',$_POST['query'])) 67 67 $GLOBALS['query'] = $_POST['query']; 68 68 } -
trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php
r5133 r5593 102 102 { 103 103 $managers_context = ""; 104 $a_managers_context = split("%", $array_managers['context']);104 $a_managers_context = preg_split('/%/', $array_managers['context']); 105 105 106 106 foreach ($a_managers_context as $context) … … 156 156 if ($_POST['context']) 157 157 { 158 $contexts = split("%", $_POST['context']);158 $contexts = preg_split('/%/', $_POST['context']); 159 159 foreach ($contexts as $manager_context) 160 160 $input_context_fields .= "<input type='text' size=60 value=$manager_context></input><br>"; … … 292 292 $applications_list = $this->make_app_list($manager[0]['apps']); 293 293 294 $a_context = split("%", $_POST['context']);294 $a_context = preg_split('/%/', $_POST['context']); 295 295 foreach ($a_context as $context) 296 296 $input_context_fields .= '<div><input disabled type="text" value="'.$context.'" size=60></input><span onclick="this.parentNode.parentNode.removeChild(this.parentNode);" style="cursor:pointer"> -</span></div>'; … … 346 346 function make_lang($ram_lang) 347 347 { 348 $a_lang = split("_", $ram_lang);348 $a_lang = preg_split('/_/', $ram_lang); 349 349 $a_lang_reverse = array_reverse ( $a_lang, true ); 350 350 //Retira o lang do array. -
trunk/expressoAdmin1_2/inc/class.user.inc.php
r5133 r5593 1072 1072 $sk = fsockopen ($imap_server,$imap_port); 1073 1073 $server_resp = fread($sk, 100); 1074 $tmp = split('v2.', $server_resp);1074 $tmp = preg_split('/v2./', $server_resp); 1075 1075 $cyrus_version = '2' . $tmp[1][0]; 1076 1076 -
trunk/expressoAdmin1_2/inc/sieve-php.lib.php
r506 r5593 121 121 122 122 $this->line=fgets($this->fp,1024); 123 $this->token = split(" ", $this->line, 2);123 $this->token = preg_split('/ /', $this->line, 2); 124 124 125 125 if($this->token[0] == "NO"){ … … 127 127 NO ("yyyyy") "zzzzzzz" or, two, NO {yyyyy} "zzzzzzzzzzz" */ 128 128 $this->x = 0; 129 list($this->ltoken, $this->mtoken, $this->rtoken) = split(" ", $this->line." ", 3);129 list($this->ltoken, $this->mtoken, $this->rtoken) = preg_split('/ /', $this->line." ", 3); 130 130 if($this->mtoken[0] == "{"){ 131 131 while($this->mtoken[$this->x] != "}" or $this->err_len < 1){ … … 372 372 //So, if we see IMLEMENTATION in the first line, then we are done. 373 373 374 if( ereg("IMPLEMENTATION",$this->line))374 if(preg_match('/IMPLEMENTATION/',$this->line)) 375 375 { 376 376 //we're on the Cyrus V2 sieve server … … 389 389 $this->cap_type="auth"; 390 390 391 $this->modules = split(" ", $this->item[1]);391 $this->modules = preg_split('/ /', $this->item[1]); 392 392 if(is_array($this->modules)){ 393 393 foreach($this->modules as $this->module) … … 422 422 423 423 //then split again at the ", " stuff. 424 $this->modules = split($this->modules, ", ");424 $this->modules = preg_split("/$this->modules/", ', '); 425 425 426 426 //fill up our $this->modules property … … 767 767 //So, if we see IMLEMENTATION in the first line, then we are done. 768 768 769 if( ereg("IMPLEMENTATION",$this->line))769 if(preg_match('/IMPLEMENTATION/',$this->line)) 770 770 { 771 771 //we're on the Cyrus V2 sieve server … … 784 784 $this->cap_type="auth"; 785 785 786 $this->modules = split(" ", $this->item[1]);786 $this->modules = preg_split('/ /', $this->item[1]); 787 787 if(is_array($this->modules)){ 788 788 foreach($this->modules as $this->module) … … 814 814 815 815 //then split again at the ", " stuff. 816 $this->modules = split($this->modules, ", ");816 $this->modules = preg_split("/$this->modules/", ', '); 817 817 818 818 //fill up our $this->modules property
Note: See TracChangeset
for help on using the changeset viewer.