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/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;

Formats disponibles : Unified diff