Projet

Général

Profil

Révision 6eb8d15f

Ajouté par Assos Assos il y a presque 10 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/views/plugins/views_plugin_query_default.inc
1365 1365
    // Add all query substitutions as metadata.
1366 1366
    $query->addMetaData('views_substitutions', module_invoke_all('views_query_substitutions', $this));
1367 1367

  
1368
    if (!$get_count) {
1369
      if (!empty($this->limit) || !empty($this->offset)) {
1370
        // We can't have an offset without a limit, so provide a very large limit
1371
        // instead.
1372
        $limit  = intval(!empty($this->limit) ? $this->limit : 999999);
1373
        $offset = intval(!empty($this->offset) ? $this->offset : 0);
1374
        $query->range($offset, $limit);
1375
      }
1376
    }
1377

  
1368 1378
    return $query;
1369 1379
  }
1370 1380

  
......
1469 1479
          $this->pager->execute_count_query($count_query);
1470 1480
        }
1471 1481

  
1472
        // Let the pager modify the query to add limits.
1473 1482
        $this->pager->pre_execute($query);
1474 1483

  
1475
        if (!empty($this->limit) || !empty($this->offset)) {
1476
          // We can't have an offset without a limit, so provide a very large limit instead.
1477
          $limit  = intval(!empty($this->limit) ? $this->limit : 999999);
1478
          $offset = intval(!empty($this->offset) ? $this->offset : 0);
1479
          $query->range($offset, $limit);
1480
        }
1481

  
1482 1484
        $result = $query->execute();
1483 1485

  
1484 1486
        $view->result = array();

Formats disponibles : Unified diff