]> git.mjollnir.org Git - moodle.git/commitdiff
'deleted old block width definition'
authorurs_hunkler <urs_hunkler>
Tue, 6 Feb 2007 20:18:45 +0000 (20:18 +0000)
committerurs_hunkler <urs_hunkler>
Tue, 6 Feb 2007 20:18:45 +0000 (20:18 +0000)
course/format/scorm/format.php
course/format/social/format.php
course/format/topics/format.php
course/format/weeks/format.php
index.php

index 2aa5a2e3997db0052e28e272c6c1fb9b910850f2..5827f1bb8c949a562fdb733ef3e68b12dd12fff3 100644 (file)
@@ -6,12 +6,6 @@
     $module = $course->format;
     require_once($CFG->dirroot.'/mod/'.$module.'/locallib.php');
 
-    // Bounds for block widths
-    // define('BLOCK_L_MIN_WIDTH', 100);
-    // define('BLOCK_L_MAX_WIDTH', 210);
-    // define('BLOCK_R_MIN_WIDTH', 100);
-    // define('BLOCK_R_MAX_WIDTH', 210);
-
     // Bounds for block widths
     // more flexible for theme designers taken from theme config.php
     $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width;
index 26b30e4b15149eff1c8203205b666f2021efdf7e..2b04117b1c5133b99087b64d48e8fa6c3c8ab4fe 100644 (file)
@@ -4,12 +4,6 @@
 
     require_once($CFG->dirroot.'/mod/forum/lib.php');
 
-    // Bounds for block widths
-    // define('BLOCK_L_MIN_WIDTH', 100);
-    // define('BLOCK_L_MAX_WIDTH', 210);
-    // define('BLOCK_R_MIN_WIDTH', 100);
-    // define('BLOCK_R_MAX_WIDTH', 210);
-
     // Bounds for block widths
     // more flexible for theme designers taken from theme config.php
     $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width;
index 922f84b8c73e2047efbb472c8cc5876312e05eeb..5b8d71866941ff4ae8a3a9eb30c6cd867e03c14e 100644 (file)
     
     $topic = optional_param('topic', -1, PARAM_INT);
 
-    
     // Bounds for block widths
-    define('BLOCK_L_MIN_WIDTH', 100);
-    define('BLOCK_L_MAX_WIDTH', 210);
-    define('BLOCK_R_MIN_WIDTH', 100);
-    define('BLOCK_R_MAX_WIDTH', 210);
+    // more flexible for theme designers taken from theme config.php
+    $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width;
+    $lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width;
+    $rmin = (empty($THEME->block_r_min_width)) ? 100 : $THEME->block_r_min_width;
+    $rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width;
+
+    define('BLOCK_L_MIN_WIDTH', $lmin);
+    define('BLOCK_L_MAX_WIDTH', $lmax);
+    define('BLOCK_R_MIN_WIDTH', $rmin);
+    define('BLOCK_R_MAX_WIDTH', $rmax);
 
     $preferred_width_left  = bounded_number(BLOCK_L_MIN_WIDTH, blocks_preferred_width($pageblocks[BLOCK_POS_LEFT]),  
                                             BLOCK_L_MAX_WIDTH);
index f49c096c8c6a5a6156b0c3da45f16359ce790ba0..80c86db0c9cf5d770e6fdc792051a4a4a9403376 100644 (file)
@@ -7,12 +7,6 @@
 
     $week = optional_param('week', -1, PARAM_INT);
 
-    // Bounds for block widths
-    // define('BLOCK_L_MIN_WIDTH', 100);
-    // define('BLOCK_L_MAX_WIDTH', 210);
-    // define('BLOCK_R_MIN_WIDTH', 100);
-    // define('BLOCK_R_MAX_WIDTH', 210);
-
     // Bounds for block widths
     // more flexible for theme designers taken from theme config.php
     $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width;
index 760522be15430a71c4fb7ec7829a14a31362e1f6..6fd71a7feda447e896ca53e019038c1f8cb22747 100644 (file)
--- a/index.php
+++ b/index.php
         die;
     }
 
-/// Bounds for block widths on this page
-    define('BLOCK_L_MIN_WIDTH', 160);
-    define('BLOCK_L_MAX_WIDTH', 210);
-    define('BLOCK_R_MIN_WIDTH', 160);
-    define('BLOCK_R_MAX_WIDTH', 210);
+    // Bounds for block widths
+    // more flexible for theme designers taken from theme config.php
+    $lmin = (empty($THEME->block_l_min_width)) ? 100 : $THEME->block_l_min_width;
+    $lmax = (empty($THEME->block_l_max_width)) ? 210 : $THEME->block_l_max_width;
+    $rmin = (empty($THEME->block_r_min_width)) ? 100 : $THEME->block_r_min_width;
+    $rmax = (empty($THEME->block_r_max_width)) ? 210 : $THEME->block_r_max_width;
+
+    define('BLOCK_L_MIN_WIDTH', $lmin);
+    define('BLOCK_L_MAX_WIDTH', $lmax);
+    define('BLOCK_R_MIN_WIDTH', $rmin);
+    define('BLOCK_R_MAX_WIDTH', $rmax);
 
     require_once('config.php');
     require_once($CFG->dirroot .'/course/lib.php');