]> git.mjollnir.org Git - moodle.git/commitdiff
Changed some sesskey behaviours SC#73 (admin part)
authorstronk7 <stronk7>
Sat, 22 Jan 2005 19:53:28 +0000 (19:53 +0000)
committerstronk7 <stronk7>
Sat, 22 Jan 2005 19:53:28 +0000 (19:53 +0000)
admin/block.php
admin/blocks.php
admin/module.php
admin/modules.php

index def37dd39ab31d68cbc13388b773103ae73b2f30..a87386efda592090c1d81b7d77416a8c2d47411a 100644 (file)
         error("Site isn't defined!");
     }
 
-    if (!confirm_sesskey()) {
-        error(get_string('confirmsesskeybad', 'error'));
-    }
-
     require_variable($_REQUEST['block']);
     $blockid = intval($_REQUEST['block']);
    
     /// If data submitted, then process and store.
 
     if ($config = data_submitted()) {
+
+        if (!confirm_sesskey()) {
+             error(get_string('confirmsesskeybad', 'error'));
+        }
         if(!$block->has_config()) {
             error('This block does not support global configuration');
         }
index 28da48984948b31ed5e9919815e84d563e58e274..980b9c3e157dacdf593cf41512d9f2ce8755f49c 100644 (file)
 
         $settings = ''; // By default, no configuration
         if($blockobject->has_config()) {
-            $settings = '<a href="block.php?block='.$blockid.'&sesskey='.$USER->sesskey.'">'.$strsettings.'</a>';
+            $settings = '<a href="block.php?block='.$blockid.'">'.$strsettings.'</a>';
         }
 
         $count = count_records('block_instance', 'blockid', $blockid);
index 1ab26d4e91e04a11a766803d37dba28557e7301f..71c052b29a104b7b0cb1e9b68db0e12f44d33ede 100644 (file)
         error("Site isn't defined!");
     }
 
-    if (!confirm_sesskey()) {
-        error(get_string('confirmsesskeybad', 'error'));
-    }
-
 /// If data submitted, then process and store.
 
-       if ($config = data_submitted()) {  
+    if ($config = data_submitted()) {
+
+        if (!confirm_sesskey()) {
+            error(get_string('confirmsesskeybad', 'error'));
+        }
         print_header();
         foreach ($config as $name => $value) {
             set_config($name, $value);
index 18bfdf0286898f7c6049052405b79a79c2a913e0..094629f785484c9ba1a3bbd10551311155fb775b 100644 (file)
         $delete = "<a href=\"modules.php?delete=$module->name&sesskey=$USER->sesskey\">$strdelete</a>";
 
         if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) {
-            $settings = "<a href=\"module.php?module=$module->name&sesskey=$USER->sesskey\">$strsettings</a>";
+            $settings = "<a href=\"module.php?module=$module->name\">$strsettings</a>";
         } else {
             $settings = "";
         }