From e97986cb5cec35979641ba37c35d09beb4ba358c Mon Sep 17 00:00:00 2001 From: Eriksen Costa Paixão Date: Thu, 3 Sep 2009 06:15:47 +0000 Subject: [PATCH] #42 by Eriksen: Corrigido bug de bloqueio de acesso indevido (código da permissão estava incorreto nos arquivos referidos) --- ieducar/intranet/educar_relatorio_registro_transferencias.php | 2 +- ieducar/intranet/educar_relatorio_registro_transferencias_proc.php | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ieducar/intranet/educar_relatorio_registro_transferencias.php b/ieducar/intranet/educar_relatorio_registro_transferencias.php index 1bc325f..3c0aaba 100644 --- a/ieducar/intranet/educar_relatorio_registro_transferencias.php +++ b/ieducar/intranet/educar_relatorio_registro_transferencias.php @@ -42,7 +42,7 @@ class clsIndexBase extends clsBase function Formular() { $this->SetTitulo($this->_instituicao . ' i-Educar - Registro de Matrículas'); - $this->processoAp = '693'; + $this->processoAp = '916'; } } diff --git a/ieducar/intranet/educar_relatorio_registro_transferencias_proc.php b/ieducar/intranet/educar_relatorio_registro_transferencias_proc.php index b62896a..cbb816f 100644 --- a/ieducar/intranet/educar_relatorio_registro_transferencias_proc.php +++ b/ieducar/intranet/educar_relatorio_registro_transferencias_proc.php @@ -28,6 +28,7 @@ * @subpackage SolicitacaoTransferencia * @subpackage Relatorio * @since Arquivo disponível desde a versão 1.0.0 + * @todo Refatorar o uso do objeto CoreExt_Config, talvez criando um {@link http://martinfowler.com/eaaCatalog/layerSupertype.html Layer Supertype} * @version $Id$ */ @@ -89,6 +90,15 @@ class indice extends clsCadastro function renderHTML() { + /** + * Variável global com objetos do CoreExt. + * @see includes/bootstrap.php + */ + global $coreExt; + + // Namespace de configuração para localização de interface + $uf = $coreExt['Config']->app->locale->province; + $this->ref_cod_instituicao = $_POST['ref_cod_instituicao']; $this->ref_cod_escola = $_POST['ref_cod_escola']; $this->ano = $_POST['ano']; @@ -171,7 +181,8 @@ class indice extends clsCadastro $this->total++; } - $this->pdf = new clsPDF("Registro de Matrículas - {$this->ano}", "Registro de Matrículas", "A4", "", false, false); + $this->pdf = new clsPDF('Registro de Matrículas - ' . $this->ano, + 'Registro de Matrículas', 'A4', '', FALSE, FALSE); $obj_instituicao = new clsPmieducarInstituicao(); $this->pdf->largura = 842.0; @@ -233,7 +244,10 @@ class indice extends clsCadastro $this->pdf->linha_relativa($esquerda + 757, $altura, 0, 18); - $this->pdf->escreve_relativo(empty($estabelecimento_destino) ? '' : 'SC', + // Coloca o UF configurado em ieducar.ini caso exista um estabelecimento destino, + // supondo que todos os estabelecimentos estejam no mesmo estado. + // @todo Para suportar multi-instituições, deve pegar a informação dos dados da escola destino. + $this->pdf->escreve_relativo(empty($estabelecimento_destino) ? '' : $uf, $esquerda + 763, $altura + $altura_escrita, 50, 30, $fonte, $tam_texto); $this->pdf->linha_relativa($esquerda + 782, $altura, 0, 18); @@ -288,7 +302,7 @@ class indice extends clsCadastro } else { echo ' - '; @@ -298,7 +312,7 @@ class indice extends clsCadastro } else { echo ' - '; -- libgit2 0.21.2