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');
}
$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);
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);
$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 = "";
}