]> git.mjollnir.org Git - moodle.git/commitdiff
slashargument fix for healthcenter, better diagnostic messages; renamed file.php...
authorskodak <skodak>
Fri, 30 Jun 2006 13:46:25 +0000 (13:46 +0000)
committerskodak <skodak>
Fri, 30 Jun 2006 13:46:25 +0000 (13:46 +0000)
admin/configvars.php
admin/health.php
filter/algebra/algebradebug.php
filter/tex/texdebug.php
lib/weblib.php

index 6db0b2438997dee3d6045ee6996a35a07ee6e853..59087ccee880eebf257a5cd25d437033f5419740 100644 (file)
@@ -157,8 +157,8 @@ class configvarrss extends configvar {
 
 /// slasharguments
     unset($options);
-    $options[0] = "file.php?file=/pic.jpg";
-    $options[1] = "file.php/pic.jpg";
+    $options[0] = "file.php?file=/1/pic.jpg";
+    $options[1] = "file.php/1/pic.jpg";
 
     $operatingsystem['slasharguments'] = new configvar (get_string('configslasharguments', 'admin'),
         choose_from_menu ($options, 'slasharguments', $config->slasharguments, '', '', '', true) );
index d4a50de80dd24cf0522d0656a182ccd3b68c8d68..e0ef7cab05be61cb78be4f0ab2157168c2fef674 100644 (file)
@@ -7,8 +7,7 @@
     define('SEVERITY_SIGNIFICANT', 'significant');
     define('SEVERITY_CRITICAL',    'critical');
 
-    $resetsesserrorcounter = optional_param('resetsesserrorcounter', 0, PARAM_BOOL);
-    $solution              = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
+    $solution = optional_param('solution', 0, PARAM_SAFEDIR); //in fact it is class name alhanumeric and _
 
     require_login();
     if (!isadmin()) {
@@ -423,7 +422,7 @@ class problem_000010 extends problem_base {
             $desc .= '<li>slasharguments are enabled in Moodle configuration</li>';   
         }
         if ($this->status() == -1) {
-            $desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a></li>';
+            $desc .= '<li>can not run automatic test, you can verify it <a href="'.$CFG->wwwroot.'/file.php/testslasharguments" target="_blank">here</a> manually</li>';
         } else if ($this->status() == 0) {
             $desc .= '<li>slashargument test <strong>failed</strong>, please check server configuration</li>';
         } else {
@@ -501,7 +500,7 @@ class problem_000011 extends problem_base {
     }
     function solution() {
         global $CFG;
-        if (!empty($resetsesserrorcounter)) {
+        if (optional_param('resetsesserrorcounter', 0, PARAM_BOOL)) {
             if (get_field('config', 'name', 'name', 'session_error_counter')) {
                 delete_records('config', 'name', 'session_error_counter');
             }
index 3077f51d15065918738c84407504ee05e0efaad7..6ae4967107be37079e3e4cd32bdc936830b03779 100644 (file)
@@ -302,9 +302,9 @@ function slasharguments($texexp, $md5) {
   $image = tex2image($texexp,$md5,true);
   echo "<p>If the following image displays correctly, set your ";
   echo "<a href=\"$admin\" target=\"_blank\">Administration->Configuration->Variables</a> ";
-  echo "setting for slasharguments to file.php/pic.jpg: ";
+  echo "setting for slasharguments to file.php/1/pic.jpg: ";
   echo "<img src=\"pix.php/$image\" align=\"absmiddle\"></p>\n";
-  echo "<p>Otherwise set it to file.php?file=pic.jpg ";
+  echo "<p>Otherwise set it to file.php?file=/1/pic.jpg ";
   echo "It should display correctly as ";
   echo "<img src=\"pix.php?file=$image\" align=\"absmiddle\"></p>\n";
   echo "<p>If neither equation image displays correctly, please seek ";
index 6c3973638f46cfb73cd57b31cccbe81a0b8a8c4c..d6e41ae49f21362b1cf41ac96e305e43b5fe784e 100644 (file)
         $image = tex2image($texexp,true);
         echo "<p>If the following image displays correctly, set your ";
         echo "<a href=\"$admin\" target=\"_blank\">Administration->Configuration->Variables</a> ";
-        echo "setting for slasharguments to file.php/pic.jpg: ";
+        echo "setting for slasharguments to file.php/1/pic.jpg: ";
         echo "<img src=\"pix.php/$image\" align=\"absmiddle\"></p>\n";
-        echo "<p>Otherwise set it to file.php?file=pic.jpg ";
+        echo "<p>Otherwise set it to file.php?file=/1/pic.jpg ";
         echo "It should display correctly as ";
         echo "<img src=\"pix.php?file=$image\" align=\"absmiddle\"></p>\n";
         echo "<p>If neither equation image displays correctly, please seek ";
index f17b775c48d3bf5c21722a58231d2a8e3930ce68..da51dd0a4ef1d59c320c14a8df6649d82f9f779b 100644 (file)
@@ -1096,7 +1096,7 @@ function get_file_argument($scriptname) {
         if (!strpos($path_info, $scriptname)) {
             $relativepath = clean_param(rawurldecode($path_info), PARAM_PATH);
             if ($relativepath === '/testslasharguments') {
-                echo 'test 1: Slasharguments test passed.'; //indicate ok for health center
+                echo 'test 1: Slasharguments test passed. Server confguration is compatible with file.php/1/pic.jpg slashargument setting.'; //indicate ok for health center
                 die;
             }
         }
@@ -1110,7 +1110,7 @@ function get_file_argument($scriptname) {
             $path_info = strip_querystring($arr[1]);
             $relativepath = clean_param(rawurldecode($path_info), PARAM_PATH);
             if ($relativepath === '/testslasharguments') {
-                echo 'test 2:Slasharguments test passed (compatibility hack).'; //indicate ok for health center
+                echo 'test 2:Slasharguments test passed (compatibility hack). Server confguration may be compatible with file.php/1/pic.jpg slashargument setting'; //indicate ok for health center
                 die;
             }
         }