Commit 7e08e2ffb2a5f84b4f555fd94d3ce0f3ada83f25

Authored by Caroline Salib
1 parent 5ab06046
Exists in master

Ajustado problema ao carregar tabelas e salvar CEP;

portabilis/ieducar#167
ieducar/intranet/include/clsCampos.inc.php
... ... @@ -1102,7 +1102,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1102 1102 $campo_tabela = FALSE;
1103 1103  
1104 1104 // Cria nova tab
1105   - if (preg_match("^(tabbed_add_[0-9]+)", $nome) === 1) {
  1105 + if (preg_match("/^(tabbed_add_[0-9]+)/i", $nome) === 1) {
1106 1106 $nomes_tab = urlencode(serialize($arr_campos['cabecalho_tab']));
1107 1107 unset($arr_campos['cabecalho_tab']);
1108 1108  
... ... @@ -1135,7 +1135,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1135 1135 continue;
1136 1136 }
1137 1137  
1138   - if (preg_match("^(tab_name_[0-9]+)", $nome) === 1) {
  1138 + if (preg_match("/^(tab_name_[0-9]+)/i", $nome) === 1) {
1139 1139 if ($existe_tab_aberta) {
1140 1140 if ($this->__segue_fluxo) {
1141 1141 $colspan = 2;
... ... @@ -1210,7 +1210,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1210 1210 continue;
1211 1211 }
1212 1212  
1213   - if (preg_match("^(tab_add_[0-9]+)",$nome) === 1) {
  1213 + if (preg_match("/^(tab_add_[0-9]+)/i",$nome) === 1) {
1214 1214 $campo_tabela = TRUE;
1215 1215 $javascript = '';
1216 1216  
... ...
ieducar/intranet/include/funcoes.inc.php
... ... @@ -67,7 +67,7 @@ function calculoIdade($diaNasc, $mesNasc, $anoNasc)
67 67 function idFederal2int($str)
68 68 {
69 69 $id_federal = str_replace(".", "", str_replace("-", "", str_replace("/", "", $str)));
70   - return preg_replace("^0+", "", $id_federal);
  70 + return preg_replace("/^0+/", "", $id_federal);
71 71 }
72 72  
73 73 function int2CPF($int)
... ... @@ -917,4 +917,4 @@ function girarTextoImagem($texto, $tamanho = 8, $altura = 130)
917 917 imagepng($imagem, "tmp/{$texto}.png");
918 918  
919 919 return "tmp/{$texto}.png";
920   -}
921 920 \ No newline at end of file
  921 +}
... ...