MDL-16613 sesskey cleanup

This commit is contained in:
skodak 2009-01-02 10:43:12 +00:00
parent e821d24c72
commit 34a2faed92
5 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@
// so we can strip them from the submitted data BEFORE handling it.
$hiddendata = array(
'block' => $blockid,
'sesskey' => $USER->sesskey
'sesskey' => sesskey()
);
/// If data submitted, then process and store.

View File

@ -181,7 +181,7 @@
$count = $DB->count_records('block_instance', array('blockid'=>$blockid, 'pagetype'=>'course-view'));
if ($count>0) {
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey={$USER->sesskey}\" ";
$blocklist = "<a href=\"{$CFG->wwwroot}/course/search.php?blocklist=$blockid&amp;sesskey=".sesskey()."\" ";
$blocklist .= "title=\"$strshowblockcourse\" >$totalcount</a>";
}
else {

View File

@ -22,7 +22,7 @@
print_error('confirmsesskeybad', 'error');
}
if ($enrolment->process_config($frm)) {
redirect("enrol.php?sesskey=$USER->sesskey", get_string("changessaved"), 1);
redirect("enrol.php?sesskey=".sesskey(), get_string("changessaved"), 1);
}
} else {
$frm = $CFG;

View File

@ -78,7 +78,7 @@
if (!$confirm) {
notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename),
"modules.php?delete=$delete&amp;confirm=1&amp;sesskey=$USER->sesskey",
"modules.php?delete=$delete&amp;confirm=1&amp;sesskey=".sesskey(),
"modules.php");
admin_externalpage_print_footer();
exit;
@ -217,7 +217,7 @@
$count = $DB->count_records_select($module->name, "course<>0");
if ($count>0) {
$countlink = "<a href=\"{$CFG->wwwroot}/course/search.php?modulelist=$module->name" .
"&amp;sesskey={$USER->sesskey}\" title=\"$strshowmodulecourse\">$count</a>";
"&amp;sesskey=".sesskey()."\" title=\"$strshowmodulecourse\">$count</a>";
}
else {
$countlink = "$count";

View File

@ -261,7 +261,7 @@
$deletebutton = get_string($accessctrl, 'mnet');
if (has_capability('moodle/user:delete', $sitecontext)) {
// TODO: this should be under a separate capability
$deletebutton .= " (<a href=\"?acl={$user->id}&amp;accessctrl=$changeaccessto&amp;sesskey={$USER->sesskey}\">"
$deletebutton .= " (<a href=\"?acl={$user->id}&amp;accessctrl=$changeaccessto&amp;sesskey=".sesskey()."\">"
. get_string($changeaccessto, 'mnet') . " access</a>)";
}
// mnet info in edit column