Skip to content

Commit

Permalink
Allow crawling to be disabled when creating a new bookmark.
Browse files Browse the repository at this point in the history
Needed, for now, when importing bookmarks since this takes forever
and seems to randomly kill the browser connection.
  • Loading branch information
mrubinsk committed Jul 8, 2013
1 parent fff30c5 commit 33b4e38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion trean/data.php
Expand Up @@ -73,7 +73,7 @@

foreach ($next_step as $row) {
try {
$trean_gateway->newBookmark($row);
$trean_gateway->newBookmark($row, false);
} catch (Exception $e) {
$msg = _("Can't create a new bookmark.")
. ' ' . sprintf(_("This is what the server said: %s"), $e->getMessage());
Expand Down
4 changes: 2 additions & 2 deletions trean/lib/Bookmarks.php
Expand Up @@ -38,14 +38,14 @@ public function __construct(Content_Users_Manager $userManager)
*
* @return Trean_Bookmark
*/
public function newBookmark(array $properties)
public function newBookmark(array $properties, $crawl = true)
{
$properties['user_id'] = $this->_userId;
if (empty($properties['bookmark_dt'])) {
$properties['bookmark_dt'] = new Horde_Date(time());
}
$bookmark = new Trean_Bookmark($properties);
$bookmark->save();
$bookmark->save($crawl);
return $bookmark;
}

Expand Down

0 comments on commit 33b4e38

Please sign in to comment.