function _favorites_delete in Favorites 7.2
Same name and namespace in other branches
- 7 favorites.module \_favorites_delete()
Helper function: Delete a single favorite.
Used to abstract the storage model (cookie vs. db).
Parameters
$favorite: The favorite object.
Return value
bool The deletion success.
See also
1 call to _favorites_delete()
- favorites_remove_favorite in ./
favorites.module - Deletes a favorite.
File
- ./
favorites.module, line 631 - The favorites module allows users to bookmark any path within a site.
Code
function _favorites_delete($favorite) {
if (strpos($favorite->fid, 'c_') !== 0) {
// No cookie.
return _favorites_delete_db($favorite);
}
else {
return _favorites_delete_cookie($favorite);
}
}