mirror of
https://github.com/moparisthebest/wallabag
synced 2024-12-23 15:58:55 -05:00
bug fix #229: theme not stored on updated poches
This commit is contained in:
parent
37527034ab
commit
58ace4941e
@ -113,9 +113,17 @@ class Database {
|
||||
}
|
||||
|
||||
public function updateUserConfig($userId, $key, $value) {
|
||||
$sql_update = "UPDATE users_config SET `value`=? WHERE `user_id`=? AND `name`=?";
|
||||
$params_update = array($value, $userId, $key);
|
||||
$query = $this->executeQuery($sql_update, $params_update);
|
||||
$config = $this->getConfigUser($userId);
|
||||
|
||||
if (!isset ($user_config[$key])) {
|
||||
$sql = "INSERT INTO users_config (`value`, `user_id`, `name`) VALUES (?, ?, ?)";
|
||||
}
|
||||
else {
|
||||
$sql = "UPDATE users_config SET `value`=? WHERE `user_id`=? AND `name`=?";
|
||||
}
|
||||
|
||||
$params = array($value, $userId, $key);
|
||||
$query = $this->executeQuery($sql, $params);
|
||||
}
|
||||
|
||||
private function executeQuery($sql, $params) {
|
||||
|
Loading…
Reference in New Issue
Block a user