Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This code can't really be right, as it get's all relationship handlers twice, so this seems to be an algorithm N^2
<?php
// Get relationship labels
$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();
}
}
}
?>
Comment | File | Size | Author |
---|---|---|---|
#3 | views-1767180-3.patch | 1.29 KB | tim.plunkett |
Comments
Comment #0.0
sphism CreditAttribution: sphism commentedUpdated issue summary.
Comment #1
sphism CreditAttribution: sphism commentedJust updating this issue, seems that the camelCase methods have been changed
includes/admin.inc line 3390
...
[edit:] Whoops, I was looking at an older version of views 8.x ... methods are now camelCase
Comment #2
tim.plunkett@sphism You're looking at D7 code. This is for D8.
Comment #3
tim.plunkettYep, I confirmed this works, and cleaned up the other instances.
Comment #4
dawehnerThis looks perfect.
In the longrun it would make sense to have tests for this as well.
Comment #5
tim.plunkettAgreed, though it wouldn't have failed tests, since it was producing the correct results, just VERY SLOWLY.
http://drupalcode.org/project/views.git/commit/8dbabdd
Comment #6.0
(not verified) CreditAttribution: commentedUpdated issue summary.