From: stronk7 Date: Sun, 9 Apr 2006 10:59:39 +0000 (+0000) Subject: Solve some upperpivot notices and wrong behaviours. More coming... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=30691fc3c3a0ae99d37fa244b1805ded492fd41f;p=moodle.git Solve some upperpivot notices and wrong behaviours. More coming... --- 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