mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-30 11:30:30 +00:00
bug fix #229: theme not stored on updated poches
This commit is contained in:
parent
37527034ab
commit
58ace4941e
1 changed files with 11 additions and 3 deletions
|
@ -113,9 +113,17 @@ class Database {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateUserConfig($userId, $key, $value) {
|
public function updateUserConfig($userId, $key, $value) {
|
||||||
$sql_update = "UPDATE users_config SET `value`=? WHERE `user_id`=? AND `name`=?";
|
$config = $this->getConfigUser($userId);
|
||||||
$params_update = array($value, $userId, $key);
|
|
||||||
$query = $this->executeQuery($sql_update, $params_update);
|
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) {
|
private function executeQuery($sql, $params) {
|
||||||
|
|
Loading…
Reference in a new issue