I don't think the cookie mode ever worked right, as it used an uninitialized variable for the $expire.

Here's a version that seems to work fine.

I've changed it to either set a cookie with expiration near the end of time() or to remove the cookie. The correct button shows in each case.

In the process I cleaned up some out-of-date comments.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Here's the patch. I don't know why they seem to get dropped so often lately.

rfay’s picture

Here's an improvement: Cookie deletion wasn't working quite right.