From a3f6fc66fe0701c9b95597425880993661534acf Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 23 Jan 2005 11:49:13 +0000 Subject: [PATCH] Changed some sesskey behaviours SC#73 (admin part) --- admin/calendar.php | 4 ++-- admin/configure.php | 2 +- admin/dst.php | 10 ++++------ admin/index.php | 8 ++++---- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/admin/calendar.php b/admin/calendar.php index 9fbd5caae7..07769806df 100644 --- a/admin/calendar.php +++ b/admin/calendar.php @@ -28,10 +28,10 @@ /// 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 diff --git a/admin/configure.php b/admin/configure.php index 7b6284f70f..cf554d45c8 100644 --- a/admin/configure.php +++ b/admin/configure.php @@ -43,7 +43,7 @@ $table->data[]= array("". get_string('editorsettings') ."", get_string('adminhelpeditorsettings')); - $table->data[]= array("sesskey\">". get_string('calendarsettings', 'admin') ."", + $table->data[]= array("". get_string('calendarsettings', 'admin') ."", get_string('helpcalendarsettings', 'admin')); print_table($table); diff --git a/admin/dst.php b/admin/dst.php index 8e1b9de2ca..484b1c3242 100644 --- a/admin/dst.php +++ b/admin/dst.php @@ -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", "$stradministration -> ". "$strconfiguration -> ". - "sesskey\">$strcalendarsettings -> $strcalendardstpresets"); + "$strcalendarsettings -> $strcalendardstpresets"); $mode = ''; $form = false; @@ -51,12 +49,12 @@ // $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)) { @@ -187,7 +185,7 @@ print_object("INSERT!"); insert_record('dst_preset', $preset); } - echo 'Proceed'; die(); } else { diff --git a/admin/index.php b/admin/index.php index bebc22d205..12eb774d01 100644 --- a/admin/index.php +++ b/admin/index.php @@ -307,15 +307,15 @@ get_string("adminhelpmanagemodules")."
"; $configdata .= " ".get_string("manageblocks")." - ". get_string("adminhelpmanageblocks")."
"; - $configdata .= " sesskey\">".get_string("managefilters")." - ". + $configdata .= " ".get_string("managefilters")." - ". get_string("adminhelpmanagefilters")."
"; if (!isset($CFG->disablescheduledbackups)) { - $configdata .= " sesskey\">".get_string("backup")." - ". + $configdata .= " ".get_string("backup")." - ". get_string("adminhelpbackup")."
"; } - $configdata .= " sesskey\">". get_string("editorsettings") ." - ". + $configdata .= " ". get_string("editorsettings") ." - ". get_string("adminhelpeditorsettings")."
"; - $configdata .= " sesskey\">". get_string('calendarsettings', 'admin') ." - ". + $configdata .= " ". get_string('calendarsettings', 'admin') ." - ". get_string('helpcalendarsettings', 'admin')."
"; $table->data[] = array("".get_string("configuration")."", -- 2.39.5