]> git.mjollnir.org Git - moodle.git/commitdiff
Make sure config array is always initialised before use
authormoodler <moodler>
Mon, 20 Jan 2003 06:43:44 +0000 (06:43 +0000)
committermoodler <moodler>
Mon, 20 Jan 2003 06:43:44 +0000 (06:43 +0000)
admin/config.html

index 8d7a4b5026eeea44444e4c920c8c0d89bc665351..3be946ba6a27248ff4c3872aaf6f3c866f9e373b 100644 (file)
@@ -98,7 +98,8 @@
 <TR VALIGN=TOP>
        <TD ALIGN=RIGHT><P>maxeditingtime:</TD>
        <TD>
-    <? $options[3600] = get_string("numminutes", "", 60);
+    <? unset($options);
+       $options[3600] = get_string("numminutes", "", 60);
        $options[2700] = get_string("numminutes", "", 45);
        $options[1800] = get_string("numminutes", "", 30);
        $options[900]  = get_string("numminutes", "", 15);
        $options[60]   = get_string("numminutes", "", 1);
 
        choose_from_menu ($options, "maxeditingtime", $config->maxeditingtime, "", "", "");
-       unset($options);
     ?>
     </TD>
     <TD>
 <TR VALIGN=TOP>
        <TD ALIGN=RIGHT><P>longtimenosee:</TD>
        <TD>
-    <? $options[1000] = get_string("numdays", "", 1000);
+    <? unset($options);
+       $options[1000] = get_string("numdays", "", 1000);
        $options[365]  = get_string("numdays", "", 365);
        $options[180]  = get_string("numdays", "", 180);
        $options[150]  = get_string("numdays", "", 150);
        $options[7]   = get_string("numdays", "", 7);
 
        choose_from_menu ($options, "longtimenosee", $config->longtimenosee, "", "", "");
-       unset($options);
     ?>
     </TD>
     <TD>
 <TR VALIGN=TOP>
        <TD ALIGN=RIGHT><P>slasharguments:</TD>
        <TD>
-    <? $options[0] = "file.php?file=/pic.jpg";
+    <? unset($options);
+       $options[0] = "file.php?file=/pic.jpg";
        $options[1] = "file.php/pic.jpg";
 
        $installed  = check_gd_version();
 
        choose_from_menu ($options, "slasharguments", $config->slasharguments, "", "", "");
-       unset($options);
     ?>
     </TD>
     <TD>
 <TR VALIGN=TOP>
        <TD ALIGN=RIGHT><P>debug:</TD>
        <TD>
-    <? $options[7]  = get_string("no");
+    <? unset($options);
+       $options[7]  = get_string("no");
        $options[15] = get_string("yes");
 
        choose_from_menu ($options, "debug", $config->debug, "", "", "");
-       unset($options);
     ?>
     </TD>
     <TD>