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,13 +2212,8 @@ function views_ui_edit_form_get_bucket($type, $view, $display) { ...@@ -2212,13 +2212,8 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
if (!isset($relationships)) { if (!isset($relationships)) {
// Get relationship labels // Get relationship labels
$relationships = array(); $relationships = array();
// @todo: getHandlers() foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
$handlers = $display->handler->getOption('relationships'); $relationships[$id] = $handler->label();
if ($handlers) {
foreach ($handlers as $id => $info) {
$handler = $display->handler->getHandler('relationship', $id);
$relationships[$id] = $handler->label();
}
} }
} }
...@@ -3318,13 +3313,6 @@ function views_ui_rearrange_form($form, &$form_state) { ...@@ -3318,13 +3313,6 @@ function views_ui_rearrange_form($form, &$form_state) {
$relationships = array(); $relationships = array();
foreach ($display->handler->getHandlers('relationship') as $id => $handler) { foreach ($display->handler->getHandlers('relationship') as $id => $handler) {
$relationships[$id] = $handler->label(); $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: // 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