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