From 30691fc3c3a0ae99d37fa244b1805ded492fd41f Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 9 Apr 2006 10:59:39 +0000 Subject: [PATCH] Solve some upperpivot notices and wrong behaviours. More coming... --- mod/glossary/print.php | 5 +++-- mod/glossary/view.php | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mod/glossary/print.php b/mod/glossary/print.php index 152f6cc49f..b4e4b32c8a 100644 --- a/mod/glossary/print.php +++ b/mod/glossary/print.php @@ -152,9 +152,10 @@ // Setting the pivot for the current entry $pivot = $entry->pivot; + $upperpivot = $textlib->strtoupper($pivot, current_charset()); + // Reduce pivot to 1cc if necessary if ( !$fullpivot ) { - $pivot = $textlib->substr($pivot, 0, 1, current_charset()); - $upperpivot = $textlib->strtoupper($pivot, current_charset()); + $upperpivot = $textlib->substr($upperpivot, 0, 1, current_charset()); } // If there's group break diff --git a/mod/glossary/view.php b/mod/glossary/view.php index bd88ef1c33..71362cd218 100644 --- a/mod/glossary/view.php +++ b/mod/glossary/view.php @@ -332,14 +332,15 @@ foreach ($allentries as $entry) { - /// Setting the pivot for the current entry + // Setting the pivot for the current entry $pivot = $entry->pivot; + $upperpivot = $textlib->strtoupper($pivot, current_charset()); + // Reduce pivot to 1cc if necessary if ( !$fullpivot ) { - $pivot = $textlib->substr($pivot, 0, 1, current_charset()); - $upperpivot = $textlib->strtoupper($pivot, current_charset()); + $upperpivot = $textlib->substr($upperpivot, 0, 1, current_charset()); } - /// if there's a group break + // if there's a group break if ( $currentpivot != $upperpivot ) { // print the group break if apply -- 2.39.5