Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markie’s picture

Assigned: Unassigned » markie

multiple files affected

markie’s picture

Status: Active » Needs review
FileSize
5.91 KB

8 files affected by patch

oenie’s picture

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.phpundefined
@@ -94,7 +94,7 @@ function get_offset() {
+  function setOffset($offset) {

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/QueryPluginBase.phpundefined
@@ -106,7 +106,7 @@ function set_limit($limit) {
+  function setOffset($offset) {

Add public access modifier in front of the functions to adhere to the new OOP standards.

You've also missed some occurrences of the function (be sure to replace them in messages as well !):

core/modules/views/lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php, line 90:
function get_offset() {

core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php, line 364:
'#default_value' => $this->get_offset(),

core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php, line 282:
$this->assertEqual($view->getOffset(), $rand_number, 'Make sure get_offset uses the settings of setOffset.');

core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php, line 308:
$this->assertEqual($view->getOffset(), $rand_number, 'Make sure get_offset uses the settings of setOffset.');

core/modules/views/lib/Drupal/views/ViewExecutable.php, line 503:
return $this->pager->get_offset();

oenie’s picture

Status: Needs review » Needs work
markie’s picture

Status: Needs work » Needs review
FileSize
6.23 KB

missed items replaced. Public access added to functions.

Something to note, that I feel is outside of the scope of this task, is in the Counter class (Drupal\views\Plugin\views\field\Counter), line 53 has:

$count += ($pager->get_items_per_page() * $pager->get_current_page() + $pager->setOffset());

Shouldn't this actually be

$count += ($pager->get_items_per_page() * $pager->get_current_page() + $pager->getOffset());
?
(see line 9 of the patch)

Status: Needs review » Needs work

The last submitted patch, views_rename_setOffset-2003276-5.patch, failed testing.

markie’s picture

rerolled..

question from #5 still applies.

markie’s picture

Status: Needs work » Needs review

reset status for patch testing goodness.

Status: Needs review » Needs work

The last submitted patch, views_rename_setOffset-2003276-7.patch, failed testing.

markie’s picture

Status: Needs work » Needs review
FileSize
6.23 KB

rerolled

Status: Needs review » Needs work
Issue tags: -Novice, -VDC

The last submitted patch, views_rename_setOffset-2003276-10.patch, failed testing.

markie’s picture

Status: Needs work » Needs review
Issue tags: +Novice, +VDC
oenie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me now !

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Needs a reroll

curl https://drupal.org/files/views_rename_setOffset-2003276-10.patch | git a
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6380  100  6380    0     0   6958      0 --:--:-- --:--:-- --:--:--  8563
error: patch failed: core/modules/views/lib/Drupal/views/Plugin/views/field/Counter.php:50
error: core/modules/views/lib/Drupal/views/Plugin/views/field/Counter.php: patch does not apply
error: patch failed: core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php:361
error: core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.php: patch does not apply
error: patch failed: core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php:279
error: core/modules/views/lib/Drupal/views/Tests/Plugin/PagerTest.php: patch does not apply
jibran’s picture

Status: Needs work » Needs review
FileSize
5.93 KB

reroll

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 99c2b59 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.