diff --git a/admin/block.php b/admin/block.php index def37dd39ab..a87386efda5 100644 --- a/admin/block.php +++ b/admin/block.php @@ -14,10 +14,6 @@ error("Site isn't defined!"); } - if (!confirm_sesskey()) { - error(get_string('confirmsesskeybad', 'error')); - } - require_variable($_REQUEST['block']); $blockid = intval($_REQUEST['block']); @@ -40,6 +36,10 @@ /// 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'); } diff --git a/admin/blocks.php b/admin/blocks.php index 28da4898494..980b9c3e157 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -166,7 +166,7 @@ $settings = ''; // By default, no configuration if($blockobject->has_config()) { - $settings = ''.$strsettings.''; + $settings = ''.$strsettings.''; } $count = count_records('block_instance', 'blockid', $blockid); diff --git a/admin/module.php b/admin/module.php index 1ab26d4e91e..71c052b29a1 100644 --- a/admin/module.php +++ b/admin/module.php @@ -13,13 +13,13 @@ 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); diff --git a/admin/modules.php b/admin/modules.php index 18bfdf02868..094629f7854 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -165,7 +165,7 @@ $delete = "name&sesskey=$USER->sesskey\">$strdelete"; if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) { - $settings = "name&sesskey=$USER->sesskey\">$strsettings"; + $settings = "name\">$strsettings"; } else { $settings = ""; }