From dd8e50113a03e7e85687d2dca2a338c3d93ee063 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 22 Apr 2010 07:42:04 +0000 Subject: [PATCH] navigation MDL-22044 Fixed bug: when not logged in it is now home not my home. Thanks Eloy for spotting --- lib/navigationlib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 0ab1a8a47ed..f0c128cf7d1 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -775,6 +775,10 @@ class global_navigation extends navigation_node { 'text' => get_string('myhome'), 'action' => new moodle_url('/my/') ); + if (!isloggedin()) { + $properties['text'] = get_string('home'); + $properties['action'] = new moodle_url('/'); + } parent::__construct($properties); // Initalise and set defaults @@ -926,7 +930,6 @@ class global_navigation extends navigation_node { foreach ($children as $child) { $this->children->add($child); } - $this->action = new moodle_url('/'); } $this->initialised = true;