mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Changed some sesskey behaviours SC#73 (admin part)
This commit is contained in:
parent
010ec024b8
commit
4e27a2b92e
4 changed files with 11 additions and 11 deletions
|
@ -14,10 +14,6 @@
|
||||||
error("Site isn't defined!");
|
error("Site isn't defined!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!confirm_sesskey()) {
|
|
||||||
error(get_string('confirmsesskeybad', 'error'));
|
|
||||||
}
|
|
||||||
|
|
||||||
require_variable($_REQUEST['block']);
|
require_variable($_REQUEST['block']);
|
||||||
$blockid = intval($_REQUEST['block']);
|
$blockid = intval($_REQUEST['block']);
|
||||||
|
|
||||||
|
@ -40,6 +36,10 @@
|
||||||
/// If data submitted, then process and store.
|
/// If data submitted, then process and store.
|
||||||
|
|
||||||
if ($config = data_submitted()) {
|
if ($config = data_submitted()) {
|
||||||
|
|
||||||
|
if (!confirm_sesskey()) {
|
||||||
|
error(get_string('confirmsesskeybad', 'error'));
|
||||||
|
}
|
||||||
if(!$block->has_config()) {
|
if(!$block->has_config()) {
|
||||||
error('This block does not support global configuration');
|
error('This block does not support global configuration');
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@
|
||||||
|
|
||||||
$settings = ''; // By default, no configuration
|
$settings = ''; // By default, no configuration
|
||||||
if($blockobject->has_config()) {
|
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);
|
$count = count_records('block_instance', 'blockid', $blockid);
|
||||||
|
|
|
@ -13,13 +13,13 @@
|
||||||
error("Site isn't defined!");
|
error("Site isn't defined!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!confirm_sesskey()) {
|
|
||||||
error(get_string('confirmsesskeybad', 'error'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// If data submitted, then process and store.
|
/// 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();
|
print_header();
|
||||||
foreach ($config as $name => $value) {
|
foreach ($config as $name => $value) {
|
||||||
set_config($name, $value);
|
set_config($name, $value);
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
$delete = "<a href=\"modules.php?delete=$module->name&sesskey=$USER->sesskey\">$strdelete</a>";
|
$delete = "<a href=\"modules.php?delete=$module->name&sesskey=$USER->sesskey\">$strdelete</a>";
|
||||||
|
|
||||||
if (file_exists("$CFG->dirroot/mod/$module->name/config.html")) {
|
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 {
|
} else {
|
||||||
$settings = "";
|
$settings = "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue