Projet

Général

Profil

Révision 64156087

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/includes/media.fields.inc
408 408
    }
409 409
  }
410 410

  
411
  ksort($submitted_values);
411 412
  // Re-index deltas after removing empty items.
412 413
  $submitted_values = array_values($submitted_values);
413 414

  
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 2017-02-01
28
version = "7.x-2.0-rc4"
27
; Information added by Drupal.org packaging script on 2017-02-03
28
version = "7.x-2.0-rc5"
29 29
core = "7.x"
30 30
project = "media"
31
datestamp = "1485983588"
31
datestamp = "1486142925"
32 32

  
drupal7/sites/all/modules/media/modules/media_bulk_upload/media_bulk_upload.info
3 3
package = Media
4 4
core = 7.x
5 5

  
6
configure = admin/config/media/browser
7

  
6 8
dependencies[] = media
7 9
dependencies[] = multiform (>= 7.x-1.3)
8 10
dependencies[] = plupload
......
13 15
files[] = includes/MediaBrowserBulkUpload.inc
14 16
files[] = tests/media_bulk_upload.test
15 17

  
16
; Information added by Drupal.org packaging script on 2017-02-01
17
version = "7.x-2.0-rc4"
18
; Information added by Drupal.org packaging script on 2017-02-03
19
version = "7.x-2.0-rc5"
18 20
core = "7.x"
19 21
project = "media"
20
datestamp = "1485983588"
22
datestamp = "1486142925"
21 23

  
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 2017-02-01
16
version = "7.x-2.0-rc4"
15
; Information added by Drupal.org packaging script on 2017-02-03
16
version = "7.x-2.0-rc5"
17 17
core = "7.x"
18 18
project = "media"
19
datestamp = "1485983588"
19
datestamp = "1486142925"
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 2017-02-01
11
version = "7.x-2.0-rc4"
10
; Information added by Drupal.org packaging script on 2017-02-03
11
version = "7.x-2.0-rc5"
12 12
core = "7.x"
13 13
project = "media"
14
datestamp = "1485983588"
14
datestamp = "1486142925"
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 2017-02-01
12
version = "7.x-2.0-rc4"
11
; Information added by Drupal.org packaging script on 2017-02-03
12
version = "7.x-2.0-rc5"
13 13
core = "7.x"
14 14
project = "media"
15
datestamp = "1485983588"
15
datestamp = "1486142925"
16 16

  
drupal7/sites/all/modules/media/modules/media_wysiwyg/js/media_wysiwyg.filter.js
362 362
            }
363 363
          }
364 364
        }
365
        else {
366
          return false;
367
        }
368
      }
369
      else {
370
        return false;
365 371
      }
366 372

  
367 373
      return Drupal.media.filter.syncAttributesToFields(file_info);
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 2017-02-01
19
version = "7.x-2.0-rc4"
18
; Information added by Drupal.org packaging script on 2017-02-03
19
version = "7.x-2.0-rc5"
20 20
core = "7.x"
21 21
project = "media"
22
datestamp = "1485983588"
22
datestamp = "1486142925"
23 23

  
drupal7/sites/all/modules/media/modules/media_wysiwyg_view_mode/media_wysiwyg_view_mode.info
3 3
package = Media
4 4
core = 7.x
5 5

  
6
; Information added by Drupal.org packaging script on 2017-02-01
7
version = "7.x-2.0-rc4"
6
; Information added by Drupal.org packaging script on 2017-02-03
7
version = "7.x-2.0-rc5"
8 8
core = "7.x"
9 9
project = "media"
10
datestamp = "1485983588"
10
datestamp = "1486142925"
11 11

  
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 2017-02-01
8
version = "7.x-2.0-rc4"
7
; Information added by Drupal.org packaging script on 2017-02-03
8
version = "7.x-2.0-rc5"
9 9
core = "7.x"
10 10
project = "media"
11
datestamp = "1485983588"
11
datestamp = "1486142925"
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 2017-02-01
10
version = "7.x-2.0-rc4"
9
; Information added by Drupal.org packaging script on 2017-02-03
10
version = "7.x-2.0-rc5"
11 11
core = "7.x"
12 12
project = "media"
13
datestamp = "1485983588"
13
datestamp = "1486142925"
14 14

  
drupal7/sites/all/modules/panels/KNOWN_ISSUES.txt
88 88
    secure pages doesn't know about. When trying to make non-secure ajax calls
89 89
    from a secure page, the browser denies the call.
90 90
  Solution:
91
    The solution is to simply add panels/* to your Secure Pages configuration.
91
    The solution is to simply add panels/* to your Secure Pages configuration.
drupal7/sites/all/modules/panels/README.txt
1 1
Welcome to Panels 3
2 2

  
3
Documentation is available at https://www.drupal.org/node/496278
3
Documentation is available at https://www.drupal.org/node/496278
drupal7/sites/all/modules/panels/css/panels-dashboard.css
1

  
2 1
.dashboard-entry .dashboard-link {
3 2
  font-size: 120%;
4 3
  font-weight: bold;
drupal7/sites/all/modules/panels/css/panels.css
1

  
2 1
div.panel-pane div.admin-links {
3 2
  font-size: xx-small;
4 3
  margin-right: 1em;
drupal7/sites/all/modules/panels/css/panels_admin.css
1

  
2 1
.layout-link {
3 2
  float: left;
4 3
  padding: 1em;
......
141 140
}
142 141

  
143 142
tr.changed td {
144
  background-color: #FFFFDD !important;
143
  background-color: #ffffdd !important;
145 144
}
146 145

  
147 146
tr.changed td span.star {
148 147
  font-weight: bold;
149
  color: #E09010;
148
  color: #e09010;
150 149
}
151 150

  
152 151
td select {
drupal7/sites/all/modules/panels/css/panels_dnd.css
1

  
2 1
#panels-dnd-main {
3 2
  margin: 0.5em 0;
4 3
}
......
42 41
}
43 42

  
44 43
/* Add Icon */
45
#panels-dnd-main div.panel-region .pane-add-link  {
44
#panels-dnd-main div.panel-region .pane-add-link {
46 45
}
47 46
#panels-dnd-main div.panel-region .pane-add-link img {
48 47
  display: none;
......
127 126
}
128 127

  
129 128
.panel-portlet .changed div.grab-title {
130
  background-color: #FFFFDD !important;
131
  border-bottom: 1px solid #3D9CD7 !important;
129
  background-color: #ffffdd !important;
130
  border-bottom: 1px solid #3d9cd7 !important;
132 131
  color: black !important;
133 132
}
134 133

  
135 134
.panel-portlet .changed.hidden-pane div.grab-title {
136
  background-color: #B4B488 !important;
137
  border-bottom: 1px solid #3D9CD7 !important;
135
  background-color: #b4b488 !important;
136
  border-bottom: 1px solid #3d9cd7 !important;
138 137
}
139 138

  
140 139
.panel-portlet .changed div.grab-title span.star {
141 140
  font-weight: bold;
142
  color: #E09010;
141
  color: #e09010;
143 142
}
144 143

  
145 144
.panel-portlet .grabber:hover {
146 145
  color: #fff;
147
  background-color: #2F78A5;
146
  background-color: #2f78a5;
148 147
}
149 148

  
150 149
.panel-portlet.hidden-pane .grab-title:hover {
......
175 174
  margin: 0;
176 175
}
177 176

  
178
.panel-portlet .buttons input, .panel-portlet .buttons button {
177
.panel-portlet .buttons input,
178
.panel-portlet .buttons button {
179 179
  margin: 0;
180 180
  padding: 0;
181 181
  display: inline;
......
186 186
}
187 187

  
188 188
.panel-portlet .pane-title {
189
  font-size:110%;
189
  font-size: 110%;
190 190
  cursor: pointer;
191 191
}
192 192

  
......
315 315
  padding-left: 1em;
316 316
  padding-bottom: 1em;
317 317
  margin-bottom: 1em;
318
  background-color: #EEEEEE;
318
  background-color: #eeeeee;
319 319
}
320 320

  
321 321
.panels-section-columns {
......
354 354

  
355 355
.panels-section-column-categories .inside {
356 356
  padding: 0;
357
 }
357
}
358 358

  
359 359
.panels-section-column-categories .content-type-button {
360 360
  padding-left: 10px;
......
431 431
  float: none;
432 432
}
433 433

  
434
.panels-modal-content .modal-form .no-float label  {
434
.panels-modal-content .modal-form .no-float label {
435 435
  width: auto;
436 436
}
437 437

  
......
502 502
/* @group CTools Dropdown */
503 503
#panels-dnd-main .ctools-dropdown a.ctools-dropdown-text-link,
504 504
html.js div.panels-display-links a.ctools-dropdown-text-link {
505

  
506 505
  background: url('../images/arrow-down-light.png') 0 3px no-repeat!important;
507 506
  padding-left: 12px;
508 507
}
......
522 521

  
523 522
html.js #panels-dnd-main div.ctools-dropdown div.ctools-dropdown-container ul li,
524 523
html.js div.panels-display-links div.ctools-dropdown-container ul li {
525

  
526 524
  text-decoration: none;
527 525
  padding: 0;
528 526
  margin: 0;
......
565 563
html.js div.panels-display-links div.ctools-dropdown-container ul li .panels-sub-menu ul li a,
566 564
html.js #panels-dnd-main div.ctools-dropdown div.ctools-dropdown-container ul li .panels-sub-menu span.panels-text,
567 565
html.js div.panels-display-links div.ctools-dropdown-container ul li .panels-sub-menu span.panels-text {
568
  width:auto;
566
  width: auto;
569 567
  padding: 0 20px;
570 568
}
571 569

  
......
682 680
  top: -2em;
683 681
  margin-bottom: -2em;
684 682
}
685

  
drupal7/sites/all/modules/panels/css/panels_page.css
1

  
2 1
div.panels-page-type-container {
3 2
  clear: left;
4 3
}
drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.i18n.inc
1 1
<?php
2 2
/**
3 3
 * @file
4
 * Internationalization (i18n) hooks
4
 * Internationalization (i18n) hooks.
5 5
 */
6 6

  
7 7
/**
drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.info
7 7
package = Multilingual - Internationalization
8 8
core = 7.x
9 9

  
10
; Information added by Drupal.org packaging script on 2016-10-16
11
version = "7.x-3.8"
10
; Information added by Drupal.org packaging script on 2017-02-06
11
version = "7.x-3.9"
12 12
core = "7.x"
13 13
project = "panels"
14
datestamp = "1476582295"
14
datestamp = "1486394388"
15 15

  
drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.module
206 206
 *
207 207
 * This function must not rely on the passed $renderer parameter. The parameter
208 208
 * could be empty because this function is reused in i18n_ctools_render_alter().
209
 *
209 210
 * @todo Check if a drupal_alter() in panels_display::get_title() is applicable.
210 211
 *
211 212
 * @see i18n_ctools_render_alter()
......
234 235
 *
235 236
 * Under some circumstances the title of the panel page is set before
236 237
 * hook_panels_pre_render() is fired. Such cases can be handled with this hook.
238
 *
237 239
 * @todo Check if a drupal_alter() in panels_display::get_title() is applicable.
238 240
 */
239 241
function i18n_ctools_render_alter(&$info, $page, $context) {
......
250 252
 * Implements hook_ctools_plugin_post_alter().
251 253
 *
252 254
 * Register some translatable configuration settings for plugins.
253
 *
254 255
 */
255 256
function i18n_panels_ctools_plugin_post_alter(&$plugin, $plugin_type_info) {
256 257
  if ($plugin_type_info['type'] == 'content_types') {
......
322 323
        if (empty($pane->uuid)) {
323 324
          // Fetch exported uuid and validate it.
324 325
          $uuid = str_replace('new-', '', $pane->pid);
325
          if (!panels_uuid_is_valid($uuid)) {
326
          if (!ctools_uuid_is_valid($uuid)) {
326 327
            drupal_set_message(t('The pane %pane has no uuid, please resave or re-export it.', array('%pane' => $pane->pid)), 'warning');
327 328
            continue;
328 329
          }
......
366 367
 *
367 368
 * @todo I bet there are better ways to solve this mess.
368 369
 *
369
 * @param boolean $reset
370
 * @param bool $reset
370 371
 *   Reset the static cache.
371 372
 *
372 373
 * @return array
drupal7/sites/all/modules/panels/includes/callbacks.inc
1 1
<?php
2 2
/**
3
 * @file callbacks.inc
3
 * @file Callbacks.inc
4 4
 * Minor menu callbacks for Panels helpers.
5 5
 */
6 6

  
......
46 46
    'description' => t('Custom layouts can add more, site-specific layouts that you can use in your panels.'),
47 47
  );
48 48

  
49
   // Load all mini panels and their displays.
49
  // Load all mini panels and their displays.
50 50
  ctools_include('export');
51 51
  $items = ctools_export_crud_load_all('panels_layout');
52 52
  $count = 0;
......
97 97
    $function($vars);
98 98
  }
99 99

  
100
  // Add in any default links for modules that are not active
100
  // Add in any default links for modules that are not active.
101 101
  panels_dashboard_final_blocks($vars);
102 102

  
103 103
  // If page manager module is enabled, add a very low eight block to
......
138 138
    'class' => 'dashboard-create',
139 139
  );
140 140

  
141
  // Turn the links into a block
141
  // Turn the links into a block.
142 142
  foreach ($vars['links'] as $link) {
143 143
    $vars['blocks']['links']['content'] .= theme('panels_dashboard_link', array('link' => $link));
144 144
  }
......
148 148
  $vars['left'] = '';
149 149
  $vars['right'] = '';
150 150

  
151
  // Render all the blocks
151
  // Render all the blocks.
152 152
  foreach ($vars['blocks'] as $block) {
153 153
    $section = !empty($block['section']) ? $block['section'] : 'left';
154 154
    $vars[$section] .= theme('panels_dashboard_block', array('block' => $block));
......
202 202
  ctools_include('common', 'panels');
203 203
  return drupal_get_form('panels_common_settings', 'panels_page');
204 204
}
205

  
drupal7/sites/all/modules/panels/includes/common.inc
39 39
 *
40 40
 * @see panels_edit_layout()
41 41
 * @see _panels_edit_layout()
42
 *
43 42
 */
44 43
class panels_allowed_layouts {
45 44

  
46 45
  /**
47
   *  Specifies whether newly-added layouts (as in, new .inc files) should be automatically
46
   * Specifies whether newly-added layouts (as in, new .inc files) should be automatically
48 47
   *  allowed (TRUE) or disallowed (FALSE) for $this. Defaults to TRUE, which is more
49 48
   *  permissive but less of an administrative hassle if/when you add new layouts. Note
50 49
   *  that this parameter will be derived from $allowed_layouts if a value is passed in.
......
52 51
  var $allow_new = TRUE;
53 52

  
54 53
  /**
55
   *  Optional member. If provided, the Panels API will generate a drupal variable using
54
   * Optional member. If provided, the Panels API will generate a drupal variable using
56 55
   *  variable_set($module_name . 'allowed_layouts', serialize($this)), thereby handling the
57 56
   *  storage of this object entirely within the Panels API. This object will be
58 57
   *  called and rebuilt by panels_edit_layout() if the same $module_name string is passed in
59 58
   *  for the $allowed_types parameter. \n
60 59
   *  This is primarily intended for convenience - client modules doing heavy-duty implementations
61 60
   *  of the Panels API will probably want to create their own storage method.
61
   *
62 62
   * @see panels_edit_layout()
63 63
   */
64 64
  var $module_name = NULL;
65 65

  
66 66
  /**
67
   *  An associative array of all available layouts, keyed by layout name (as defined
67
   * An associative array of all available layouts, keyed by layout name (as defined
68 68
   *  in the corresponding layout plugin definition), with value = 1 if the layout is
69 69
   *  allowed, and value = 0 if the layout is not allowed.
70 70
   *  Calling array_filter(panels_allowed_layouts::$allowed_layout_settings) will return an associative array
......
82 82

  
83 83
  /**
84 84
   * Constructor function; loads the $allowed_layout_settings array with initial values according
85
   * to $start_allowed
85
   * to $start_allowed.
86 86
   *
87 87
   * @param bool $start_allowed
88
   *  $start_allowed determines whether all available layouts will be marked
89
   *  as allowed or not allowed on the initial call to panels_allowed_layouts::set_allowed()
90
   *
88
   *   $start_allowed determines whether all available layouts will be marked
89
   *   as allowed or not allowed on the initial call to panels_allowed_layouts::set_allowed()
91 90
   */
92 91
  function __construct($start_allowed = TRUE) {
93
    // TODO would be nice if there was a way to just fetch the names easily
92
    // TODO would be nice if there was a way to just fetch the names easily.
94 93
    foreach ($this->list_layouts() as $layout_name) {
95 94
      $this->allowed_layout_settings[$layout_name] = $start_allowed ? 1 : 0;
96 95
    }
......
121 120
   *      drupal_goto('</path/to/desired/redirect>');
122 121
   *    }
123 122
   *  }
123
   *
124 124
   * @endcode \n
125 125
   *
126 126
   * If $allowed_layouts->form_state == 'failed-validate' || 'render', then you'll need to return
......
135 135
   * you to control where the user ends up next.
136 136
   *
137 137
   * @param string $title
138
   *  Used to set the title of the allowed layouts form. If no value is given, defaults to
139
   *  'Panels: Allowed Layouts'.
138
   *   Used to set the title of the allowed layouts form. If no value is given, defaults to
139
   *   'Panels: Allowed Layouts'.
140 140
   *
141 141
   * @return mixed $result
142 142
   *  - On the first passthrough when the form is being rendered, $result is the form's structured
......
147 147
  function set_allowed($title = 'Panels: Allowed Layouts') {
148 148
    $this->sync_with_available();
149 149
    $form_id = 'panels_common_set_allowed_layouts';
150
    // TODO switch to drupal_build_form(); need to pass by ref
150
    // TODO switch to drupal_build_form(); need to pass by ref.
151 151
    $form = drupal_retrieve_form($form_id, $this, $title);
152 152

  
153 153
    if ($result = drupal_process_form($form_id, $form)) {
154
      // successful submit
154
      // Successful submit.
155 155
      $this->form_state = 'submit';
156 156
      return $result;
157 157
    }
......
192 192
   * If you don't serialize the second parameter of variable_get() and the variable name you provide
193 193
   * can't be found, an E_STRICT warning will be generated for trying to unserialize an entity
194 194
   * that has not been serialized.
195
   *
196 195
   */
197 196
  function save() {
198 197
    if (!is_null($this->module_name)) {
199
      variable_set($this->module_name . '_allowed_layouts', serialize($this));
198
      variable_set($this->module_name . "_allowed_layouts", serialize($this));
200 199
    }
201 200
  }
202 201

  
......
217 216
    }
218 217
    return $layouts;
219 218
  }
219

  
220 220
}
221 221

  
222 222
/**
......
272 272
    // each type its own checkboxes set unless it's 'single' in which
273 273
    // case it can go into our fake other set.
274 274
    $available_content_types = ctools_content_get_all_types();
275
    $allowed_content_types = db_select('panels_allowed_types', 'pat')
276
      ->fields('pat', array('type', 'allowed'))
277
      ->condition('module', $module_name)
278
      ->execute()
279
      ->fetchAllKeyed();
275
    $allowed_content_types = variable_get($module_name . '_allowed_types', array());
280 276

  
281 277
    foreach ($available_content_types as $id => $types) {
282 278
      foreach ($types as $type => $info) {
......
296 292
      '#tree' => TRUE,
297 293
    );
298 294

  
299
    // cheat a bit
295
    // Cheat a bit.
300 296
    $content_types['other'] = array('title' => t('Other'), 'weight' => 10);
301 297
    foreach ($content_types as $id => $info) {
302 298
      if (isset($allowed[$id])) {
......
342 338
}
343 339

  
344 340
/**
345
 * Submit hook for panels_common_settings
341
 * Submit hook for panels_common_settings.
346 342
 */
347 343
function panels_common_settings_validate($form, &$form_state) {
348 344
  panels_common_allowed_layouts_form_validate($form, $form_state);
349 345
}
350 346

  
351 347
/**
352
 * Submit hook for panels_common_settings
348
 * Submit hook for panels_common_settings.
353 349
 */
354 350
function panels_common_settings_submit($form, &$form_state) {
355 351
  panels_common_allowed_layouts_form_submit($form, $form_state);
......
358 354
  if (!$form_state['skip']) {
359 355
    // Merge the broken apart array neatly back together.
360 356
    $allowed_content_types = array();
361
    $content_types = $form_state['values']['allowed'];
362
    foreach ($content_types as $content_type) {
363
      $allowed_content_types = array_merge($allowed_content_types, $form_state['values']['content_types'][$content_type]['options']);
364
      foreach ($allowed_content_types as $type => $allowed) {
365
        $allowed = empty($allowed) ? 0 : 1;
366
        db_merge('panels_allowed_types')
367
          ->key(array('module' => $module_name, 'type' => $type))
368
          ->fields(array(
369
            'module' => $module_name,
370
            'type' => $type,
371
            'allowed' => $allowed,
372
          ))
373
          ->execute();
357
    foreach ($form_state['values']['allowed'] as $allowed) {
358
      $values = $form_state['values']['content_types'][$allowed]['options'];
359
      // If new content of the type is not added, storing a lisy of disabled
360
      // content is not needed.
361
      if (!$form_state['values']['panels_common_default'][$allowed]) {
362
        $values = array_filter($values);
374 363
      }
364
      $allowed_content_types = array_merge($allowed_content_types, $values);
375 365
    }
366
    // Values from checkboxes are the same string as they key, but we only need
367
    // to store the boolean value.
368
    foreach ($allowed_content_types as &$value) {
369
      $value = (bool) $value;
370
    }
371
    variable_set($module_name . '_allowed_types', $allowed_content_types);
376 372
  }
377 373
  drupal_set_message(t('Your changes have been saved.'));
378 374
}
......
381 377
 * Based upon the settings, get the allowed types for this node.
382 378
 */
383 379
function panels_common_get_allowed_types($module, $contexts = array(), $has_content = FALSE, $default_defaults = array(), $default_allowed_types = array()) {
384
  // Get a list of all types that are available
380
  // Get a list of all types that are available.
385 381
  $default_types = variable_get($module . '_default', $default_defaults);
386
  $allowed_types = db_select('panels_allowed_types', 'pat')
387
    ->fields('pat', array('type', 'allowed'))
388
    ->condition('module', $module)
389
    ->execute()
390
    ->fetchAllKeyed();
391
  $allowed_types = !empty($allowed_types) ? $allowed_types : $default_allowed_types;
382
  $allowed_types = variable_get($module . '_allowed_types', $default_allowed_types);
392 383

  
393 384
  // By default, if they haven't gone and done the initial setup here,
394 385
  // let all 'other' types (which will be all types) be available.
......
420 411
 * @ingroup forms
421 412
 *
422 413
 * @param array $allowed_layouts
423
 *  The set of allowed layouts that should be used as the default values
424
 *  for this form. If none is provided, then by default no layouts will be restricted.
414
 *   The set of allowed layouts that should be used as the default values
415
 *   for this form. If none is provided, then by default no layouts will be restricted.
425 416
 */
426 417
function panels_common_allowed_layouts_form(&$form, &$form_state, $module_name) {
427 418
  // Fetch our allowed layouts from variables.
......
434 425

  
435 426
  $form_state['allowed_layouts'] = &$allowed_layouts;
436 427

  
428
  ctools_add_js('panels-base', 'panels');
437 429
  ctools_add_js('layout', 'panels');
438 430

  
439 431
  $form['layout_selection'] = array(
......
473 465
 * Get the allowed layout object for the given module.
474 466
 */
475 467
function panels_common_get_allowed_layout_object($module_name) {
476
  $allowed_layouts = unserialize(variable_get($module_name . '_allowed_layouts', serialize('')));
468
  $allowed_layouts = unserialize(variable_get($module_name . "_allowed_layouts", serialize('')));
477 469

  
478
  // if no parameter was provided, or the variable_get failed
470
  // If no parameter was provided, or the variable_get failed.
479 471
  if (!$allowed_layouts) {
480
    // still no dice. simply creates a dummy version where all layouts
472
    // Still no dice. simply creates a dummy version where all layouts
481 473
    // are allowed.
482 474
    $allowed_layouts = new panels_allowed_layouts();
483 475
    $allowed_layouts->allow_new = TRUE;
484 476
    $allowed_layouts->module_name = $module_name;
485 477
  }
486 478

  
487
  // sanitize allowed layout listing; this is redundant if the
488
  // $allowed_layouts param was null, but the data is cached anyway
479
  // Sanitize allowed layout listing; this is redundant if the
480
  // $allowed_layouts param was null, but the data is cached anyway.
489 481
  $allowed_layouts->sync_with_available();
490 482

  
491 483
  return $allowed_layouts;
......
500 492
  if (empty($module_name)) {
501 493
    return $available_layouts;
502 494
  }
503
  else if (is_object($module_name)) {
495
  elseif (is_object($module_name)) {
504 496
    $allowed_layouts = $module_name;
505 497
  }
506 498
  else {
......
515 507
    }
516 508
  }
517 509

  
518
  // Sort
510
  // Sort.
519 511
  $layouts = array();
520 512

  
521 513
  asort($order);
......
603 595
  // We're doing these dependencies completely manualy, which is unusual, but
604 596
  // the process code only supports doing them in a form.
605 597
  // @todo modify dependent.inc to make this easier.
606

  
607 598
  $dependencies = array();
608 599
  foreach ($options as $category => $links) {
609 600
    $dependencies['panels-layout-category-' . $category] = array(
drupal7/sites/all/modules/panels/includes/display-edit.inc
1 1
<?php
2 2

  
3
/*
3
/**
4 4
 * @file
5 5
 * Core Panels API include file containing various display-editing functions.
6 6
 * This includes all the basic editing forms (content, layout, layout settings)
......
40 40
}
41 41

  
42 42
/**
43
 * Form definition for the panels display editor
43
 * Form definition for the panels display editor.
44 44
 *
45 45
 * No validation function is necessary, as all 'validation' is handled
46 46
 * either in the lead-up to form rendering (through the selection of
......
48 48
 * the ajax modals & content types.
49 49
 *
50 50
 * @ingroup forms
51
 *
51 52
 * @see panels_edit_display_submit()
52 53
 */
53 54
function panels_edit_display_form($form, &$form_state) {
......
157 158
      $display->panels[$region_id] = array();
158 159
      if ($panes) {
159 160
        $pids = explode(',', $panes);
160
        // need to filter the array, b/c passing it in a hidden field can generate trash
161
        // Need to filter the array, b/c passing it in a hidden field can generate trash.
161 162
        foreach (array_filter($pids) as $pid) {
162 163
          if ($old_content[$pid]) {
163 164
            $display->panels[$region_id][] = $pid;
......
221 222
  ctools_include('dependent');
222 223

  
223 224
  if ($form_state['display_title']) {
224
    $form['display_title'] = array (
225
    $form['display_title'] = array(
225 226
      '#tree' => TRUE,
226 227
    );
227 228

  
......
252 253
      // We have to create a manual fieldset because fieldsets do not support IDs.
253 254
      // Use 'hidden' instead of 'markup' so that the process will run.
254 255
      // Add js for collapsible fieldsets manually
255
//      drupal_add_js('misc/form.js');
256
//      drupal_add_js('misc/collapse.js');
257
//      $form['display_title']['contexts_prefix'] = array(
258
//        '#type' => 'hidden',
259
//        '#id' => 'edit-display-substitutions',
260
//        '#prefix' => '<div><fieldset id="edit-display-substitutions" class="collapsed collapsible"><legend>' . t('Substitutions') . '</legend><div class="fieldset-wrapper">',
261
//        '#process' => array('ctools_dependent_process'),
262
//        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
263
//      );
264

  
256
      //      drupal_add_js('misc/form.js');
257
      //      drupal_add_js('misc/collapse.js');
258
      //      $form['display_title']['contexts_prefix'] = array(
259
      //        '#type' => 'hidden',
260
      //        '#id' => 'edit-display-substitutions',
261
      //        '#prefix' => '<div><fieldset id="edit-display-substitutions" class="collapsed collapsible"><legend>' . t('Substitutions') . '</legend><div class="fieldset-wrapper">',
262
      //        '#process' => array('ctools_dependent_process'),
263
      //        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
264
      //      );
265 265
      $rows = array();
266 266
      foreach ($display->context as $context) {
267 267
        foreach (ctools_context_get_converters('%' . check_plain($context->keyword) . ':', $context) as $keyword => $title) {
......
279 279
        '#collapsible' => TRUE,
280 280
        '#collapsed' => TRUE,
281 281
        '#value' => theme('table', array('header' => $header, 'rows' => $rows)),
282
//        '#process' => array('form_process_fieldset', 'ctools_dependent_process'),
283
//        '#id' => 'edit-display-title-context',
284
//        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
282
      // '#process' => array('form_process_fieldset', 'ctools_dependent_process'),      //        '#id' => 'edit-display-title-context',
283
      //        '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
285 284
      );
286
//      $form['display_title']['contexts_suffix'] = array(
287
//        '#value' => '</div></fieldset></div>',
288
//      );
285
      // $form['display_title']['contexts_suffix'] = array(      //        '#value' => '</div></fieldset></div>',
286
      //      );.
289 287
    }
290 288
  }
291 289

  
292
  // TODO doc the ability to do this as part of the API
290
  // TODO doc the ability to do this as part of the API.
293 291
  if (!empty($layout['settings form']) && function_exists($layout['settings form'])) {
294 292
    $form['layout_settings'] = $layout['settings form']($display, $layout, $display->layout_settings);
295 293
  }
drupal7/sites/all/modules/panels/includes/display-layout.inc
2 2

  
3 3
/**
4 4
 * @file
5
 *
6 5
 * Handle the forms for changing a display's layout.
7 6
 */
8 7

  
......
33 32
  if (empty($_POST) || empty($_POST['form_id']) || $_POST['form_id'] != 'panels_change_layout') {
34 33
    $output = drupal_build_form('panels_choose_layout', $form_state);
35 34
    if (!empty($form_state['executed'])) {
36
      // upon submission go to next form.
35
      // Upon submission go to next form.
37 36
      $change_form_state['layout'] = $_SESSION['layout'][$display->did] = $form_state['layout'];
38 37
      $change_form = TRUE;
39 38
    }
......
147 146
  $js['CTools']['dependent'] = $dependencies;
148 147
  drupal_add_js($js, 'setting');
149 148

  
150

  
151 149
  if (empty($form_state['no buttons'])) {
152 150
    $form['submit'] = array(
153 151
      '#type' => 'submit',
......
293 291
    foreach ($form_state['values']['panel']['pane'] as $region_id => $panes) {
294 292
      if ($panes) {
295 293
        $pids = explode(',', $panes);
296
        // need to filter the array, b/c passing it in a hidden field can generate trash
294
        // Need to filter the array, b/c passing it in a hidden field can generate trash.
297 295
        foreach (array_filter($pids) as $pid) {
298 296
          $switch[$pid] = $region_id;
299 297
        }
drupal7/sites/all/modules/panels/includes/legacy.inc
1 1
<?php
2 2

  
3
/**
4
 * @file
5
 * Legacy state manager for Panels.
6
 */
7

  
3 8
/**
4 9
 * Legacy state manager for Panels.
5 10
 *
6 11
 * Checks all possible ways (using discovery of patterned method names) in which
7 12
 * Panels may need to operate in legacy mode,
8
 * sets variables as appropriate, and returns an informational
9
 *
13
 * sets variables as appropriate, and returns an informational.
10 14
 */
11 15
class PanelsLegacyState {
12 16
  var $legacy = NULL;
13 17

  
18
  /**
19
   * Translation wrapper.
20
   */
14 21
  function t() {
15 22
    $func = get_t();
16 23
    $args = func_get_args();
17 24
    return call_user_func_array($func, $args);
18 25
  }
19 26

  
27
  /**
28
   * Get Status.
29
   */
20 30
  function getStatus() {
21 31
    if (!isset($this->legacy)) {
22 32
      $this->determineStatus();
......
29 39
   */
30 40
  function determineStatus() {
31 41
    $this->legacy = array();
32
    foreach(get_class_methods($this) as $method) {
42
    foreach (get_class_methods($this) as $method) {
33 43
      if (strtolower(substr($method, 0, 5)) == 'check') {
34 44
        $this->legacy[$method] = $this->$method();
35 45
      }
......
37 47
    $this->legacy = array_filter($this->legacy);
38 48
  }
39 49

  
40
  // At this time there are no legacy checks.
41 50
}
drupal7/sites/all/modules/panels/includes/page-wizard.inc
35 35
    '#value' => '</fieldset>',
36 36
  );
37 37

  
38
//  $form_state['cache'] = FALSE;
38
  // $form_state['cache'] = FALSE;.
39 39
}
40 40

  
41 41
/**
......
52 52

  
53 53
  // Panels provides this caching mechanism to make it easy to use the
54 54
  // wizard to cache the display.
55

  
56 55
  $cache = panels_edit_cache_get('panels_page_wizard:' . $form_state['plugin']['name']);
57 56

  
58 57
  $form_state['renderer'] = panels_get_renderer_handler('editor', $cache->display);
......
68 67
}
69 68

  
70 69
/**
71
 * Add content form submit handler
70
 * Add content form submit handler.
72 71
 *
73 72
 * This is not a proper submit handler, it is meant to be called by a form's
74 73
 * submit handler to handle submission.
75 74
 */
76 75
function panels_page_wizard_add_content_submit(&$form, &$form_state) {
77 76
  // Call the normal panels edit form submit to make sure values are stored
78
  // on the display
77
  // on the display.
79 78
  panels_edit_display_form_submit($form, $form_state);
80 79
  $cache = &$form_state['wizard cache'];
81 80

  
......
83 82
  $cache->display = &$form_state['display'];
84 83
  unset($cache->display_cache);
85 84
}
86

  
drupal7/sites/all/modules/panels/includes/panels.pipelines.inc
11 11
function panels_default_panels_renderer_pipeline() {
12 12
  $pipelines = array();
13 13

  
14
  $pipeline = new stdClass;
14
  $pipeline = new stdClass();
15 15
  $pipeline->disabled = FALSE; /* Edit this to true to make a default pipeline disabled initially */
16 16
  $pipeline->api_version = 1;
17 17
  $pipeline->name = 'standard';
drupal7/sites/all/modules/panels/includes/plugins.inc
2 2

  
3 3
/**
4 4
 * @file
5
 *
6 5
 * Contains helper code for plugins and contexts.
7 6
 */
8 7

  
......
41 40
 *   The cached content, or FALSE to indicate no cached content exists.
42 41
 */
43 42
function panels_get_cached_content($display, $args, $context, $pane = NULL) {
44
  // Never use cache on a POST
43
  // Never use cache on a POST.
45 44
  if (!empty($_POST)) {
46 45
    return FALSE;
47 46
  }
......
59 58
    return FALSE;
60 59
  }
61 60

  
62
  // restore it.
61
  // Restore it.
63 62
  $cache->restore();
64 63
  return $cache;
65 64
}
......
68 67
 * Store cached content for a given display and possibly pane.
69 68
 */
70 69
function panels_set_cached_content($cache, $display, $args, $context, $pane = NULL) {
71
  // Never use cache on a POST
70
  // Never use cache on a POST.
72 71
  if (!empty($_POST)) {
73 72
    return FALSE;
74 73
  }
......
82 81

  
83 82
  $conf = $pane ? $pane->cache['settings'] : $display->cache['settings'];
84 83

  
85
  // snapshot it.
84
  // Snapshot it.
86 85
  $cache->cache();
87 86
  return $function($conf, $cache, $display, $args, $context, $pane);
88 87
}
......
154 153

  
155 154
    $this->ready = TRUE;
156 155

  
157
    // Simple replacement for head
156
    // Simple replacement for head.
158 157
    $this->head = str_replace($this->head, '', drupal_add_html_head());
159 158

  
160 159
    // Slightly less simple for CSS:
......
248 247
      }
249 248
    }
250 249
  }
250

  
251 251
}
252 252

  
253 253
/**
......
412 412
 * Choose a renderer for a display based on a render pipeline setting.
413 413
 */
414 414
function panels_get_renderer($pipeline_name, &$display) {
415
  // Load the pipeline
415
  // Load the pipeline.
416 416
  ctools_include('export');
417 417
  $pipeline = ctools_export_crud_load('panels_renderer_pipeline', $pipeline_name);
418 418

  
......
443 443
    return $renderer;
444 444
  }
445 445

  
446
  // Fall through. If no renderer is selected, use the standard renderer
446
  // Fall through. If no renderer is selected, use the standard renderer.
447 447
  return panels_get_renderer_handler('standard', $display);
448 448
}
449 449

  
......
454 454
 */
455 455
function _panels_renderer_pipeline_sort($a, $b) {
456 456
  if ($a->weight == $b->weight) {
457
      if ($a->admin_title == $b->admin_title) {
458
        return 0;
459
      }
457
    if ($a->admin_title == $b->admin_title) {
458
      return 0;
459
    }
460 460
    return ($a->admin_title < $b->admin_title) ? -1 : 1;
461 461
  }
462 462
  return ($a->weight < $b->weight) ? -1 : 1;
drupal7/sites/all/modules/panels/panels.api.php
11 11
 * @param string $argument
12 12
 *   The second half of the cache key. Full key module:TASK_NAME:HANDLER_NAME
13 13
 *   passed part: TASK_NAME:HANDLER_NAME
14
 * @param stdClass $cache
14
 * @param object $cache
15 15
 *   The display to cache.
16 16
 */
17 17
function hook_panels_cache_set($argument, $cache) {
......
56 56
 * @param string $argument
57 57
 *   The second half of the cache key. Full key module:TASK_NAME:HANDLER_NAME
58 58
 *   passed part: TASK_NAME:HANDLER_NAME
59
 * @param stdClass $cache
59
 * @param object $cache
60 60
 *   The display to cache.
61 61
 *
62 62
 * @return stdClass
......
78 78
 * @param string $argument
79 79
 *   The second half of the cache key. Full key module:TASK_NAME:HANDLER_NAME
80 80
 *   passed part: TASK_NAME:HANDLER_NAME
81
 * @param stdClass $cache
81
 * @param object $cache
82 82
 *   The cached display.
83 83
 */
84 84
function hook_panels_cache_clear($argument, $cache) {
......
105 105
 *
106 106
 * This happens after the keyword substitution.
107 107
 *
108
 * @param stdClass $content
108
 * @param object $content
109 109
 *   The content block to render.
110
 * @param stdClass $pane
110
 * @param object $pane
111 111
 *   The pane object.
112 112
 * @param array $args
113 113
 *   The display arguments.
......
125 125
 * @param string $argument
126 126
 *   The second half of the cache key. Full key module:TASK_NAME:HANDLER_NAME
127 127
 *   passed part: TASK_NAME:HANDLER_NAME
128
 * @param stdClass $cache
128
 * @param object $cache
129 129
 *   The cached display.
130 130
 */
131 131
function hook_panels_edit_cache_break_lock($argument, $cache) {
......
140 140
 *
141 141
 * @param panels_display $panels_display
142 142
 *   The panels display that will be rendered.
143
 * @param stdClass $renderer
143
 * @param object $renderer
144 144
 *   The renderer object that will be used to render.
145 145
 *
146 146
 * @return string
......
158 158
 *
159 159
 * @param panels_display $panels_display
160 160
 *   The rendered panels display.
161
 * @param stdClass $renderer
161
 * @param object $renderer
162 162
 *   The used renderer object.
163 163
 *
164 164
 * @return string
......
171 171
/**
172 172
 * Fired before a new pane is inserted in the storage.
173 173
 *
174
 * @param stdClass $pane
174
 * @param object $pane
175 175
 *   Pane that will be rendered.
176 176
 */
177 177
function hook_panels_pane_insert($pane) {
......
188 188
/**
189 189
 * Fired before a changed pane is updated in the storage.
190 190
 *
191
 * @param stdClass $pane
191
 * @param object $pane
192 192
 *   Pane that will be rendered.
193 193
 */
194 194
function hook_panels_pane_update($pane) {
......
208 208
 * Last chance to modify the pane before the keyword substitution runs and the
209 209
 * pane is rendered.
210 210
 *
211
 * @param stdClass $pane
211
 * @param object $pane
212 212
 *   Pane that will be rendered.
213 213
 */
214 214
function hook_panels_pane_prerender($pane) {
......
250 250
/**
251 251
 * Fired before a display is deleted.
252 252
 *
253
 * @param integer $did
253
 * @param int $did
254 254
 *   Id of the display to delete.
255 255
 */
256 256
function hook_panels_delete_display($did) {
drupal7/sites/all/modules/panels/panels.info
18 18
files[] = tests/PanelsTermViewWebTestCase.test
19 19
files[] = tests/PanelsUserViewWebTestCase.test
20 20

  
21
; Information added by Drupal.org packaging script on 2016-10-16
22
version = "7.x-3.8"
21
; Information added by Drupal.org packaging script on 2017-02-06
22
version = "7.x-3.9"
23 23
core = "7.x"
24 24
project = "panels"
25
datestamp = "1476582295"
25
datestamp = "1486394388"
26 26

  
drupal7/sites/all/modules/panels/panels.install
1 1
<?php
2 2

  
3
/**
4
 * @file
5
 */
6

  
3 7
/**
4 8
 * Test requirements for installation and running.
5 9
 */
......
81 85
  );
82 86

  
83 87
  return $schema;
84
 }
88
}
85 89

  
86 90
function panels_schema_8() {
87 91
  $schema = panels_schema_7();
......
308 312
    ),
309 313
    'primary key' => array('pid'),
310 314
    'indexes' => array(
311
      'did_idx' => array('did')
315
      'did_idx' => array('did'),
312 316
    ),
313 317
  );
314 318

  
......
445 449
 */
446 450
function panels_update_7301() {
447 451
  // Load the schema.
448

  
449 452
  // Due to a previous failure, the field may already exist:
450

  
451 453
  $schema = panels_schema_4();
452 454
  $table = 'panels_pane';
453 455
  $field = 'locks';
......
627 629
  }
628 630

  
629 631
  if (!empty($page_manager_panels)) {
630
    // Check panels displays that only have empty storage types
632
    // Check panels displays that only have empty storage types.
631 633
    $result = db_query("SELECT pd.did FROM {panels_display} pd WHERE pd.did IN (:dids) AND storage_type = ''", array(':dids' => array_keys($page_manager_panels)));
632 634
    foreach ($result as $row) {
633 635
      db_update('panels_display')
......
652 654
    db_create_table($table_name, $schema[$table_name]);
653 655
  }
654 656

  
655
  // Read existing allowed settings and store them in a new table.
656
  $variables = db_select('variable', 'v')
657
    ->fields('v', array('name'))
658
    ->condition('name', '%' . db_like('_allowed_types'), 'LIKE')
659
    ->execute()
660
    ->fetchCol();
661
  foreach ($variables as $name) {
662
    $module = str_replace('_allowed_types', '', $name);
663
    $variable = variable_get($name);
664
    foreach ($variable as $type => $allowed) {
665
      $allowed = empty($allowed) ? 0 : 1;
666
      db_merge('panels_allowed_types')
667
        ->key(array('module' => $module, 'type' => $type))
668
        ->fields(array(
669
          'module' => $module,
670
          'type' => $type,
671
          'allowed' => $allowed,
672
        ))
673
        ->execute();
674
    }
675
    variable_del($name);
676
  }
657
  /*
658
  The version of this update hook in release 3.8 included code that
659
  converted storage of allowed_types configuration from variables to the new
660
  table, and also deleted existing allowed_types configuration variables.
661
  See https://www.drupal.org/node/2479879.
662

  
663
  In order to prevent data loss on sites that had not yet updated to 3.8, the
664
  conversion and variable-deletion code has been removed from this update hook.
665
   */
677 666
}
678 667

  
679 668
/**
drupal7/sites/all/modules/panels/panels.module
1 1
<?php
2 2

  
3 3
/**
4
 * @file panels.module
5
 *
4
 * @file
6 5
 * Core functionality for the Panels engine.
7 6
 */
8 7

  
......
23 22
define('PANELS_VERSION', '7.x-3.8');
24 23

  
25 24

  
26
define('PANELS_TITLE_FIXED', 0); // Hide title use to be true/false. So false remains old behavior.
27
define('PANELS_TITLE_NONE', 1); // And true meant no title.
28
define('PANELS_TITLE_PANE', 2); // And this is the new behavior, where the title field will pick from a pane.
25
// Hide title use to be TRUE/FALSE. So FALSE remains old behavior.
26
define('PANELS_TITLE_FIXED', 0);
27
// And TRUE meant no title.
28
define('PANELS_TITLE_NONE', 1);
29
// And this is the new behavior, where the title field will pick from a pane.
30
define('PANELS_TITLE_PANE', 2);
29 31

  
30 32
/**
31 33
 * Returns the API version of Panels. This didn't exist in 1.
32 34
 *
33 35
 * @todo -- this should work more like the CTools API version.
34 36
 *
35
 * @return An array with the major and minor versions
37
 * @return array
38
 *   An array with the major and minor versions
36 39
 */
37 40
function panels_api_version() {
38 41
  return array(3, 1);
39 42
}
40 43

  
41
// --------------------------------------------------------------------------
42
// Core Drupal hook implementations
43

  
44 44
/**
45
 * Implementation of hook_theme()
45
 * Implements hook_theme().
46 46
 */
47 47
function panels_theme() {
48 48
  // Safety: go away if CTools is not at an appropriate version.
......
52 52

  
53 53
  $theme = array();
54 54
  $theme['panels_layout_link'] = array(
55
    'variables' => array('title' => NULL, 'id' => NULL, 'image' => NULL, 'link' => NULL, 'class' => NULL),
55
    'variables' => array(
56
      'title' => NULL,
57
      'id' => NULL,
58
      'image' => NULL,
59
      'link' => NULL,
60
      'class' => NULL,
61
    ),
56 62
  );
57 63
  $theme['panels_layout_icon'] = array(
58
    'variables' => array('id' => NULL, 'image' => NULL, 'title' => NULL),
64
    'variables' => array(
65
      'id' => NULL,
66
      'image' => NULL,
67
      'title' => NULL,
68
    ),
59 69
  );
60 70
  $theme['panels_pane'] = array(
61
    'variables' => array('content' => array(), 'pane' => array(), 'display' => array()),
71
    'variables' => array(
72
      'content' => array(),
73
      'pane' => array(),
74
      'display' => array(),
75
    ),
62 76
    'path' => drupal_get_path('module', 'panels') . '/templates',
63 77
    'template' => 'panels-pane',
64 78
  );
......
92 106
  );
93 107

  
94 108
  $theme['panels_add_content_modal'] = array(
95
    'variables' => array('renderer' => NULL, 'categories' => array(), 'region' => NULL, 'category' => NULL, 'column_count' => 2),
109
    'variables' => array(
110
      'renderer' => NULL,
111
      'categories' => array(),
112
      'region' => NULL,
113
      'category' => NULL,
114
      'column_count' => 2,
115
    ),
96 116
    'path' => drupal_get_path('module', 'panels') . '/templates',
97 117
    'file' => '../includes/add-content.inc',
98 118
    'template' => 'panels-add-content-modal',
99 119
  );
100 120

  
101 121
  $theme['panels_add_content_link'] = array(
102
    'variables' => array('renderer' => NULL, 'region' => NULL, 'content_type' => NULL),
122
    'variables' => array(
123
      'renderer' => NULL,
124
      'region' => NULL,
125
      'content_type' => NULL,
126
    ),
103 127
    'path' => drupal_get_path('module', 'panels') . '/templates',
104 128
    'file' => '../includes/add-content.inc',
105 129
    'template' => 'panels-add-content-link',
106 130
  );
107 131

  
108
  // We don't need layout and style themes in maintenance mode.
109
  // Disabling this: See http://drupal.org/node/979912 for information.
110
//  if (defined('MAINTENANCE_MODE')) {
111
//    return $theme;
112
//  }
113

  
114 132
  // Register layout and style themes on behalf of all of these items.
115 133
  ctools_include('plugins', 'panels');
116 134

  
......
121 139
    foreach (array('theme', 'admin theme') as $callback) {
122 140
      if (!empty($data[$callback])) {
123 141
        $theme[$data[$callback]] = array(
124
          'variables' => array('css_id' => NULL, 'content' => NULL, 'settings' => NULL, 'display' => NULL, 'layout' => NULL, 'renderer' => NULL),
142
          'variables' => array(
143
            'css_id' => NULL,
144
            'content' => NULL,
145
            'settings' => NULL,
146
            'display' => NULL,
147
            'layout' => NULL,
148
            'renderer' => NULL,
149
          ),
125 150
          'path' => $data['path'],
126 151
          'file' => $data['file'],
127 152
        );
128 153

  
129
        // if no theme function exists, assume template.
154
        // If no theme function exists, assume template.
130 155
        if (!function_exists("theme_$data[theme]")) {
131 156
          $theme[$data[$callback]]['template'] = str_replace('_', '-', $data[$callback]);
132
          $theme[$data[$callback]]['file'] = $data['file']; // for preprocess.
157
          // For preprocess.
158
          $theme[$data[$callback]]['file'] = $data['file'];
133 159
        }
134 160
      }
135 161
    }
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff