Skip to content

Commit

Permalink
Simplify.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jul 6, 2014
1 parent 9a25c9a commit 3dcbe4a
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions trean/lib/Bookmarks.php
Expand Up @@ -175,20 +175,9 @@ public function groupBookmarks($groupby)
*/
public function getBookmark($id)
{
try {
$bookmark = $GLOBALS['trean_db']->selectOne('
SELECT bookmark_id, user_id, bookmark_url, bookmark_title, bookmark_description, bookmark_clicks, bookmark_http_status, favicon_url, bookmark_dt
FROM trean_bookmarks
WHERE bookmark_id = ' . (int)$id);
} catch (Horde_Db_Exception $e) {
throw new Trean_Exception($e);
}
if (is_null($bookmark)) {
throw new Horde_Exception_NotFound();
}
$results = $this->getBookmarks(array($id));

$bookmark = $this->_resultSet(array($bookmark));
return array_pop($bookmark);
return array_pop($results);
}

/**
Expand Down

0 comments on commit 3dcbe4a

Please sign in to comment.