You are here

function FlagGlobalCookieStorage::unflag in Flag 6.2

Same name and namespace in other branches
  1. 7.3 includes/flag.cookie_storage.inc \FlagGlobalCookieStorage::unflag()
  2. 7.2 flag.inc \FlagGlobalCookieStorage::unflag()

"Unflags" an item.

It just records this fact in a cookie.

Overrides FlagCookieStorage::unflag

File

./flag.inc, line 1840
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

FlagGlobalCookieStorage
Storage handler for global flags.

Code

function unflag($content_id) {
  $cookie_key = $this
    ->cookie_key($content_id);
  setcookie($cookie_key, 0, time() + $this
    ->get_lifetime(), base_path());
  $_COOKIE[$cookie_key] = 0;
}