From ae078733301c542f4e3fdd99e0c350afb40e057f Mon Sep 17 00:00:00 2001
From: willcast <willcast>
Date: Fri, 21 Nov 2003 03:33:21 +0000
Subject: [PATCH] - Removing some Notices.. Thanks to Eloy for leting me know!

---
 mod/glossary/dynalink.php | 1 +
 mod/glossary/lib.php      | 7 ++++++-
 mod/glossary/sql.php      | 1 +
 mod/glossary/tabs.html    | 4 ++--
 mod/glossary/view.php     | 1 +
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/mod/glossary/dynalink.php b/mod/glossary/dynalink.php
index c6aa521be6..fc6c3faef4 100644
--- a/mod/glossary/dynalink.php
+++ b/mod/glossary/dynalink.php
@@ -47,6 +47,7 @@
             if ( isset($concepts) ) {
                 $lastglossary = 0;
                 $lastcategory = 0;                
+                $cm = '';
                 foreach ( $concepts as $concept ) {
                     if ( $concept->category ) {
                         if ( $lastcategory != $concept->id ) {
diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php
index 8a86eb35d9..8a8be2f83a 100644
--- a/mod/glossary/lib.php
+++ b/mod/glossary/lib.php
@@ -1176,7 +1176,12 @@ global $CFG;
 
      $sicon     = '';
      $sneworder = '';
-     $stag      = '';
+
+     $sbtag      = '';
+     $fbtag      = '';
+     $fendbtag      = '';
+     $sendbtag      = '';
+
      $sendbtag  = '';
 
      if ( $sortkey == 'CREATION' or $sortkey == 'FIRSTNAME' ) {
diff --git a/mod/glossary/sql.php b/mod/glossary/sql.php
index 0694abb4ef..46b90b67ac 100644
--- a/mod/glossary/sql.php
+++ b/mod/glossary/sql.php
@@ -22,6 +22,7 @@
         $sqlsortkey = "timemodified";
     break;
     }
+    $sqlsortorder = $sortorder;
 
     $fullpivot = 1;
 
diff --git a/mod/glossary/tabs.html b/mod/glossary/tabs.html
index 32010b969a..c66f792238 100644
--- a/mod/glossary/tabs.html
+++ b/mod/glossary/tabs.html
@@ -101,8 +101,8 @@
         case GLOSSARY_STANDARD_VIEW:
         default:
             glossary_print_alphabet_menu($cm, $glossary, "letter", $hook, $sortkey, $sortorder);
-            if ($search) {
-                echo "<h3>$strsearch: $search</h3>";
+            if ($mode == 'search' and $hook) {
+                echo "<h3>$strsearch: $hook</h3>";
             } 
         break;
     } 
diff --git a/mod/glossary/view.php b/mod/glossary/view.php
index 54923090a5..458593c07b 100644
--- a/mod/glossary/view.php
+++ b/mod/glossary/view.php
@@ -240,6 +240,7 @@
 /// printing the entries
     $entriesshown = 0;
     $currentpivot = '';
+    $tableisopen = 0;
     if ( $hook == 'SPECIAL' ) {
         $alphabet = explode(",", get_string("alphabet"));
     }
-- 
2.39.5