Skip to content

Commit

Permalink
fix article metadata values
Browse files Browse the repository at this point in the history
  • Loading branch information
takeit committed Nov 5, 2014
1 parent f02db54 commit b145e9c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions newscoop/library/Newscoop/Services/ArticleService.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ public function articleResolver(Request $request)

if (!empty($article)) {
// fill the article meta data
$this->articleMetadata['id'] = $article[0][0]['number'];
$this->articleMetadata['name'] = $article[0][0]['name'];
$this->articleMetadata['issue'] = $article[0][0]['issue']['name'];
$this->articleMetadata['issue_id'] = $article[0][0]['issueId'];
$this->articleMetadata['section'] = $article[0]['name'];
$this->articleMetadata['section_id'] = $article[0][0]['sectionId'];
$this->articleMetadata['language_code'] = $article[0]['code'];
$this->articleMetadata['language_id'] = $article[0][0]['IdLanguage'];
$this->articleMetadata['id'] = $article[0]['number'];
$this->articleMetadata['name'] = $article[0]['name'];
$this->articleMetadata['issue'] = $article[0]['issue']['name'];
$this->articleMetadata['issue_id'] = $article[0]['issueId'];
$this->articleMetadata['section'] = $article[0]['section']['name'];
$this->articleMetadata['section_id'] = $article[0]['sectionId'];
$this->articleMetadata['language_code'] = $article[0]['language']['code'];
$this->articleMetadata['language_id'] = $article[0]['IdLanguage'];

// add the meta data to the request
$request->attributes->set('_newscoop_article_metadata', $this->articleMetadata);
Expand Down

0 comments on commit b145e9c

Please sign in to comment.