diff options
Diffstat (limited to 'lib/appconfig.php')
-rw-r--r-- | lib/appconfig.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/appconfig.php b/lib/appconfig.php index e615d838173..8bc68f45de0 100644 --- a/lib/appconfig.php +++ b/lib/appconfig.php @@ -125,14 +125,22 @@ class OC_Appconfig{ public static function setValue( $app, $key, $value ) { // Does the key exist? yes: update. No: insert if(! self::hasKey($app, $key)) { - $query = OC_DB::prepare( 'INSERT INTO `*PREFIX*appconfig` ( `appid`, `configkey`, `configvalue` )' - .' VALUES( ?, ?, ? )' ); - $query->execute( array( $app, $key, $value )); + OC_DB::executeAudited(' + INSERT INTO `*PREFIX*appconfig` ( + `appid`, `configkey`, `configvalue` + ) VALUES ( + ?, ?, ? + ) + ', array( $app, $key, $value ) + ); } else{ - $query = OC_DB::prepare( 'UPDATE `*PREFIX*appconfig` SET `configvalue` = ?' - .' WHERE `appid` = ? AND `configkey` = ?' ); - $query->execute( array( $value, $app, $key )); + OC_DB::executeAudited(' + UPDATE `*PREFIX*appconfig` + SET `configvalue` = ? + WHERE `appid` = ? AND `configkey` = ? + ', array( $value, $app, $key ) + ); } } |