diff --git a/admin/backup.php b/admin/backup.php index 9d7bdda1644..c461c005232 100644 --- a/admin/backup.php +++ b/admin/backup.php @@ -15,17 +15,13 @@ error("Site isn't defined!"); } - if (!confirm_sesskey()) { - error(get_string('confirmsesskeybad', 'error')); - } - //Initialise error variables $error = false; $sche_destination_error = ""; /// If data submitted, then process and store. - if ($config = data_submitted()) { + if (($config = data_submitted()) && confirm_sesskey()) { //First of all we check that everything is correct //Check for trailing slash and backslash in backup_sche_destination diff --git a/admin/configure.php b/admin/configure.php index ed82aeabcf7..68e6036a3f4 100644 --- a/admin/configure.php +++ b/admin/configure.php @@ -37,7 +37,7 @@ $table->data[] = array("". get_string('managefilters') .'', get_string('adminhelpmanagefilters')); if (!isset($CFG->disablescheduledbackups)) { - $table->data[] = array("sesskey\">".get_string("backup")."", + $table->data[] = array("".get_string("backup")."", get_string('adminhelpbackup')); } diff --git a/admin/filters.php b/admin/filters.php index 62a159177ef..1f999f29a7b 100644 --- a/admin/filters.php +++ b/admin/filters.php @@ -16,10 +16,6 @@ error("Only administrators can use this page!"); } - if (!confirm_sesskey()) { - error(get_string('confirmsesskeybad', 'error')); - } - if (!$site = get_site()) { error("Site isn't defined!"); } @@ -86,22 +82,23 @@ /// If data submitted, then process and store. if (!empty($options)) { - if ($config = data_submitted()) { + if (($config = data_submitted()) && confirm_sesskey()) { unset($config->options); + unset($config->sesskey); foreach ($config as $name => $value) { set_config($name, $value); } } } - if (!empty($add) and !empty($uselect)) { + if (!empty($add) and !empty($uselect) and confirm_sesskey()) { $selectedfilter = $uselect; if (!in_array($selectedfilter, $installedfilters)) { $installedfilters[] = $selectedfilter; set_config("textfilters", implode(',', $installedfilters)); } - } else if (!empty($remove) and !empty($iselect)) { + } else if (!empty($remove) and !empty($iselect) and confirm_sesskey()) { $selectedfilter = $iselect; foreach ($installedfilters as $key => $installedfilter) { if ($installedfilter == $selectedfilter) { @@ -110,7 +107,7 @@ } set_config("textfilters", implode(',', $installedfilters)); - } else if ((!empty($up) or !empty($down)) and !empty($iselect)) { + } else if ((!empty($up) or !empty($down)) and !empty($iselect) and confirm_sesskey()) { if (!empty($up)) { if ($allfilters[$iselect]) { diff --git a/admin/lang.php b/admin/lang.php index 1a61e9eddb5..9be450d173a 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -29,7 +29,6 @@ $title = $strmissingstrings; $button = '
'; break; case "compare": @@ -37,7 +36,6 @@ $title = $strcomparelanguage; $button = ''; break; default: @@ -62,8 +60,8 @@ echo "