Merge branch 'MDL-47806' of github.com:mr-russ/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 4 Nov 2014 06:34:43 +0000 (14:34 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 4 Nov 2014 06:34:43 +0000 (14:34 +0800)
1  2 
lib/outputrenderers.php

diff --combined lib/outputrenderers.php
              $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,
@@@ -3718,6 -3712,12 +3718,12 @@@ class core_renderer_cli extends core_re
          }
          return "!! $message !!\n";
      }
+     /**
+      * There is no footer for a cli request, however we must override the
+      * footer method to prevent the default footer.
+      */
+     public function footer() {}
  }