Skip to content

Commit

Permalink
MDL-61513 admin: Fix undefined $buttons variable
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Feb 22, 2018
1 parent 2e8f163 commit f926f37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions admin/category.php
Expand Up @@ -75,7 +75,7 @@
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()) {
Expand Down Expand Up @@ -129,7 +129,9 @@
$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();

Expand Down

0 comments on commit f926f37

Please sign in to comment.