Commit 5ab060466592788c974b87f2ab517d33e85397df

Authored by Caroline Salib
1 parent a26a21fa
Exists in master

Ajustado problema ao abrir listagem de escola;

portabilis/ieducar#167
Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
ieducar/intranet/educar_escola_lst.php
... ... @@ -97,7 +97,7 @@ class indice extends clsListagem
97 97 foreach( $_GET AS $var => $val ) // passa todos os valores obtidos no GET para atributos do objeto
98 98 $this->$var = ( $val === "" ) ? null: $val;
99 99  
100   -
  100 +
101 101  
102 102 $cabecalhos = array("Escola");
103 103 $nivel = $obj_permissoes->nivel_acesso($this->pessoa_logada);
... ... @@ -136,8 +136,12 @@ class indice extends clsListagem
136 136 // Filtros de Foreign Keys
137 137 $this->limite = 10;
138 138 $obj_escola = new clsPmieducarEscola();
139   - //$obj_escola->setOrderby( "nome ASC" );
140   - $obj_escola->setLimite( $this->limite, ( $this->pagina_formulario - 1 ) * $this->limite );
  139 +
  140 + if ($this->pagina_formulario){
  141 + $obj_escola->setLimite( $this->limite, ( $this->pagina_formulario - 1 ) * $this->limite );
  142 + } else {
  143 + $obj_escola->setLimite( $this->limite );
  144 + }
141 145  
142 146 $cod_escola = $obj_permissoes->getEscola($this->pessoa_logada);
143 147  
... ...