Projet

Général

Profil

Révision c304a780

Ajouté par Assos Assos il y a environ 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views.inc
124 124
  if (isset($conf['context']) && is_array($conf['context'])) {
125 125
    foreach ($conf['context'] as $count => $context_info) {
126 126
      if (!strpos($context_info, '.')) {
127
        // old skool: support pre-converter contexts as well.
127
        // Old skool: support pre-converter contexts as well.
128 128
        $cid = $context_info;
129 129
        $converter = '';
130 130
      }
......
150 150

  
151 151
  $block = new stdClass();
152 152
  $block->module = 'views';
153
  $block->delta  = $view->name . '-' . $view->current_display;
153
  $block->delta = $view->name . '-' . $view->current_display;
154 154

  
155 155
  if (!empty($conf['link_to_view'])) {
156 156
    $block->title_link = $view->get_url();
......
165 165
  // pager type that Views uses.
166 166
  if ($conf['override_pager_settings']) {
167 167
    if (method_exists($view, 'init_pager')) {
168
      // Views 3 version
168
      // Views 3 version.
169 169
      $view->set_items_per_page($conf['nodes_per_page']);
170 170
      $view->set_offset($conf['offset']);
171 171

  
......
237 237
    '#type' => 'select',
238 238
    '#title' => t('Display'),
239 239
    '#options' => $displays,
240
    '#description' => t('Choose which display of this view you wish to use.')
240
    '#description' => t('Choose which display of this view you wish to use.'),
241 241
  );
242 242

  
243 243
  return $form;
......
271 271
  // and check for that and forcibly set them to the right converter so that
272 272
  // it doesn't get changed to some whacky default. Oooor just let it get changed
273 273
  // to 'no context', I suppose.
274

  
275 274
  $required = array();
276 275
  if (isset($view->display_handler) && $arguments = $view->display_handler->get_handlers('argument')) {
277 276
    foreach ($arguments as $arg) {
......
434 433
      }
435 434

  
436 435
      if (!strpos($context_info, '.')) {
437
        // old skool: support pre-converter contexts as well.
436
        // Old skool: support pre-converter contexts as well.
438 437
        $cid = $context_info;
439 438
        $converter = '';
440 439
      }
......
446 445
        $converters = ctools_context_get_converters($cid . '.', $contexts[$cid]);
447 446
        $converter = !empty($converters[$context_info]) ? $converters[$context_info] : t('Default');
448 447
        $block->content .= '<li>' . t('Argument @arg using context @context converted into @converter', array(
449
          '@arg' => $argument->ui_name(), '@context' => $contexts[$cid]->get_identifier(),
450
          '@converter' => $converter)) . '</li>';
448
          '@arg' => $argument->ui_name(),
449
          '@context' => $contexts[$cid]->get_identifier(),
450
          '@converter' => $converter,
451
        )) . '</li>';
451 452
      }
452 453
      $argument = next($arguments);
453 454
    }
......
494 495
 *   versions it was the view name with a dash and the display ID.
495 496
 *   If this is the case, we can use it to correct the 'display' setting
496 497
 *   in the $conf.
498
 *
497 499
 * @return
498 500
 *   The $view with the initialized display. If the $view could not be
499 501
 *   loaded, the name attempted will be loaded for use in errors.
......
534 536

  
535 537
  $view->set_display($display);
536 538
  // $view->current_display will now reflect this value.
537

  
538 539
  // If set NOT to override, go ahead and refresh from the view.
539 540
  if (empty($conf['override_pager_settings'])) {
540 541
    if (method_exists($view, 'init_pager')) {

Formats disponibles : Unified diff