Skip to content

Commit

Permalink
Always return the link value.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 22, 2016
1 parent e34972e commit 2f9883d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jonah/lib/Driver/Sql.php
Expand Up @@ -486,13 +486,15 @@ protected function _getStories($criteria, $order = Jonah::ORDER_PUBLISHED)
if ($limit || $start != 0) {
$sql = $this->_db->addLimitOffset($sql, array('limit' => $limit, 'offset' => $start));
}

try {
$results = $this->_db->selectAll($sql, $values);
} catch (Horde_Db_Exception $e) {
throw new Jonah_Exception($e);
}

$channel = $this->_getChannel($criteria['channel_id']);
foreach ($results as &$row) {
$row['link'] = (string)$this->getStoryLink($channel, $row);
$row['tags'] = $GLOBALS['injector']
->getInstance('Jonah_Tagger')
->getTags($row['id'], Jonah_Tagger::TYPE_STORY);
Expand Down

0 comments on commit 2f9883d

Please sign in to comment.