Merge branch 'MDL-47806' of github.com:mr-russ/moodle
[moodle.git] / lib / outputrenderers.php
index c03d58a..b146162 100644 (file)
@@ -3049,8 +3049,14 @@ EOD;
             $idx = 0;
             foreach ($opts->navitems as $key => $value) {
                 $pix = null;
-                if (isset($value->pix)) {
+                if (isset($value->pix) && !empty($value->pix)) {
                     $pix = new pix_icon($value->pix, $value->title, null, array('class' => 'iconsmall'));
+                } else if (isset($value->imgsrc) && !empty($value->imgsrc)) {
+                    $value->title = html_writer::img(
+                        $value->imgsrc,
+                        $value->title,
+                        array('class' => 'iconsmall')
+                    ) . $value->title;
                 }
                 $al = new action_menu_link_secondary(
                     $value->url,