~ubuntu-branches/ubuntu/trusty/moodle/trusty

« back to all changes in this revision

Viewing changes to theme/bootstrapbase/renderers/core_renderer.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-01-21 13:40:52 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20140121134052-ym2qvsp2cd9vq0p6
Tags: 2.5.4-1
* New upstream release, fixing security issues:
  - MSA-14-0001 Config passwords visibility issue [CVE-2014-0008]
  - MSA-14-0002 Group constraints lacking in "login as" [CVE-2014-0009]
  - MSA-14-0003 CSRF vulnerability in profile fields [CVE-2014-0010]
* Move /var/lib/moodle directory into package.
* Revert back to bundled yui3. Unfortunately, version in Debian and
  of upstream are not compatible (closes: #735312).

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
class theme_bootstrapbase_core_renderer extends core_renderer {
26
26
 
 
27
    /** @var custom_menu_item language The language menu if created */
 
28
    protected $language = null;
 
29
 
27
30
    /*
28
31
     * This renders a notification message.
29
32
     * Uses bootstrap compatible html.
102
105
        }
103
106
 
104
107
        if ($addlangmenu) {
105
 
            $language = $menu->add(get_string('language'), new moodle_url('#'), get_string('language'), 10000);
 
108
            $this->language = $menu->add(get_string('language'), new moodle_url('#'), get_string('language'), 10000);
106
109
            foreach ($langs as $langtype => $langname) {
107
 
                $language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname);
 
110
                $this->language->add($langname, new moodle_url($this->page->url, array('lang' => $langtype)), $langname);
108
111
            }
109
112
        }
110
113
 
126
129
        if ($menunode->has_children()) {
127
130
 
128
131
            if ($level == 1) {
129
 
                $dropdowntype = 'dropdown';
 
132
                $class = 'dropdown';
130
133
            } else {
131
 
                $dropdowntype = 'dropdown-submenu';
 
134
                $class = 'dropdown-submenu';
132
135
            }
133
136
 
134
 
            $content = html_writer::start_tag('li', array('class'=>$dropdowntype));
 
137
            if ($menunode === $this->language) {
 
138
                $class .= ' langmenu';
 
139
            }
 
140
            $content = html_writer::start_tag('li', array('class' => $class));
135
141
            // If the child has menus render it as a sub menu.
136
142
            $submenucount++;
137
143
            if ($menunode->get_url() !== null) {