Skip to content

Commit

Permalink
Changed some sesskey behaviours SC#73 (admin part)
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 22, 2005
1 parent 010ec02 commit 4e27a2b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions admin/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand All @@ -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');
}
Expand Down
2 changes: 1 addition & 1 deletion admin/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@

$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);
Expand Down
10 changes: 5 additions & 5 deletions admin/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion admin/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
$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 = "";
}
Expand Down

0 comments on commit 4e27a2b

Please sign in to comment.