Projet

Général

Profil

Révision 1f623f01

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/README.txt
4 4
 *  README for the Media Module.
5 5
 */
6 6

  
7
See http://drupal.org/node/356802
7
See -https://www.drupal.org/documentation/modules/media
8

  
9
Site Building Guide ->
10
 \/ Media and files
11
    \/ Media 
12
- https://www.drupal.org/documentation/modules/media
13
     > Media Internet Sources
14
     . Media and file cleanup
15
     . Media: YouTube upload
16
     > Upgrading Media 7.x-1.x to 7.x-2.x
17
     . Using existing files (FTP uploads etc)
18
     . Media Installation and distributions
19
     . Media 2.x Quick Start Guide
20
     . Displaying Media
21
     . Media Library
22
     . Media Roadmap
23
     > Media Recipes (custom FORM, developer recipes)
24
     > Media Developer Documentation (Outdated)
25
     > Media FAQ (Outdated)
26
     . Media Vimeo Uploader  
27

  
28
items preceded with a '>' indicate more available media module documentation sub categories
drupal7/sites/all/modules/media/media.info
24 24
; We have to add a fake version so Git checkouts do not fail Media dependencies
25 25
version = 7.x-2.x-dev
26 26

  
27
; Information added by Drupal.org packaging script on 2016-10-25
28
version = "7.x-2.0-beta3"
27
; Information added by Drupal.org packaging script on 2016-10-31
28
version = "7.x-2.0-beta5"
29 29
core = "7.x"
30 30
project = "media"
31
datestamp = "1477422289"
31
datestamp = "1477886358"
32 32

  
drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info
13 13
files[] = includes/MediaBrowserBulkUpload.inc
14 14
files[] = tests/media_bulk_upload.test
15 15

  
16
; Information added by Drupal.org packaging script on 2016-10-25
17
version = "7.x-2.0-beta3"
16
; Information added by Drupal.org packaging script on 2016-10-31
17
version = "7.x-2.0-beta5"
18 18
core = "7.x"
19 19
project = "media"
20
datestamp = "1477422289"
20
datestamp = "1477886358"
21 21

  
drupal7/sites/all/modules/media/modules/media_internet/media_internet.info
12 12
files[] = includes/MediaInternetValidationException.inc
13 13
files[] = tests/media_internet.test
14 14

  
15
; Information added by Drupal.org packaging script on 2016-10-25
16
version = "7.x-2.0-beta3"
15
; Information added by Drupal.org packaging script on 2016-10-31
16
version = "7.x-2.0-beta5"
17 17
core = "7.x"
18 18
project = "media"
19
datestamp = "1477422289"
19
datestamp = "1477886358"
20 20

  
drupal7/sites/all/modules/media/modules/media_internet/tests/media_internet_test.info
7 7
files[] = includes/MediaInternetTestStreamWrapper.inc
8 8
files[] = includes/MediaInternetTestHandler.inc
9 9

  
10
; Information added by Drupal.org packaging script on 2016-10-25
11
version = "7.x-2.0-beta3"
10
; Information added by Drupal.org packaging script on 2016-10-31
11
version = "7.x-2.0-beta5"
12 12
core = "7.x"
13 13
project = "media"
14
datestamp = "1477422289"
14
datestamp = "1477886358"
15 15

  
drupal7/sites/all/modules/media/modules/media_migrate_file_types/media_migrate_file_types.info
8 8

  
9 9
configure = admin/structure/file-types/upgrade
10 10

  
11
; Information added by Drupal.org packaging script on 2016-10-25
12
version = "7.x-2.0-beta3"
11
; Information added by Drupal.org packaging script on 2016-10-31
12
version = "7.x-2.0-beta5"
13 13
core = "7.x"
14 14
project = "media"
15
datestamp = "1477422289"
15
datestamp = "1477886358"
16 16

  
drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc
12 12
 *
13 13
 * @TODO check for security probably pass text through filter_xss
14 14
 */
15
function media_wysiwyg_filter($text, $filter, $format, $langcode, $cache, $cache_id) {
15
function media_wysiwyg_filter($text, $filter = NULL, $format = NULL, $langcode = NULL, $cache = NULL, $cache_id = NULL) {
16 16
  $replacements = array();
17 17
  $patterns = array();
18 18
  $rendered_text = $text;
drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.filter.js
231 231

  
232 232
      // Extract attributes represented by fields and use those values to keep
233 233
      // them in sync, usually alt and title.
234
      info.fields = info.attributes;
235
      var attributes = Drupal.media.filter.parseAttributeFields(info.attributes);
234
      var attributes = Drupal.media.filter.parseAttributeFields(info.fields);
236 235
      info.attributes = $.extend(info.attributes, attributes);
237 236

  
238 237
      // Move attributes from the file info array to the placeholder element.
drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.info
15 15

  
16 16
configure = admin/config/media/browser
17 17

  
18
; Information added by Drupal.org packaging script on 2016-10-25
19
version = "7.x-2.0-beta3"
18
; Information added by Drupal.org packaging script on 2016-10-31
19
version = "7.x-2.0-beta5"
20 20
core = "7.x"
21 21
project = "media"
22
datestamp = "1477422289"
22
datestamp = "1477886358"
23 23

  
drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info
5 5
dependencies[] = media_wysiwyg
6 6
files[] = media_wysiwyg_view_mode.test
7 7

  
8
; Information added by Drupal.org packaging script on 2016-10-25
9
version = "7.x-2.0-beta3"
8
; Information added by Drupal.org packaging script on 2016-10-31
9
version = "7.x-2.0-beta5"
10 10
core = "7.x"
11 11
project = "media"
12
datestamp = "1477422289"
12
datestamp = "1477886358"
13 13

  
drupal7/sites/all/modules/media/modules/mediafield/mediafield.info
4 4
core = 7.x
5 5
dependencies[] = media
6 6

  
7
; Information added by Drupal.org packaging script on 2016-10-25
8
version = "7.x-2.0-beta3"
7
; Information added by Drupal.org packaging script on 2016-10-31
8
version = "7.x-2.0-beta5"
9 9
core = "7.x"
10 10
project = "media"
11
datestamp = "1477422289"
11
datestamp = "1477886358"
12 12

  
drupal7/sites/all/modules/media/tests/media_module_test.info
6 6

  
7 7
files[] = includes/MediaModuleTest.inc
8 8

  
9
; Information added by Drupal.org packaging script on 2016-10-25
10
version = "7.x-2.0-beta3"
9
; Information added by Drupal.org packaging script on 2016-10-31
10
version = "7.x-2.0-beta5"
11 11
core = "7.x"
12 12
project = "media"
13
datestamp = "1477422289"
13
datestamp = "1477886358"
14 14

  
drupal7/sites/all/modules/webform_validation/webform_validation.info
3 3
core = 7.x
4 4
package = Webform
5 5
dependencies[] = webform
6
files[] = webform_validation.admin.inc
7
files[] = webform_validation.install
8
files[] = webform_validation.module
9
files[] = webform_validation.rules.inc
10
files[] = webform_validation.validators.inc
11 6
php = 5.3
12 7

  
13
; Information added by Drupal.org packaging script on 2016-02-17
14
version = "7.x-1.11"
8
; Information added by Drupal.org packaging script on 2016-10-31
9
version = "7.x-1.12"
15 10
core = "7.x"
16 11
project = "webform_validation"
17
datestamp = "1455735566"
12
datestamp = "1477935543"
18 13

  
drupal7/sites/all/modules/webform_validation/webform_validation.module
160 160

  
161 161
  if ($rules) {
162 162
    $component_definitions = webform_validation_prefix_keys($node->webform['components']);
163
    $sorter = webform_get_conditional_sorter($node);
164
    // If the form was retrieved from the form cache, the conditionals may not
165
    // have been executed yet.
166
    if (!$sorter->isExecuted()) {
167
      $sorter->executeConditionals(array(), 0);
168
    }
163 169
    // Remove hidden components.
164 170
    foreach ($component_definitions as $key => $component) {
165 171
      if (defined('WebformConditionals::componentShown')) {
166
        if (webform_get_conditional_sorter($node)->componentVisibility($component['cid'], $component['page_num']) !== WebformConditionals::componentShown) {
172
        if ($sorter->componentVisibility($component['cid'], $component['page_num']) !== WebformConditionals::componentShown) {
167 173
          unset($flat_values[$key]);
168 174
        }
169 175
      }
drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
601 601
        $entry[$count]['key'] = key($items);
602 602
        $value = array_shift($items);
603 603
        if ($components[$entry[$count]['key']]['type'] === 'date') {
604
          if (checkdate((int) $value['month'], (int) $value['day'], (int) $value['year'])) {
604
          if (!empty($value) && checkdate((int) $value['month'], (int) $value['day'], (int) $value['year'])) {
605 605
            $entry[$count]['value'] = date('Y-m-d', mktime(0, 0, 0, (int) $value['month'], (int) $value['day'], (int) $value['year']));
606 606
          }
607 607
          else {
......
927 927
 * Count the number of words in a value.
928 928
 *
929 929
 * Strip HTML first.
930
 *
931
 * @param string|array $val
932
 *   A string or array of strings in which to count words.
933
 *
934
 * @return int
935
 *   The number of words in the input.
930 936
 */
931 937
function _webform_validation_count_words($val) {
932 938
  $val = _webform_validation_flatten_array($val);
933 939

  
940
  // Strip any HTML tags so they're not counted in the word count.
934 941
  $val = strip_tags($val);
935
  // Replace entities representing spaces with actual spaces.
936
  $val = str_replace(' ', ' ', $val);
937
  $val = str_replace(' ', ' ', $val);
942
  // Convert character entities back to characters. Without this, entities for
943
  // whitespace characters would not be counted as word boundaries.
944
  $val = html_entity_decode($val);
938 945

  
939
  return str_word_count($val);
946
  return count(preg_split('/[[:space:]\xC2\xA0]+/', $val));
940 947
}
941 948

  
942 949
/**
drupal7/sites/all/themes/bootstrap/bootstrap.info
208 208
multipliers[screen-lg-min][] = 1.5x
209 209
multipliers[screen-lg-min][] = 2x
210 210

  
211
; Information added by Drupal.org packaging script on 2016-08-03
212
version = "7.x-3.6"
211
; Information added by Drupal.org packaging script on 2016-11-02
212
version = "7.x-3.8"
213 213
core = "7.x"
214 214
project = "bootstrap"
215
datestamp = "1470203941"
215
datestamp = "1478114647"
216 216

  
drupal7/sites/all/themes/bootstrap/composer.json
1
{
2
  "name": "drupal/bootstrap",
3
  "description": "Built to use Bootstrap, a sleek, intuitive, and powerful front-end framework for faster and easier web development.",
4
  "type": "drupal-theme",
5
  "license": "GPL-2.0",
6
  "homepage": "http://drupal.org/project/bootstrap",
7
  "authors": [
8
    {
9
      "name": "Mark Carver (markcarver)",
10
      "homepage": "https://www.drupal.org/u/markcarver",
11
      "role": "Maintainer"
12
    },
13
    {
14
      "name": "John McCormick (neardark)",
15
      "homepage": "https://www.drupal.org/u/neardark",
16
      "role": "Co-maintainer"
17
    },
18
    {
19
      "name": "Fabiano Sant'Ana (wundo)",
20
      "homepage": "https://www.drupal.org/u/wundo",
21
      "role": "Co-maintainer"
22
    }
23
  ],
24
  "support": {
25
    "docs": "http://drupal-bootstrap.org",
26
    "issues": "https://www.drupal.org/project/issues/bootstrap",
27
    "irc": "irc://irc.freenode.org/drupal-bootstrap",
28
    "source": "http://cgit.drupalcode.org/bootstrap"
29
  }
30
}
drupal7/sites/all/themes/bootstrap/docs/README.md
24 24
- @link subtheme_settings Theme Settings @endlink
25 25
- @link subtheme_helper_functions Helper Functions @endlink
26 26
- @link subtheme_cdn CDN Starterkit @endlink
27
- @link subtheme_less LESS Starterkit @endlink
27
- @link subtheme_less Less Starterkit @endlink
28
- @link subtheme_sass Sass Starterkit @endlink
28 29

  
29 30
#### @link registry Theme Registry @endlink
30 31
- @link theme_preprocess Preprocess Functions (.vars.php) @endlink
drupal7/sites/all/themes/bootstrap/docs/subtheme/README.md
22 22

  
23 23
- @link subtheme_cdn CDN Starterkit @endlink - uses the "out-of-the-box"
24 24
  CSS and JavaScript files served by the [jsDelivr CDN].
25
- @link subtheme_less LESS Starterkit @endlink - uses the [Bootstrap Framework]
26
  [LESS] source files and a local [LESS] preprocessor.
25
- @link subtheme_less Less Starterkit @endlink - uses the [Bootstrap Framework]
26
  source files and a local [Less] preprocessor.
27
- @link subtheme_sass Sass Starterkit @endlink - uses the [Bootstrap Framework]
28
  source files and a local [Sass] preprocessor.
27 29

  
28 30
#### Create a New Sub-theme {#create}
29 31

  
......
56 58
[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
57 59
[Bootstrap Framework]: http://getbootstrap.com
58 60
[jsDelivr CDN]: http://www.jsdelivr.com
59
[LESS]: http://lesscss.org
61
[Less]: http://lesscss.org
62
[Sass]: http://sass-lang.com
drupal7/sites/all/themes/bootstrap/includes/common.inc
575 575
  return $files[$hash];
576 576
}
577 577

  
578
/**
579
 * Filters HTML to prevent cross-site-scripting (XSS) vulnerabilities.
580
 *
581
 * Very similar to core's filter_xss(). It does, however, include the addition
582
 * of the "span", "div" and "i" elements which are commonly used in Bootstrap.
583
 *
584
 * @param string $string
585
 *   The string with raw HTML in it. It will be stripped of everything that can
586
 *   cause an XSS attack.
587
 * @param array $allowed_tags
588
 *   An array of allowed tags.
589
 *
590
 * @return string
591
 *   An XSS safe version of $string, or an empty string if $string is not
592
 *   valid UTF-8.
593
 *
594
 * @see filter_xss()
595
 */
596
function _bootstrap_filter_xss($string, array $allowed_tags = NULL) {
597
  if (is_null($allowed_tags)) {
598
    $allowed_tags = array(
599
      // Inline elements.
600
      'a',
601
      'cite',
602
      'em',
603
      'i',
604
      'span',
605
      'strong',
606

  
607
      // Block elements.
608
      'blockquote',
609
      'code',
610
      'div',
611
      'ul',
612
      'ol',
613
      'li',
614
      'dl',
615
      'dt',
616
      'dd',
617
    );
618
  }
619
  return filter_xss($string, $allowed_tags);
620
}
621

  
578 622
/**
579 623
 * Returns a list of available Bootstrap Glyphicons.
580 624
 *
......
1058 1102
        t('Filter')             => 'primary',
1059 1103
        t('Submit')             => 'primary',
1060 1104
        t('Search')             => 'primary',
1105
        t('Log in')             => 'primary',
1061 1106

  
1062 1107
        // Success class.
1063 1108
        t('Add')                => 'success',
......
1156 1201
        t('Delete')     => 'trash',
1157 1202
        t('Remove')     => 'trash',
1158 1203
        t('Upload')     => 'upload',
1204
        t('Log In')     => 'log-in',
1159 1205
      ),
1160 1206
    );
1161 1207

  
drupal7/sites/all/themes/bootstrap/js/modules/ctools/js/modal.js
39 39
      modalOptions: {
40 40
        opacity: 0.55,
41 41
        background: '#fff'
42
      }
42
      },
43
      modalClass: 'default'
43 44
    };
44 45

  
45 46
    var settings = {};
......
99 100
    resize();
100 101

  
101 102
    $('.modal-title', Drupal.CTools.Modal.modal).html(Drupal.CTools.Modal.currentSettings.loadingText);
102
    Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed);
103
    $('#modalContent .modal-body').html(Drupal.theme(settings.throbberTheme));
103
    Drupal.CTools.Modal.modalContent(Drupal.CTools.Modal.modal, settings.modalOptions, settings.animation, settings.animationSpeed, settings.modalClass);
104
    $('#modalContent .modal-body').html(Drupal.theme(settings.throbberTheme)).addClass('ctools-modal-loading');
104 105
  };
105 106

  
106 107
  /**
drupal7/sites/all/themes/bootstrap/starterkits/less/README.md
11 11
- [Overrides](#overrides)
12 12

  
13 13
## Prerequisites
14
- Read the @link getting_started Getting Started @endlink documentation topic.
14
- Read the @link getting_started Getting Started @endlink and @link subtheme Sub-theming @endlink documentation topics.
15 15
- You must understand the basic concept of using the [Less] CSS pre-processor.
16 16
- You must use a **[local Less compiler](https://www.google.com/search?q=less+compiler)**.
17 17
- You must use the [Bootstrap Framework Source Files] ending in the `.less`
drupal7/sites/all/themes/bootstrap/starterkits/sass/README.md
1 1
<!-- @file Instructions for subtheming using the Sass Starterkit. -->
2
<!-- @defgroup sub_theming_sass -->
3
<!-- @ingroup sub_theming -->
2
<!-- @defgroup subtheme_sass -->
3
<!-- @ingroup subtheme -->
4 4
# Sass Starterkit
5 5

  
6 6
Below are instructions on how to create a Bootstrap sub-theme using a Sass
......
11 11
- [Overrides](#overrides)
12 12

  
13 13
## Prerequisites
14
- Read the @link getting_started Getting Started @endlink documentation topic.
14
- Read the @link getting_started Getting Started @endlink and @link subtheme Sub-theming @endlink documentation topics.
15 15
- You must understand the basic concept of using the [Sass] CSS pre-processor.
16 16
- You must use a **[local Sass compiler](https://www.google.com/search?q=sass+compiler)**.
17 17
- You must use the [Bootstrap Framework Source Files] ending in the `.scss`
......
50 50

  
51 51
#### See also:
52 52
- @link templates Templates @endlink
53
- @link theme_settings Theme Settings @endlink
53
- @link subtheme_settings Theme Settings @endlink
54 54
- @link registry Theme Registry @endlink
55 55

  
56 56
[Bootstrap Framework]: http://getbootstrap.com
drupal7/sites/all/themes/bootstrap/templates/block/block.vars.php
36 36
  if (!isset($variables['title'])) {
37 37
    $variables['title'] = $variables['block']->subject;
38 38
  }
39
  $variables['title'] = _bootstrap_filter_xss($variables['title']);
39 40
}
drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.tpl.php
23 23
        <?php if ($item['title'] || $item['description']): ?>
24 24
          <div class="carousel-caption">
25 25
            <?php if ($item['title']): ?>
26
              <h3><?php print render($item['title']); ?></h3>
26
              <h3><?php print $item['title']; ?></h3>
27 27
            <?php endif; ?>
28 28
            <?php if ($item['description']): ?>
29
              <p><?php print render($item['description']); ?></p>
29
              <p><?php print $item['description']; ?></p>
30 30
            <?php endif; ?>
31 31
          </div>
32 32
        <?php endif; ?>
drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-carousel.vars.php
64 64
      'description' => NULL,
65 65
      'url' => NULL,
66 66
    );
67

  
68
    if (!empty($variables['items'][$delta]['title'])) {
69
      $variables['items'][$delta]['title'] = _bootstrap_filter_xss(render($item['title']));
70
    }
71

  
72
    if (!empty($variables['items'][$delta]['description'])) {
73
      $variables['items'][$delta]['description'] = _bootstrap_filter_xss(render($item['description']));
74
    }
75

  
67 76
  }
68 77
}
drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-dropdown.vars.php
35 35
    if (is_string($element['#toggle'])) {
36 36
      $element['#toggle'] = array(
37 37
        '#theme' => 'link__bootstrap_dropdown__toggle',
38
        '#text' => $element['#toggle'],
38
        '#text' => _bootstrap_filter_xss($element['#toggle']),
39 39
        '#path' => '#',
40 40
        '#options' => array(
41 41
          'attributes' => array(),
drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-modal.vars.php
45 45
function bootstrap_process_bootstrap_modal(&$variables) {
46 46
  $variables['attributes'] = drupal_attributes($variables['attributes']);
47 47
  $variables['dialog_attributes'] = drupal_attributes($variables['dialog_attributes']);
48
  $variables['heading'] = _bootstrap_filter_xss(render($variables['heading']));
48 49
  $variables['body'] = render($variables['body']);
49 50
  $variables['footer'] = render($variables['footer']);
50 51
}
drupal7/sites/all/themes/bootstrap/templates/bootstrap/bootstrap-panel.vars.php
86 86
 */
87 87
function bootstrap_process_bootstrap_panel(&$variables) {
88 88
  $variables['attributes'] = drupal_attributes($variables['attributes']);
89
  if (!empty($variables['title'])) {
90
    $variables['title'] = _bootstrap_filter_xss(render($variables['title']));
91
  }
92
  if (!empty($variables['description'])) {
93
    $variables['description'] = _bootstrap_filter_xss(render($variables['description']));
94
  }
89 95
}
drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.func.php
22 22
  $element = $variables['element'];
23 23
  $sub_menu = '';
24 24

  
25
  $title = $element['#title'];
26
  $href = $element['#href'];
27
  $options = !empty($element['#localized_options']) ? $element['#localized_options'] : array();
28
  $attributes = !empty($element['#attributes']) ? $element['#attributes'] : array();
29

  
25 30
  if ($element['#below']) {
26 31
    // Prevent dropdown functions from being added to management menu so it
27 32
    // does not affect the navbar module.
......
32 37
      // Add our own wrapper.
33 38
      unset($element['#below']['#theme_wrappers']);
34 39
      $sub_menu = '<ul class="dropdown-menu">' . drupal_render($element['#below']) . '</ul>';
40

  
35 41
      // Generate as standard dropdown.
36
      $element['#title'] .= ' <span class="caret"></span>';
37
      $element['#attributes']['class'][] = 'dropdown';
38
      $element['#localized_options']['html'] = TRUE;
42
      $title .= ' <span class="caret"></span>';
43
      $attributes['class'][] = 'dropdown';
44

  
45
      $options['html'] = TRUE;
39 46

  
40 47
      // Set dropdown trigger element to # to prevent inadvertant page loading
41 48
      // when a submenu link is clicked.
42
      $element['#localized_options']['attributes']['data-target'] = '#';
43
      $element['#localized_options']['attributes']['class'][] = 'dropdown-toggle';
44
      $element['#localized_options']['attributes']['data-toggle'] = 'dropdown';
49
      $options['attributes']['data-target'] = '#';
50
      $options['attributes']['class'][] = 'dropdown-toggle';
51
      $options['attributes']['data-toggle'] = 'dropdown';
45 52
    }
46 53
  }
47
  // On primary navigation menu, class 'active' is not set on active menu item.
48
  // @see https://drupal.org/node/1896674
49
  if (($element['#href'] == $_GET['q'] || ($element['#href'] == '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {
50
    $element['#attributes']['class'][] = 'active';
54

  
55
  // Filter the title if the "html" is set, otherwise l() will automatically
56
  // sanitize using check_plain(), so no need to call that here.
57
  if (!empty($options['html'])) {
58
    $title = _bootstrap_filter_xss($title);
51 59
  }
52
  $output = l($element['#title'], $element['#href'], $element['#localized_options']);
53
  return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
60

  
61
  return '<li' . drupal_attributes($attributes) . '>' . l($title, $href, $options) . $sub_menu . "</li>\n";
54 62
}
55 63

  
56 64
/**
......
59 67
function bootstrap_menu_link__book_toc(array $variables) {
60 68
  $element = $variables['element'];
61 69
  $sub_menu = drupal_render($element['#below']);
62
  $element['#attributes']['role'] = 'presentation';
70

  
71
  $title = $element['#title'];
72
  $href = $element['#href'];
73
  $options = !empty($element['#localized_options']) ? $element['#localized_options'] : array();
74
  $attributes = !empty($element['#attributes']) ? $element['#attributes'] : array();
75
  $attributes['role'] = 'presentation';
76

  
77
  // Header.
63 78
  $link = TRUE;
64
  if ($element['#title'] && $element['#href'] === FALSE) {
65
    $element['#attributes']['class'][] = 'dropdown-header';
79
  if ($title && $href === FALSE) {
80
    $attributes['class'][] = 'dropdown-header';
66 81
    $link = FALSE;
67 82
  }
68
  elseif ($element['#title'] === FALSE && $element['#href'] === FALSE) {
69
    $element['#attributes']['class'][] = 'divider';
83
  // Divider.
84
  elseif ($title === FALSE && $href === FALSE) {
85
    $attributes['class'][] = 'divider';
70 86
    $link = FALSE;
71 87
  }
72
  elseif (($element['#href'] == $_GET['q'] || ($element['#href'] == '<front>' && drupal_is_front_page())) && (empty($element['#localized_options']['language']))) {
73
    $element['#attributes']['class'][] = 'active';
88
  // Active.
89
  elseif (($href == $_GET['q'] || ($href == '<front>' && drupal_is_front_page())) && (empty($options['language']))) {
90
    $attributes['class'][] = 'active';
91
  }
92

  
93
  // Filter the title if the "html" is set, otherwise l() will automatically
94
  // sanitize using check_plain(), so no need to call that here.
95
  if (!empty($options['html'])) {
96
    $title = _bootstrap_filter_xss($title);
74 97
  }
98

  
99
  // Convert to a link.
75 100
  if ($link) {
76
    $element['#title'] = l($element['#title'], $element['#href'], $element['#localized_options']);
101
    $title = l($title, $href, $options);
77 102
  }
78
  return '<li' . drupal_attributes($element['#attributes']) . '>' . $element['#title'] . $sub_menu . "</li>\n";
103

  
104
  return '<li' . drupal_attributes($attributes) . '>' . $title . $sub_menu . "</li>\n";
79 105
}
drupal7/sites/all/themes/bootstrap/templates/menu/menu-link.vars.php
1
<?php
2
/**
3
 * @file
4
 * Stub file for "menu_link" theme hook [pre]process functions.
5
 */
6

  
7
/**
8
 * Pre-processes variables for the "menu_link" theme hook.
9
 *
10
 * See theme function for list of available variables.
11
 *
12
 * @see bootstrap_menu_link()
13
 * @see theme_menu_link()
14
 *
15
 * @ingroup theme_preprocess
16
 */
17
function bootstrap_preprocess_menu_link(array &$variables) {
18
  $element = &$variables['element'];
19

  
20
  // Determine if the link should be shown as "active" based on the current
21
  // active trail (set by core/contrib modules).
22
  // @see https://www.drupal.org/node/2618828
23
  // @see https://www.drupal.org/node/1896674
24
  if (in_array('active-trail', _bootstrap_get_classes($element)) || ($element['#href'] == '<front>' && drupal_is_front_page())) {
25
    $element['#attributes']['class'][] = 'active';
26
  }
27
}
drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-action.func.php
22 22
 */
23 23
function bootstrap_menu_local_action($variables) {
24 24
  $link = $variables['element']['#link'];
25

  
25
  $title = $link['title'];
26
  $icon = _bootstrap_iconize_text($title);
27
  $href = !empty($link['href']) ? $link['href'] : FALSE;
26 28
  $options = isset($link['localized_options']) ? $link['localized_options'] : array();
27 29

  
28
  // If the title is not HTML, sanitize it.
29
  if (empty($options['html'])) {
30
    $link['title'] = check_plain($link['title']);
31
  }
32

  
33
  $icon = _bootstrap_iconize_text($link['title']);
34

  
35 30
  // Format the action link.
36
  $output = '';
37
  if (isset($link['href'])) {
31
  if ($href) {
38 32
    // Turn link into a mini-button and colorize based on title.
39
    if ($class = _bootstrap_colorize_text($link['title'])) {
33
    if ($class = _bootstrap_colorize_text($title)) {
40 34
      if (!isset($options['attributes']['class'])) {
41 35
        $options['attributes']['class'] = array();
42 36
      }
......
53 47
    }
54 48
    // Force HTML so we can render any icon that may have been added.
55 49
    $options['html'] = !empty($options['html']) || !empty($icon) ? TRUE : FALSE;
56
    $output .= l($icon . $link['title'], $link['href'], $options);
57 50
  }
58
  else {
59
    $output .= $icon . $link['title'];
51

  
52
  // Filter the title if the "html" is set, otherwise l() will automatically
53
  // sanitize using check_plain(), so no need to call that here.
54
  if (!empty($options['html'])) {
55
    $title = _bootstrap_filter_xss($title);
60 56
  }
61 57

  
62
  return $output;
58
  return $href ? l($icon . $title, $href, $options) : $icon . $title;
63 59
}
drupal7/sites/all/themes/bootstrap/templates/menu/menu-local-task.func.php
23 23
 */
24 24
function bootstrap_menu_local_task($variables) {
25 25
  $link = $variables['element']['#link'];
26
  $link_text = $link['title'];
26

  
27
  $options = isset($link['localized_options']) ? $link['localized_options'] : array();
28
  $title = $link['title'];
29
  $href = $link['href'];
27 30
  $attributes = array();
28 31

  
32
  // Add text to indicate active tab for non-visual users.
29 33
  if (!empty($variables['element']['#active'])) {
30
    // Add text to indicate active tab for non-visual users.
31
    $active = '<span class="element-invisible">' . t('(active tab)') . '</span>';
32

  
33
    // If the link does not contain HTML already, check_plain() it now.
34
    // After we set 'html'=TRUE the link will not be sanitized by l().
35
    if (empty($link['localized_options']['html'])) {
36
      $link['title'] = check_plain($link['title']);
37
    }
38
    $link['localized_options']['html'] = TRUE;
39
    $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active));
40

  
34
    $options['html'] = TRUE;
41 35
    $attributes['class'][] = 'active';
36
    $title = t('!local-task-title!active', array(
37
      '!local-task-title' => $title,
38
      '!active' => '<span class="element-invisible">' . t('(active tab)') . '</span>',
39
    ));
40
  }
41

  
42
  // Filter the title if the "html" is set, otherwise l() will automatically
43
  // sanitize using check_plain(), so no need to call that here.
44
  if (!empty($options['html'])) {
45
    $title = _bootstrap_filter_xss($title);
42 46
  }
43 47

  
44
  return '<li' . drupal_attributes($attributes) . '>' . l($link_text, $link['href'], $link['localized_options']) . "</li>\n";
48
  return '<li' . drupal_attributes($attributes) . '>' . l($title, $href, $options) . "</li>\n";
45 49
}
drupal7/sites/all/themes/bootstrap/templates/system/button.func.php
38 38
  }
39 39

  
40 40
  // This line break adds inherent margin between multiple buttons.
41
  return '<button' . drupal_attributes($element['#attributes']) . '>' . $text . "</button>\n";
41
  return '<button' . drupal_attributes($element['#attributes']) . '>' . _bootstrap_filter_xss($text) . "</button>\n";
42 42
}
drupal7/sites/all/themes/bootstrap/templates/system/form-element.func.php
80 80
  }
81 81

  
82 82
  // Check for errors and set correct error class.
83
  if ((isset($element['#parents']) && form_get_error($element)) || (!empty($element['#required']) && bootstrap_setting('forms_required_has_error'))) {
83
  if ((isset($element['#parents']) && form_get_error($element) !== NULL) || (!empty($element['#required']) && bootstrap_setting('forms_required_has_error'))) {
84 84
    $wrapper_attributes['class'][] = 'has-error';
85 85
  }
86 86

  
......
156 156
      '#attributes' => array(
157 157
        'class' => array('help-block'),
158 158
      ),
159
      '#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 2,
159
      '#weight' => isset($element['#description_display']) && $element['#description_display'] === 'before' ? 0 : 20,
160 160
      0 => array('#markup' => filter_xss_admin($element['#description'])),
161 161
    );
162 162
  }
drupal7/sites/all/themes/bootstrap/templates/system/item-list.func.php
57 57
    // Heading outputs only when it has text.
58 58
    if (!empty($title['text'])) {
59 59
      $heading .= '<' . $title['level'] . drupal_attributes($title['attributes']) . '>';
60
      $heading .= empty($title['html']) ? check_plain($title['text']) : $title['text'];
60
      $heading .= empty($title['html']) ? check_plain($title['text']) : _bootstrap_filter_xss($title['text']);
61 61
      $heading .= '</' . $title['level'] . '>';
62 62
    }
63 63
  }
drupal7/sites/all/themes/bootstrap/templates/system/page.tpl.php
87 87
      <?php endif; ?>
88 88

  
89 89
      <?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?>
90
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
90
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
91 91
          <span class="sr-only"><?php print t('Toggle navigation'); ?></span>
92 92
          <span class="icon-bar"></span>
93 93
          <span class="icon-bar"></span>
......
97 97
    </div>
98 98

  
99 99
    <?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?>
100
      <div class="navbar-collapse collapse">
100
      <div class="navbar-collapse collapse" id="navbar-collapse">
101 101
        <nav role="navigation">
102 102
          <?php if (!empty($primary_nav)): ?>
103 103
            <?php print render($primary_nav); ?>
drupal7/sites/all/themes/bootstrap/templates/system/progress-bar.vars.php
1
<?php
2
/**
3
 * @file
4
 * Stub file for "progress_bar" theme hook [pre]process functions.
5
 */
6

  
7
/**
8
 * Processes variables for the "progress_bar" theme hook.
9
 *
10
 * See template for list of available variables.
11
 *
12
 * @see progress-bar.tpl.php
13
 *
14
 * @ingroup theme_process
15
 */
16
function bootstrap_process_progress_bar(&$variables) {
17
  $variables['percent'] = check_plain($variables['percent']);
18
  $variables['message'] = _bootstrap_filter_xss($variables['message']);
19
}
drupal7/sites/all/themes/bootstrap/templates/system/status-messages.func.php
60 60
    $output .= "  <a class=\"close\" data-dismiss=\"alert\" href=\"#\">&times;</a>\n";
61 61

  
62 62
    if (!empty($status_heading[$type])) {
63
      $output .= '<h4 class="element-invisible">' . $status_heading[$type] . "</h4>\n";
63
      $output .= '<h4 class="element-invisible">' . _bootstrap_filter_xss($status_heading[$type]) . "</h4>\n";
64 64
    }
65 65

  
66 66
    if (count($messages) > 1) {
67 67
      $output .= " <ul>\n";
68 68
      foreach ($messages as $message) {
69
        $output .= '  <li>' . $message . "</li>\n";
69
        $output .= '  <li>' . _bootstrap_filter_xss($message) . "</li>\n";
70 70
      }
71 71
      $output .= " </ul>\n";
72 72
    }
drupal7/sites/all/themes/bootstrap/templates/webform/webform-element.func.php
14 14
  $element = &$variables['element'];
15 15

  
16 16
  // Inline title.
17
  if ($element['#title_display'] === 'inline') {
17
  if (isset($element['#title_display']) && $element['#title_display'] === 'inline') {
18 18
    $element['#title_display'] = 'before';
19 19
    $element['#wrapper_attributes']['class'][] = 'form-inline';
20 20
  }
......
29 29
    $element['#input_group'] = TRUE;
30 30
  }
31 31

  
32
  // Render with bootstrap_form_element().
33
  bootstrap_include('bootstrap', 'templates/system/form-element.func.php');
34
  return bootstrap_form_element($variables);
32
  // Render as a normal "form_element" theme hook.
33
  return theme('form_element', $variables);
35 34
}

Formats disponibles : Unified diff