Skip to content

Commit

Permalink
Allow passing in a bookmark creation date when creating a bookmark.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Jul 8, 2013
1 parent 5effe52 commit d58aac5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trean/lib/Bookmarks.php
Expand Up @@ -41,7 +41,9 @@ public function __construct(Content_Users_Manager $userManager)
public function newBookmark(array $properties)
{
$properties['user_id'] = $this->_userId;
$properties['bookmark_dt'] = new Horde_Date(time());
if (empty($properties['bookmark_dt'])) {
$properties['bookmark_dt'] = new Horde_Date(time());
}
$bookmark = new Trean_Bookmark($properties);
$bookmark->save();
return $bookmark;
Expand Down

0 comments on commit d58aac5

Please sign in to comment.