MDL-36238 Blocks: Logs page close session write, so editing is set before

This commit is contained in:
Rajesh Taneja
2012-11-01 12:14:18 +08:00
parent 7e8ae12a7a
commit 52fa70f382
+5
View File
@@ -125,6 +125,11 @@ if (!empty($page)) {
$stradministration = get_string('administration');
$strreports = get_string('reports');
// Before we close session, make sure we have editing information in session.
$adminediting = optional_param('adminedit', -1, PARAM_BOOL);
if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
session_get_instance()->write_close();
if (!empty($chooselog)) {