Commit b932f4771273ab789ebd29a02e8e7117b1d49350
Exists in
master
Merge branch 'master' into 'master'
Ajustado problema ao abrir listagem de escola Referente a issue #23 See merge request !30
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 | ... | ... |