From: samhemelryk Date: Mon, 7 Sep 2009 02:40:34 +0000 (+0000) Subject: repository MDL-19821 Updated print_header and build_navigation to OUTPUT and PAGE... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d9d8dbaaee8fe92257f4f26aacf9bd8046a8532d;p=moodle.git repository MDL-19821 Updated print_header and build_navigation to OUTPUT and PAGE equivalents --- diff --git a/repository/manage_instances.php b/repository/manage_instances.php index ead21d17cd..60db840213 100644 --- a/repository/manage_instances.php +++ b/repository/manage_instances.php @@ -69,25 +69,22 @@ /// Create navigation links - $navlinks = array(); if (!empty($course)) { - $navlinks[] = array('name' => $pagename, - 'link' => null, - 'type' => 'misc'); + $PAGE->navbar->add($pagename); $fullname = $course->fullname; } else { $fullname = fullname($user); $strrepos = get_string('repositories', 'repository'); - $navlinks[] = array('name' => $fullname, 'link' => $CFG->wwwroot . '/user/view.php?id=' . $user->id, 'type' => 'misc'); - $navlinks[] = array('name' => $strrepos, 'link' => null, 'type' => 'misc'); + $PAGE->navbar->add($fullname, new moodle_url($CFG->wwwroot.'/user/view.php', array('id'=>$user->id))); + $PAGE->navbar->add($strrepos); } $title = $pagename; - $navigation = build_navigation($navlinks); - /// Display page header - print_header($title, $fullname, $navigation); + $PAGE->set_title(); + $PAGE->set_heading($fullname); + echo $OUTPUT->header(); if ($context->contextlevel == CONTEXT_USER) { if ( !$course = $DB->get_record('course', array('id'=>$usercourseid))) {