]> git.mjollnir.org Git - moodle.git/commitdiff
Changed some sesskey behaviours SC#73 (admin part)
authorstronk7 <stronk7>
Sun, 23 Jan 2005 11:49:13 +0000 (11:49 +0000)
committerstronk7 <stronk7>
Sun, 23 Jan 2005 11:49:13 +0000 (11:49 +0000)
admin/calendar.php
admin/configure.php
admin/dst.php
admin/index.php

index 9fbd5caae7b98e7157fc742fc4b6d44fcb263fbe..07769806df4b0e63d0aebc29ebfa5df1d2e3c1c6 100644 (file)
 
 /// If data submitted, process and store
 
-    if(confirm_sesskey() && $form = data_submitted()) {
+    if(($form = data_submitted()) && confirm_sesskey()) {
         if(isset($form->mode_dst)) {
             // Move to DST presets configuration
-            redirect('dst.php?sesskey='.$USER->sesskey);
+            redirect('dst.php');
             die();
         }
         // Normal configuration, just save the variables
index 7b6284f70f0e36abad0a7f6db52a18abd7ea37ef..cf554d45c85d8b646b7a6cd4a78bb2009a938abd 100644 (file)
@@ -43,7 +43,7 @@
 
     $table->data[]= array("<strong><a href=\"editor.php\">". get_string('editorsettings') ."</a></strong>",
                     get_string('adminhelpeditorsettings'));
-    $table->data[]= array("<strong><a href=\"calendar.php?sesskey=$USER->sesskey\">". get_string('calendarsettings', 'admin') ."</a></strong>",
+    $table->data[]= array("<strong><a href=\"calendar.php\">". get_string('calendarsettings', 'admin') ."</a></strong>",
                     get_string('helpcalendarsettings', 'admin'));
 
     print_table($table);
index 8e1b9de2ca199343d16b136b810aed8eda7191d5..484b1c324250828f9cb5c4743edfdc9b45e0461f 100644 (file)
@@ -14,8 +14,6 @@
         error('Site isn\'t defined!');
     }
 
-    confirm_sesskey();
-
     include_once('../calendar/lib.php');
 
 /// Print headings
@@ -28,7 +26,7 @@
     print_header("$site->shortname: $strcalendardstpresets", "$site->fullname",
                  "<a href=\"index.php\">$stradministration</a> -> ".
                  "<a href=\"configure.php\">$strconfiguration</a> -> ".
-                 "<a href=\"calendar.php?sesskey=$USER->sesskey\">$strcalendarsettings</a> -> $strcalendardstpresets");
+                 "<a href=\"calendar.php\">$strcalendarsettings</a> -> $strcalendardstpresets");
 
     $mode = '';
     $form = false;
         
 
     // $mode, on the other hand, may make us do something INSTEAD of displaying the preset list
-    if($form = data_submitted()) {
+    if(($form = data_submitted()) && confirm_sesskey()) {
         if(isset($form->result_cancel)) {
             $mode = '';
         }
         else if(isset($form->mode_return)) {
-            redirect('calendar.php?sesskey='.$USER->sesskey);
+            redirect('calendar.php');
             die();
         }
         else if(isset($form->mode_delete)) {
                         print_object("INSERT!");
                         insert_record('dst_preset', $preset);
                     }
-                    echo '<a href="dst.php?sesskey='.$USER->sesskey.'>Proceed</a>';
+                    echo '<a href="dst.php">Proceed</a>';
                     die();
                 }
                 else {
index bebc22d205fd34f20d173ca825dee66c0ed7bdae..12eb774d0124ee035fac18f59281f1e5310669a5 100644 (file)
                     get_string("adminhelpmanagemodules")."</font><br />";
     $configdata .= "<font size=+1>&nbsp;</font><a href=\"blocks.php\">".get_string("manageblocks")."</a> - <font size=\"1\">".
                     get_string("adminhelpmanageblocks")."</font><br />";
-    $configdata .= "<font size=+1>&nbsp;</font><a href=\"filters.php?sesskey=$USER->sesskey\">".get_string("managefilters")."</a> - <font size=\"1\">".
+    $configdata .= "<font size=+1>&nbsp;</font><a href=\"filters.php\">".get_string("managefilters")."</a> - <font size=\"1\">".
                     get_string("adminhelpmanagefilters")."</font><br />";
     if (!isset($CFG->disablescheduledbackups)) {
-        $configdata .= "<font size=+1>&nbsp;</font><a href=\"backup.php?sesskey=$USER->sesskey\">".get_string("backup")."</a> - <font size=\"1\">".
+        $configdata .= "<font size=+1>&nbsp;</font><a href=\"backup.php\">".get_string("backup")."</a> - <font size=\"1\">".
                         get_string("adminhelpbackup")."</font><br />";
     }
-    $configdata .= "<font size=+1>&nbsp;</font><a href=\"editor.php?sesskey=$USER->sesskey\">". get_string("editorsettings") ."</a> - <font size=\"1\">".
+    $configdata .= "<font size=+1>&nbsp;</font><a href=\"editor.php\">". get_string("editorsettings") ."</a> - <font size=\"1\">".
                     get_string("adminhelpeditorsettings")."</font><br />";
-    $configdata .= "<font size=+1>&nbsp;</font><a href=\"calendar.php?sesskey=$USER->sesskey\">". get_string('calendarsettings', 'admin') ."</a> - <font size=\"1\">".
+    $configdata .= "<font size=+1>&nbsp;</font><a href=\"calendar.php\">". get_string('calendarsettings', 'admin') ."</a> - <font size=\"1\">".
                     get_string('helpcalendarsettings', 'admin')."</font><br />";
 
     $table->data[] = array("<font size=+1><b><a href=\"configure.php\">".get_string("configuration")."</a></b>",