Commit 29d318b1 authored by Nigel McNie's avatar Nigel McNie
Browse files

Unconditionally set masquerading template vars.



Then we can use them on pages without sideblocks.
Signed-off-by: default avatarNigel McNie <nigel@catalyst.net.nz>
parent 7e83c6cd
......@@ -524,14 +524,15 @@ EOF;
$smarty->assign('SIDEBLOCKS', $SIDEBLOCKS);
$smarty->assign('SIDEBARS', $sidebars);
if ($USER->get('parentuser')) {
$smarty->assign('USERMASQUERADING', true);
$smarty->assign('masqueradedetails', get_string('youaremasqueradingas', 'mahara', hsc(display_name($USER))));
$smarty->assign('becomeyouagain',
' <a href="' . hsc($wwwroot) . 'admin/users/changeuser.php?restore=1">'
. get_string('becomeadminagain', 'admin', $USER->get('parentuser')->name)
. '</a>');
}
}
if ($USER->get('parentuser')) {
$smarty->assign('USERMASQUERADING', true);
$smarty->assign('masqueradedetails', get_string('youaremasqueradingas', 'mahara', hsc(display_name($USER))));
$smarty->assign('becomeyouagain',
' <a href="' . hsc($wwwroot) . 'admin/users/changeuser.php?restore=1">'
. get_string('becomeadminagain', 'admin', $USER->get('parentuser')->name)
. '</a>');
}
return $smarty;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment