Commit 2020f330 authored by tim.plunkett's avatar tim.plunkett

Issue #1767180 by tim.plunkett: Cleaned up how relationship labels were built in the UI.

parent 3b3e139c
......@@ -2212,15 +2212,10 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
if (!isset($relationships)) {
// Get relationship labels
$relationships = array();
// @todo: getHandlers()
$handlers = $display->handler->getOption('relationships');
if ($handlers) {
foreach ($handlers as $id => $info) {
$handler = $display->handler->getHandler('relationship', $id);
foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
$relationships[$id] = $handler->label();
}
}
}
// Filters can now be grouped so we do a little bit extra:
$groups = array();
......@@ -3318,13 +3313,6 @@ function views_ui_rearrange_form($form, &$form_state) {
$relationships = array();
foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
$relationships[$id] = $handler->label();
$handlers = $display->handler->getOption('relationships');
if ($handlers) {
foreach ($handlers as $id => $info) {
$handler = $display->handler->getHandler('relationship', $id);
$relationships[$id] = $handler->label();
}
}
}
// Filters can now be grouped so we do a little bit extra:
......
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