Commit 17c06e0c authored by alexpott's avatar alexpott
Browse files

Issue #2002482 by chrisjlee, brennanmh, shixish: Rename Views method ensure_path() to ensurePath().

parent c4e15352
...@@ -86,7 +86,7 @@ public function addTable($join = NULL, $alias = NULL) { ...@@ -86,7 +86,7 @@ public function addTable($join = NULL, $alias = NULL) {
} }
// Cycle through the joins. This isn't as error-safe as the normal // Cycle through the joins. This isn't as error-safe as the normal
// ensure_path logic. Perhaps it should be. // ensurePath logic. Perhaps it should be.
$r_join = clone $join; $r_join = clone $join;
while ($r_join->leftTable != $base_table) { while ($r_join->leftTable != $base_table) {
$r_join = HandlerBase::getTableJoin($r_join->leftTable, $base_table); $r_join = HandlerBase::getTableJoin($r_join->leftTable, $base_table);
......
...@@ -365,7 +365,7 @@ function add_relationship($alias, JoinPluginBase $join, $base, $link_point = NUL ...@@ -365,7 +365,7 @@ function add_relationship($alias, JoinPluginBase $join, $base, $link_point = NUL
* added. * added.
*/ */
public function addTable($table, $relationship = NULL, JoinPluginBase $join = NULL, $alias = NULL) { public function addTable($table, $relationship = NULL, JoinPluginBase $join = NULL, $alias = NULL) {
if (!$this->ensure_path($table, $relationship, $join)) { if (!$this->ensurePath($table, $relationship, $join)) {
return FALSE; return FALSE;
} }
...@@ -545,7 +545,7 @@ function ensure_table($table, $relationship = NULL, JoinPluginBase $join = NULL) ...@@ -545,7 +545,7 @@ function ensure_table($table, $relationship = NULL, JoinPluginBase $join = NULL)
// join to a link point, not the base table. // join to a link point, not the base table.
$join = $this->adjust_join($join, $relationship); $join = $this->adjust_join($join, $relationship);
if ($this->ensure_path($table, $relationship, $join)) { if ($this->ensurePath($table, $relationship, $join)) {
// Attempt to eliminate redundant joins. If this table's // Attempt to eliminate redundant joins. If this table's
// relationship and join exactly matches an existing table's // relationship and join exactly matches an existing table's
// relationship and join, we do not have to join to it again; // relationship and join, we do not have to join to it again;
...@@ -587,7 +587,7 @@ function ensure_table($table, $relationship = NULL, JoinPluginBase $join = NULL) ...@@ -587,7 +587,7 @@ function ensure_table($table, $relationship = NULL, JoinPluginBase $join = NULL)
* query they will be added, but additional copies will NOT be added * query they will be added, but additional copies will NOT be added
* if the table is already there. * if the table is already there.
*/ */
function ensure_path($table, $relationship = NULL, $join = NULL, $traced = array(), $add = array()) { protected function ensurePath($table, $relationship = NULL, $join = NULL, $traced = array(), $add = array()) {
if (!isset($relationship)) { if (!isset($relationship)) {
$relationship = $this->view->storage->get('base_table'); $relationship = $this->view->storage->get('base_table');
} }
...@@ -632,7 +632,7 @@ function ensure_path($table, $relationship = NULL, $join = NULL, $traced = array ...@@ -632,7 +632,7 @@ function ensure_path($table, $relationship = NULL, $join = NULL, $traced = array
// Keep looking. // Keep looking.
$traced[$join->leftTable] = TRUE; $traced[$join->leftTable] = TRUE;
return $this->ensure_path($join->leftTable, $relationship, $left_join, $traced, $add); return $this->ensurePath($join->leftTable, $relationship, $left_join, $traced, $add);
} }
/** /**
......
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