Commit e72fa2634e54038b6f38ca2dd453a6a715946419
1 parent
d6626220
Exists in
master
Removido código desnecessário (condição nunca satisfeita).
Showing
1 changed file
with
1 additions
and
22 deletions
Show diff stats
ieducar/intranet/educar_serie_xml.php
| ... | ... | @@ -25,8 +25,6 @@ |
| 25 | 25 | * @license @@license@@ |
| 26 | 26 | * @package iEd_Pmieducar |
| 27 | 27 | * @since Arquivo disponível desde a versão 1.0.0 |
| 28 | - * @todo As duas queries são idênticas, o parâmetro 'esc' nunca é usado. | |
| 29 | - * Verificar e refatorar. | |
| 30 | 28 | * @version $Id$ |
| 31 | 29 | */ |
| 32 | 30 | |
| ... | ... | @@ -37,7 +35,7 @@ require_once 'include/funcoes.inc.php'; |
| 37 | 35 | |
| 38 | 36 | echo "<?xml version=\"1.0\" encoding=\"ISO-8859-15\"?>\n<query xmlns=\"sugestoes\">\n"; |
| 39 | 37 | |
| 40 | -if (is_numeric($_GET['esc']) && is_numeric($_GET['cur'])) | |
| 38 | +if (isset($_GET['cur']) && is_numeric($_GET['cur'])) | |
| 41 | 39 | { |
| 42 | 40 | $db = new clsBanco(); |
| 43 | 41 | $db->Consulta(sprintf('SELECT |
| ... | ... | @@ -56,24 +54,5 @@ if (is_numeric($_GET['esc']) && is_numeric($_GET['cur'])) |
| 56 | 54 | print sprintf(' <serie cod_serie="%d">%s</serie>%s', $cod, $nome, PHP_EOL); |
| 57 | 55 | } |
| 58 | 56 | } |
| 59 | -elseif (is_numeric($_GET['cur'])) | |
| 60 | -{ | |
| 61 | - $db = new clsBanco(); | |
| 62 | - $db->Consulta(sprintf('SELECT | |
| 63 | - cod_serie, nm_serie | |
| 64 | - FROM | |
| 65 | - pmieducar.serie | |
| 66 | - WHERE | |
| 67 | - ref_cod_curso = %d AND ativo = 1 | |
| 68 | - ORDER BY | |
| 69 | - nm_serie ASC', $_GET["cur"] | |
| 70 | - )); | |
| 71 | - | |
| 72 | - while ($db->ProximoRegistro()) | |
| 73 | - { | |
| 74 | - list($cod, $nome) = $db->Tupla(); | |
| 75 | - print sprintf(' <serie cod_serie="%d">%s</serie>%s', $cod, $nome, PHP_EOL); | |
| 76 | - } | |
| 77 | -} | |
| 78 | 57 | |
| 79 | 58 | echo '</query>'; | ... | ... |