$base_table =
$this->handler->query->relationships
[$relationship]['base'
];
} // Cycle through the joins. This isn't as error-safe as the normal
// ensurePath logic. Perhaps it should be.
$r_join =
clone $join;
while ($r_join->leftTable !=
$base_table) { $r_join = HandlerBase::
getTableJoin($r_join->leftTable,
$base_table);
} // If we found that there are tables in between, add the relationship.
if ($r_join->table !=
$join->table
) { $relationship =
$this->handler->query->
addRelationship($this->handler->table . '_' .
$r_join->table,
$r_join,
$r_join->table,
$this->handler->relationship
);
} // And now add our table, using the new relationship if one was used.
$alias =
$this->handler->query->
addTable($this->handler->table,
$relationship,
$join,
$alias);
// Store what values are used by this table chain so that other chains can
// automatically discard those values.
if (empty($this->handler->view->many_to_one_tables
[$field])) { $this->handler->view->many_to_one_tables
[$field] =
$this->handler->value;
} else {