From 0064f3cfbb68168b6fa3313083b0a735c5f4d970 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 11 Apr 2012 10:56:49 +1200 Subject: [PATCH] MDL-32393 navigation: Fixed up issue when rendering action_link instances for the navigation --- lib/outputrenderers.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php index 6e311be07f0..5a9c5b61933 100644 --- a/lib/outputrenderers.php +++ b/lib/outputrenderers.php @@ -2511,7 +2511,10 @@ EOD; if ($item->hidden) { $link->add_class('dimmed'); } - $link->text = $content.$link->text; // add help icon + if (!empty($content)) { + // Providing there is content we will use that for the link content. + $link->text = $content; + } $content = $this->render($link); } else if ($item->action instanceof moodle_url) { $attributes = array(); @@ -2896,4 +2899,4 @@ class core_renderer_ajax extends core_renderer { * @param string $id */ public function heading($text, $level = 2, $classes = 'main', $id = null) {} -} \ No newline at end of file +}