Fix
This commit is contained in:
parent
181a65a99b
commit
74f6779c63
@ -22,11 +22,15 @@ class SettingsManager{
|
||||
}
|
||||
|
||||
public static function update ($name, $value) {
|
||||
try {
|
||||
Db::edit ('settings', ['value' => $value], 'WHERE name = ?', array($name));
|
||||
} catch(PDOException $error) {
|
||||
echo $error->getMessage();
|
||||
die();
|
||||
if ($this.getByName($name)){
|
||||
$this->create($name, $value);
|
||||
} else {
|
||||
try {
|
||||
Db::edit ('settings', ['value' => $value], 'WHERE name = ?', array($name));
|
||||
} catch(PDOException $error) {
|
||||
echo $error->getMessage();
|
||||
die();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user