Skip to content

Commit

Permalink
making the tags and images available in the related content data
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Jul 9, 2012
1 parent dd3c26c commit a2a6b7d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Core/Contents/Model/GlobalContent.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ protected function _findGetRelationsCategory($state, $query, $results = array())
'SubCategoryData.canonical_url',
'SubCategoryData.global_category_id'
);

foreach((array)$this->virtualFields as $field => $value) {
if(strstr($field, 'content_image_path')) {
$query['fields'][] = 'GlobalContent.' . $field;
}
}

$query['conditions'] = array(
'GlobalContent.global_category_id' => $query[0]
);
Expand Down Expand Up @@ -395,6 +402,10 @@ protected function _findGetRelationsCategory($state, $query, $results = array())
$model = $result['GlobalContent']['model'];
unset($result['GlobalContent']['foreign_key'], $result['GlobalContent']['model']);


if(!empty($result['GlobalTagged'])) {
$result['GlobalContent']['GlobalTagged'] = $result['GlobalTagged'];
}
$return[$model][] = $result['GlobalContent'];

if(!empty($result['SubCategoryData']['id'])) {
Expand Down

0 comments on commit a2a6b7d

Please sign in to comment.