Commit 53ead5fd816456509965a4296b4455e4383f700d

Authored by Greyce Medeiros
Committed by Leandro Arndt
1 parent 27ee934c
Exists in mysqli

Alteraco dos arquivos solicitacao.class.php e funcoes.php para a correcao da extensao de arquivos

Showing 2 changed files with 12 additions and 0 deletions   Show diff stats
class/solicitacao.class.php
... ... @@ -881,6 +881,11 @@ class Solicitacao {
881 881 }
882 882 }
883 883 }
  884 +
  885 + $ext = getExtensaoArquivo($arquivo['name']);
  886 +
  887 + $fullArquivo = "lda_".$idsolicitacao."_mov_".$idmovimentacao.".".$ext;
  888 + ?>
884 889  
885 890 //se o status da demanda for "aberto" altera para "em tramitação"
886 891 if($status == "A")
... ...
inc/funcoes.php
... ... @@ -189,6 +189,13 @@ function validaTipoArquivo($mime, $extensoes)
189 189  
190 190 }
191 191  
  192 +
  193 +
  194 +function getExtensaoArquivo($nomearquivo){
  195 + $aux = explode(".",$nomearquivo);
  196 + return $aux[sizeof($aux)-1];
  197 + }
  198 +
192 199 /*
193 200 * Smarty plugin
194 201 * -------------------------------------------------------------
... ...