fix rpc setpref (key unassigned)

This commit is contained in:
Andrew Dolgov 2012-02-13 15:09:39 +04:00
parent 7e431502dd
commit 74eef4fca8

View file

@ -210,9 +210,9 @@ class RPC extends Protected_Handler {
}
function setpref() {
$value = str_replace("\n", "<br/>", $_REQUEST['value']);
// set_pref escapes input, so no need to double escape it here
$key = $_REQUEST['key'];
$value = str_replace("\n", "<br/>", $_REQUEST['value']);
set_pref($this->link, $key, $value, $_SESSION['uid'], $key != 'USER_STYLESHEET');