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,7 +1102,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1102 $campo_tabela = FALSE; 1102 $campo_tabela = FALSE;
1103 1103
1104 // Cria nova tab 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 $nomes_tab = urlencode(serialize($arr_campos['cabecalho_tab'])); 1106 $nomes_tab = urlencode(serialize($arr_campos['cabecalho_tab']));
1107 unset($arr_campos['cabecalho_tab']); 1107 unset($arr_campos['cabecalho_tab']);
1108 1108
@@ -1135,7 +1135,7 @@ class clsCampos extends Core_Controller_Page_Abstract @@ -1135,7 +1135,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1135 continue; 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 if ($existe_tab_aberta) { 1139 if ($existe_tab_aberta) {
1140 if ($this->__segue_fluxo) { 1140 if ($this->__segue_fluxo) {
1141 $colspan = 2; 1141 $colspan = 2;
@@ -1210,7 +1210,7 @@ class clsCampos extends Core_Controller_Page_Abstract @@ -1210,7 +1210,7 @@ class clsCampos extends Core_Controller_Page_Abstract
1210 continue; 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 $campo_tabela = TRUE; 1214 $campo_tabela = TRUE;
1215 $javascript = ''; 1215 $javascript = '';
1216 1216
ieducar/intranet/include/funcoes.inc.php
@@ -67,7 +67,7 @@ function calculoIdade($diaNasc, $mesNasc, $anoNasc) @@ -67,7 +67,7 @@ function calculoIdade($diaNasc, $mesNasc, $anoNasc)
67 function idFederal2int($str) 67 function idFederal2int($str)
68 { 68 {
69 $id_federal = str_replace(".", "", str_replace("-", "", str_replace("/", "", $str))); 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 function int2CPF($int) 73 function int2CPF($int)
@@ -917,4 +917,4 @@ function girarTextoImagem($texto, $tamanho = 8, $altura = 130) @@ -917,4 +917,4 @@ function girarTextoImagem($texto, $tamanho = 8, $altura = 130)
917 imagepng($imagem, "tmp/{$texto}.png"); 917 imagepng($imagem, "tmp/{$texto}.png");
918 918
919 return "tmp/{$texto}.png"; 919 return "tmp/{$texto}.png";
920 -}  
921 \ No newline at end of file 920 \ No newline at end of file
  921 +}