From: Translation updater bot Date: Tue, 3 Nov 2015 20:29:17 +0000 (+0000) Subject: Merge "Localisation updates from https://translatewiki.net." X-Git-Tag: 1.31.0-rc.0~9118 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=c048813e067efef06cc2607ba46261f2fdb924b8;hp=fda734649dfedcb02adaa8a10f633a0363766693;p=lhc%2Fweb%2Fwiklou.git Merge "Localisation updates from https://translatewiki.net." --- diff --git a/includes/WebResponse.php b/includes/WebResponse.php index bb7682d3e8..26fb20f331 100644 --- a/includes/WebResponse.php +++ b/includes/WebResponse.php @@ -136,6 +136,19 @@ class WebResponse { $options['httpOnly'] ); } } + + /** + * Unset a browser cookie. + * This sets the cookie with an empty value and an expiry set to a time in the past, + * which will cause the browser to remove any cookie with the given name, domain and + * path from its cookie store. Options other than these (and prefix) have no effect. + * @param string $name Cookie name + * @param array $options Cookie options, see {@link setCookie()} + * @since 1.27 + */ + public function clearCookie( $name, $options = array() ) { + $this->setCookie( $name, '', time() - 31536000 /* 1 year */, $options ); + } } /**