Skip to content

Commit

Permalink
fix: Complementação de correção em falha no envio externo após modifi…
Browse files Browse the repository at this point in the history
…cação em sigla do sistema
  • Loading branch information
guilhermeadc committed Jan 26, 2023
1 parent 627a613 commit 48856df
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ root = true
[*.php]
indent_style = space
indent_size = 4
end_of_line = crlf
end_of_line = lf
insert_final_newline = true
charset = latin1
trim_trailing_whitespace = true
Expand Down
31 changes: 16 additions & 15 deletions src/rn/Editor3011RN.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?
/**
Criado a partir da classe EditorRN da versao 3.0.11
A modificacao nessa classe impediu gerar o documento exatamente da mesma forma que foi
A modificacao nessa classe impediu gerar o documento exatamente da mesma forma que foi
gerado originalmente (v3.0.11 gerava de uma forma e na v3.1.0 esta gerando diferente)
a diferenca esta no metodo consultarHtmlIdentificacaoVersao (uma gera sem link e na outra com link) que eh privado
desta forma n ha como herdar a classe e alterar somente ele
Expand Down Expand Up @@ -1632,9 +1632,10 @@ protected function consultarHtmlVersaoConectado($dados)
}

if($bolSiglaSistemaSUPER){
$pattern = '/<title>SUPER\/';
$replacement = "<title>SEI/";
$strTitulo = preg_replace($pattern, $replacement, $strTitulo);
$strSiglaSistema = ConfiguracaoSEI::getInstance()->getValor("SessaoSEI","SiglaSistema");
$strPadrao = ($strSiglaSistema === "SEI") ? '/^SEI\//' : '/^SUPER\//';
$strSubstituicao = ($strSiglaSistema === "SEI") ? "SUPER/" : "SEI/";
$strTitulo = preg_replace($strPadrao, $strSubstituicao, $strTitulo);
}

$strHtml = '';
Expand Down Expand Up @@ -2002,7 +2003,7 @@ protected function compararHtmlVersaoConectado(EditorDTO $parObjEditorDTO)

private function resetContadoresCss($strConteudoHtml,$arrClasses)
{
if(count($arrClasses)>1){
if(is_array($arrClasses) && count($arrClasses)>1){
$arrContadoresUsados=array();
$qtd=preg_match_all('/<p\w*\s*class="([^"]*)/',$strConteudoHtml,$arrMatches);
if ($qtd>0){
Expand Down Expand Up @@ -2938,7 +2939,7 @@ protected function recuperarLinkAcessoExternoControlado(DocumentoDTO $parObjDocu
}

}

private function montarTagsContato(ContatoDTO $objContatoDTO, $strTipo){

if ($objContatoDTO->getStrStaGenero()==ContatoRN::$TG_MASCULINO){
Expand Down Expand Up @@ -2981,7 +2982,7 @@ private function montarTagsContato(ContatoDTO $objContatoDTO, $strTipo){
}

$strTag = $objContatoDTO->getStrComplemento();
if ($strTag != '') {
if ($strTag != '') {
self::$arrTags['complemento_endereco_'.$strTipo] = $strTag;
}

Expand Down Expand Up @@ -3062,16 +3063,16 @@ private function montarTagsContato(ContatoDTO $objContatoDTO, $strTipo){
if (($strTag = $objContatoDTO->getStrTelefoneCelular())!=''){
self::$arrTags['telefone_celular_'.$strTipo] = $strTag;
}
}
public static function converterHTML($strConteudo){
return str_replace(array('°','º','ª','¹','²','³','£','¢','§','¬'),
array('&deg;','&ordm;','&ordf;','&sup1;','&sup2;','&sup3;','&pound;','&cent;','&sect;','&not;'),
InfraString::acentuarHTML($strConteudo));

}

public static function converterHTML($strConteudo){
return str_replace(array('°','º','ª','¹','²','³','£','¢','§','¬'),
array('&deg;','&ordm;','&ordf;','&sup1;','&sup2;','&sup3;','&pound;','&cent;','&sect;','&not;'),
InfraString::acentuarHTML($strConteudo));
}

private function montarCarimboPublicacao($strTextoPublicacao){
return '<div style="font-weight: 500; text-align: left; font-size: 9pt; border: 2px solid #777; position: absolute; left: 67%; padding: 4px;">' . nl2br($strTextoPublicacao) . '</div>';
}
}
}

0 comments on commit 48856df

Please sign in to comment.