Even more automation: now blocks_execute_url_action() checks if the user

has sufficient rights to execute the action automatically. It's therefore
safe to call without ANY checks being done first.
This commit is contained in:
defacer 2005-02-01 06:55:02 +00:00
parent 0144a0a701
commit 3edc57e189

View File

@ -482,7 +482,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
function blocks_execute_url_action(&$PAGE, &$pageblocks) {
$blockaction = optional_param('blockaction');
if (empty($blockaction) || !confirm_sesskey()) {
if (empty($blockaction) || !$PAGE->user_allowed_editing() || !confirm_sesskey()) {
return;
}