Skip to content

Commit

Permalink
Fixes #2914. Merged fix for r.time_created sorting to trunk.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.elgg.org/elgg/trunk@8220 36083f99-b078-4883-b0ff-0f9b5a30f544
  • Loading branch information
brettp committed Feb 14, 2011
1 parent d9b0196 commit 82f7909
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions engine/lib/relationships.php
Expand Up @@ -277,6 +277,16 @@ function elgg_get_entities_from_relationship($options) {
}

$options['joins'] = array_merge($options['joins'], $clauses['joins']);

if (isset($options['selects']) && !is_array($options['selects'])) {
$options['selects'] = array($options['selects']);
} elseif (!isset($options['selects'])) {
$options['selects'] = array();
}

$select = array('r.*');

$options['selects'] = array_merge($options['selects'], $select);
}

return elgg_get_entities_from_metadata($options);
Expand Down

2 comments on commit 82f7909

@jdalsem
Copy link
Member

@jdalsem jdalsem commented on 82f7909 Mar 7, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brett, do you know exactly why you did this fix? The r.* causes trouble in combination with 187fcf6 because complete rows are loaded as the new entity, but the column r.time_created will then be used for the entity build

@brettp
Copy link
Member Author

@brettp brettp commented on 82f7909 Apr 10, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't. Cash opened a ticket for this: http://trac.elgg.org/ticket/4409

Please sign in to comment.