You are here

function _favorites_delete_db in Favorites 7.2

Same name and namespace in other branches
  1. 7 favorites.module \_favorites_delete_db()

Helper function: Delete a single favorite from the DB.

Used to abstract the storage model (cookie vs. db).

Parameters

$favorite: The favorite object.

Return value

bool The deletion success.

See also

_favorites_delete().

1 call to _favorites_delete_db()
_favorites_delete in ./favorites.module
Helper function: Delete a single favorite.

File

./favorites.module, line 655
The favorites module allows users to bookmark any path within a site.

Code

function _favorites_delete_db($favorite) {
  return db_delete('favorites')
    ->condition('fid', $favorite->fid, '=')
    ->execute();
}