MDL-61513 admin: Fix undefined $buttons variable

This commit is contained in:
Jun Pataleta 2018-02-22 10:22:06 +08:00
parent d1b4ca921e
commit e5818c7d09

View File

@ -75,7 +75,7 @@ if ($data = data_submitted() and confirm_sesskey()) {
if ($PAGE->user_allowed_editing() && $adminediting != -1) {
$USER->editing = $adminediting;
}
$buttons = null;
if ($PAGE->user_allowed_editing()) {
$url = clone($PAGE->url);
if ($PAGE->user_is_editing()) {
@ -129,7 +129,9 @@ if ($savebutton) {
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$PAGE->set_title("$SITE->shortname: " . implode(": ",$visiblepathtosection));
$PAGE->set_heading($SITE->fullname);
$PAGE->set_button($buttons);
if ($buttons) {
$PAGE->set_button($buttons);
}
echo $OUTPUT->header();