diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-24 20:43:07 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-24 20:43:07 -0400 |
commit | 3a06e0ab21ef12e4193f52260e7ecf367c6bb8f0 (patch) | |
tree | 0c0498ad825ea5ee8e445877442d59f5ac87d7c0 /app/Model/Setting.php | |
parent | 725b7d2a551c782b40e69ab1bdc701b5ee899646 (diff) |
Improve PR #1993
Diffstat (limited to 'app/Model/Setting.php')
-rw-r--r-- | app/Model/Setting.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/app/Model/Setting.php b/app/Model/Setting.php index 4e1c1b0b..f98d7ce1 100644 --- a/app/Model/Setting.php +++ b/app/Model/Setting.php @@ -88,9 +88,18 @@ abstract class Setting extends Base foreach ($values as $option => $value) { if ($this->exists($option)) { - $results[] = $this->db->table(self::TABLE)->eq('option', $option)->update(array('value' => $value, 'changed_on' => $timestamp, 'changed_by' => $user_id)); + $results[] = $this->db->table(self::TABLE)->eq('option', $option)->update(array( + 'value' => $value, + 'changed_on' => $timestamp, + 'changed_by' => $user_id, + )); } else { - $results[] = $this->db->table(self::TABLE)->insert(array('option' => $option, 'value' => $value, 'changed_on' => $timestamp, 'changed_by' => $user_id)); + $results[] = $this->db->table(self::TABLE)->insert(array( + 'option' => $option, + 'value' => $value, + 'changed_on' => $timestamp, + 'changed_by' => $user_id, + )); } } |