Commit f013f081 authored by alexpott's avatar alexpott

Issue #2002948 by toddtomlinson, jeroen12345: Rename Views method use_pager() to usePager().

parent 6d411619
......@@ -283,7 +283,7 @@ public function isPagerEnabled() {
if ($this->usesPager()) {
$pager = $this->getPlugin('pager');
if ($pager) {
return $pager->use_pager();
return $pager->usePager();
}
}
return FALSE;
......
......@@ -49,7 +49,7 @@ public function get_value($values, $field = NULL) {
$count = is_numeric($this->options['counter_start']) ? $this->options['counter_start'] - 1 : 0;
$pager = $this->view->pager;
// Get the base count of the pager.
if ($pager->use_pager()) {
if ($pager->usePager()) {
$count += ($pager->get_items_per_page() * $pager->get_current_page() + $pager->set_offset());
}
// Add the counter for the current site.
......
......@@ -63,7 +63,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
function use_pager() {
public function usePager() {
return FALSE;
}
......
......@@ -160,7 +160,7 @@ public function summaryTitle() {
*
* Only a couple of very specific pagers will set this to false.
*/
function use_pager() {
public function usePager() {
return TRUE;
}
......
......@@ -60,7 +60,7 @@ public function buildOptionsForm(&$form, &$form_state) {
);
}
function use_pager() {
public function usePager() {
return FALSE;
}
......
......@@ -140,7 +140,7 @@ public function testNoLimit() {
$this->assertEqual(count($view->result), 8, 'Make sure that every item beside the first three is returned in the result');
// Check some public functions.
$this->assertFalse($view->pager->use_pager());
$this->assertFalse($view->pager->usePager());
$this->assertFalse($view->pager->use_count_query());
$this->assertEqual($view->pager->get_items_per_page(), 0);
}
......@@ -186,7 +186,7 @@ public function testLimit() {
$this->assertEqual(count($view->result), 3, 'Make sure that only a certain count of items is returned');
// Check some public functions.
$this->assertFalse($view->pager->use_pager());
$this->assertFalse($view->pager->usePager());
$this->assertFalse($view->pager->use_count_query());
}
......
......@@ -525,7 +525,7 @@ public function setOffset($offset) {
*/
public function usePager() {
if (!empty($this->pager)) {
return $this->pager->use_pager();
return $this->pager->usePager();
}
}
......@@ -726,7 +726,7 @@ public function initPager() {
if (!isset($this->pager)) {
$this->pager = $this->display_handler->getPlugin('pager');
if ($this->pager->use_pager()) {
if ($this->pager->usePager()) {
$this->pager->set_current_page($this->current_page);
}
......@@ -746,7 +746,7 @@ public function initPager() {
* Render the pager, if necessary.
*/
public function renderPager($exposed_input) {
if (!empty($this->pager) && $this->pager->use_pager()) {
if (!empty($this->pager) && $this->pager->usePager()) {
return $this->pager->render($exposed_input);
}
......@@ -1176,7 +1176,7 @@ public function execute($display_id = NULL) {
$cache = $this->display_handler->getPlugin('cache');
}
if ($cache->cache_get('results')) {
if ($this->pager->use_pager()) {
if ($this->pager->usePager()) {
$this->pager->total_items = $this->total_rows;
$this->pager->update_page_info();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment