navigation MDL-20833 Moved has_navbar from OUTPUT to PAGE as it is logic

This commit is contained in:
Sam Hemelryk
2009-11-16 01:12:16 +00:00
parent 21102992e5
commit 7231e2de74
5 changed files with 16 additions and 13 deletions
+2 -10
View File
@@ -742,7 +742,7 @@ class moodle_core_renderer extends moodle_renderer_base {
$COURSE = $this->page->course;
// Required for legacy template uses
$navigation = $this->has_navbar();
$navigation = $this->page->has_navbar();
ob_start();
include($templatefile);
@@ -789,7 +789,7 @@ class moodle_core_renderer extends moodle_renderer_base {
$course = $this->page->course;
$performanceinfo = self::PERFORMANCE_INFO_TOKEN;
$navigation = $this->has_navbar();
$navigation = $this->page->has_navbar();
if (!$menu && $navigation) {
$menu = $loggedinas;
}
@@ -2373,15 +2373,7 @@ class moodle_core_renderer extends moodle_renderer_base {
public function navbar() {
return $this->page->navbar->content();
}
/**
* Checks to see if there are any items on the navbar object
* @return bool true if there are, false if not
*/
public function has_navbar() {
return $this->page->navbar->has_items();
}
}
/// RENDERERS