Support from Acquia helps fund testing for Drupal Acquia logo

Comments

benjifisher’s picture

Title: Rename Views method add_orderby(() to addOrderby() » Rename Views method add_orderby() to addOrderby()

Fix issue title.

elvis2’s picture

Assigned: Unassigned » elvis2
elvis2’s picture

Status: Active » Needs review
FileSize
12.11 KB

No documentation changes were required.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Looks ok to me

oenie’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.phpundefined
@@ -992,7 +992,7 @@ function add_having_expression($group, $snippet, $args = array()) {
+  function addOrderby($table, $field = NULL, $order = 'ASC', $alias = '', $params = array()) {

Add public access modifier in front of the method to adher to the new OOP standards.

elvis2’s picture

Status: Needs work » Needs review
FileSize
12.12 KB

@oenie, thanks!

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

The last submitted patch, 2002272-6-rename-add_order_by.patch, failed testing.

elvis2’s picture

Status: Needs work » Needs review

#6: 2002272-6-rename-add_order_by.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 2002272-6-rename-add_order_by.patch, failed testing.

oenie’s picture

Status: Needs work » Needs review

#6: 2002272-6-rename-add_order_by.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 2002272-6-rename-add_order_by.patch, failed testing.

aspilicious’s picture

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

#6: 2002272-6-rename-add_order_by.patch queued for re-testing.

oenie’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me now
Except maybe from a very minor comment issue:
core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php, Line 997:

// @todo: Maybe it would make sense to just add a add_orderby_rand or something similar.
elvis2’s picture

Thanks @oenie, I will ask the parent issue what do to about that.

heddn’s picture

Ordinarily I'd suggest we not make the change from #13 right now. The scope of this issue was to only rename methods. However, this feels like an exception. Go ahead and change the comment to camel case.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Needs a re-roll

curl http://drupal.org/files/2002272-6-rename-add_order_by.patch | git a
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12411  100 12411    0     0  17634      0 --:--:-- --:--:-- --:--:-- 23640
error: patch failed: core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php:873
error: core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php: patch does not apply

And lets make the change suggested by #13 to fix up the comment.

jibran’s picture

Status: Needs work » Needs review
FileSize
12.14 KB

Reroll
conflict I

++<<<<<<< HEAD
 +  public function summarySort($order, $by = NULL) {
 +    $this->query->add_orderby(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));
++=======
+   function summary_sort($order, $by = NULL) {
+     $this->query->addOrderby(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));
++>>>>>>> 6

resolved

 -  function summary_sort($order, $by = NULL) {
 +  public function summarySort($order, $by = NULL) {
-     $this->query->add_orderby(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));
+     $this->query->addOrderby(NULL, NULL, $order, (!empty($by) ? $by : $this->name_alias));

conflict II

++<<<<<<< HEAD
 +        $menu_links = $this->query->addTable('menu_links', NULL, $join);
 +        $this->query->add_orderby($menu_links, 'weight', $this->options['order']);
 +        $this->query->add_orderby($menu_links, 'link_title', $this->options['order']);
++=======
+         $menu_links = $this->query->add_table('menu_links', NULL, $join);
+         $this->query->addOrderby($menu_links, 'weight', $this->options['order']);
+         $this->query->addOrderby($menu_links, 'link_title', $this->options['order']);
++>>>>>>> 6

resolved

 -        $menu_links = $this->query->add_table('menu_links', NULL, $join);
 +        $menu_links = $this->query->addTable('menu_links', NULL, $join);
-         $this->query->add_orderby($menu_links, 'weight', $this->options['order']);
-         $this->query->add_orderby($menu_links, 'link_title', $this->options['order']);
+         $this->query->addOrderby($menu_links, 'weight', $this->options['order']);
+         $this->query->addOrderby($menu_links, 'link_title', $this->options['order']);

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

The last submitted patch, 2002272-17.patch, failed testing.

aspilicious’s picture

Status: Needs work » Needs review

#17: 2002272-17.patch queued for re-testing.

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

The last submitted patch, 2002272-17.patch, failed testing.

heddn’s picture

re-roll and fixing #13

heddn’s picture

Status: Needs work » Needs review

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

The last submitted patch, drupal-viewsRename-add_orderby-2002272-21.patch, failed testing.

aspilicious’s picture

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

Status: Needs review » Reviewed & tested by the community

Done thnx :)

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 9c5e4bc and pushed to 8.x. Thanks!

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