From 60e89ef8931bb0325846400bf91eecc920859ce4 Mon Sep 17 00:00:00 2001 From: shish Date: Thu, 6 Dec 2007 10:47:09 +0000 Subject: [PATCH] remove redundant code git-svn-id: file:///home/shish/svn/shimmie2/trunk@628 7f39781d-f577-437e-ae19-be835c7a54ca --- core/config.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/config.class.php b/core/config.class.php index 288ac537..8ff8f3ef 100644 --- a/core/config.class.php +++ b/core/config.class.php @@ -10,14 +10,11 @@ class Config { public function save($name=null) { if(is_null($name)) { foreach($this->values as $name => $value) { - // does "or update" work with sqlite / postgres? - $this->database->db->StartTrans(); - $this->database->Execute("DELETE FROM config WHERE name = ?", array($name)); - $this->database->Execute("INSERT INTO config VALUES (?, ?)", array($name, $value)); - $this->database->db->CommitTrans(); + $this->save($name); } } else { + // does "or update" work with sqlite / postgres? $this->database->db->StartTrans(); $this->database->Execute("DELETE FROM config WHERE name = ?", array($name)); $this->database->Execute("INSERT INTO config VALUES (?, ?)", array($name, $this->values[$name]));