Re-add the serendipity_jssetcookie function, because plugin use this API and it would otherwise create a fatal PHP error.
This commit is contained in:
@ -697,6 +697,25 @@ function serendipity_setCookie($name, $value, $securebyprot = true) {
|
|||||||
$serendipity['COOKIE'][$name] = $value;
|
$serendipity['COOKIE'][$name] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Echo Javascript code to set a cookie variable
|
||||||
|
*
|
||||||
|
* This function is useful if your HTTP headers were already sent, but you still want to set a cookie
|
||||||
|
* Note that contents are echo'd, not return'd. Can be used by plugins.
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string The name of the cookie variable
|
||||||
|
* @param string The contents of the cookie variable
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
function serendipity_JSsetCookie($name, $value) {
|
||||||
|
$name = htmlentities($name);
|
||||||
|
$value = urlencode($value);
|
||||||
|
|
||||||
|
echo '<script type="text/javascript">serendipity.SetCookie("' . $name . '", unescape("' . $value . '"))</script>' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes an existing cookie value
|
* Deletes an existing cookie value
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user