]> git.mjollnir.org Git - moodle.git/commitdiff
merged from 1.9 :: Added the check, if all opend custom_corners are closed. This...
authorurs_hunkler <urs_hunkler>
Sun, 11 Nov 2007 15:04:34 +0000 (15:04 +0000)
committerurs_hunkler <urs_hunkler>
Sun, 11 Nov 2007 15:04:34 +0000 (15:04 +0000)
lib/custom_corners_lib.php

index 32d78c48657ea4e58946e72e545c9d5495cd4461..ccd4a5077228249f9b646d38119d1cef6b9e9cc6 100755 (executable)
@@ -61,6 +61,12 @@ function print_custom_corners_start($clearfix=false, $return=false, $idbase=null
 function print_custom_corners_end($return=false, $idbase=null) {
     global $THEME;
 
+    if ($THEME->customcornersopen <= 0) {
+       return '';
+    }
+    
+    $THEME->customcornersopen -= ($THEME->customcornersopen > 0) ? 1 : 0;
+    
 /// Analise if we want ids for the custom corner elements
     $idbb = '';
 
@@ -74,7 +80,6 @@ function print_custom_corners_end($return=false, $idbase=null) {
     $output .= '<div '.$idbb.'class="bb"><div>&nbsp;</div></div>'."\n";
     $output .= '</div>';
     
-    $THEME->customcornersopen -= ($THEME->customcornersopen > 0) ? 1 : 0;
     
     if ($return) {
         return $output;