]> git.mjollnir.org Git - moodle.git/commitdiff
No functional change, just me moodling
authormoodler <moodler>
Fri, 30 Jan 2004 07:29:08 +0000 (07:29 +0000)
committermoodler <moodler>
Fri, 30 Jan 2004 07:29:08 +0000 (07:29 +0000)
mod/glossary/showentry.php

index 81b02d5fb4a2592461de67f0cbf37197e26da6b1..fb889433407e20ad72a0efc586d089a0a5613465 100644 (file)
     }
 
 
-    if ( $eid ) {
-        $entries = get_records_sql("select e.* from {$CFG->prefix}glossary_entries e, {$CFG->prefix}glossary g".
-                                  " where (e.id = $eid)");
-    } elseif ( $concept ) {
+    if ($eid) {
+        $entries[] = get_record("glossary_entries", "id", $eid);
+
+    } else if ($concept) {
         $entries = get_records_sql("select e.* from {$CFG->prefix}glossary_entries e, {$CFG->prefix}glossary g".
                                   " where e.glossaryid = g.id and".
                                       " (e.casesensitive != 0 and ucase(concept) = '" . strtoupper(trim($concept)). "' or".
                                       " (g.course = $courseid or g.globalglossary) and".
                                       " e.usedynalink != 0 and g.usedynalink != 0");
     } 
-    if ( $entries ) {
+
+    if ($entries) {
         glossary_print_dynaentry($courseid, $entries, $displayformat);
     }    
     
     close_window_button();
-?>
-</body>
-</html>
 
+?>