]> git.mjollnir.org Git - moodle.git/commitdiff
Solve some upperpivot notices and wrong behaviours. More coming...
authorstronk7 <stronk7>
Sun, 9 Apr 2006 10:59:39 +0000 (10:59 +0000)
committerstronk7 <stronk7>
Sun, 9 Apr 2006 10:59:39 +0000 (10:59 +0000)
mod/glossary/print.php
mod/glossary/view.php

index 152f6cc49f4584e3ab2e3c01528c6e58ec54e6fe..b4e4b32c8ac57f36473646c6fe93d50cef0f24b8 100644 (file)
 
             // 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
index bd88ef1c33311f74c80d51af7ce718e3e2fe0082..71362cd218e3be49cca399b2902255d22a650d62 100644 (file)
 
         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