summaryrefslogtreecommitdiffstats
path: root/lib/appconfig.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/appconfig.php')
-rw-r--r--lib/appconfig.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/appconfig.php b/lib/appconfig.php
index 1f2d576af87..e615d838173 100644
--- a/lib/appconfig.php
+++ b/lib/appconfig.php
@@ -91,7 +91,8 @@ class OC_Appconfig{
*/
public static function getValue( $app, $key, $default = null ) {
// At least some magic in here :-)
- $query = OC_DB::prepare( 'SELECT `configvalue` FROM `*PREFIX*appconfig` WHERE `appid` = ? AND `configkey` = ?' );
+ $query = OC_DB::prepare( 'SELECT `configvalue` FROM `*PREFIX*appconfig`'
+ .' WHERE `appid` = ? AND `configkey` = ?' );
$result = $query->execute( array( $app, $key ));
$row = $result->fetchRow();
if($row) {
@@ -124,11 +125,13 @@ 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 = OC_DB::prepare( 'INSERT INTO `*PREFIX*appconfig` ( `appid`, `configkey`, `configvalue` )'
+ .' VALUES( ?, ?, ? )' );
$query->execute( array( $app, $key, $value ));
}
else{
- $query = OC_DB::prepare( 'UPDATE `*PREFIX*appconfig` SET `configvalue` = ? WHERE `appid` = ? AND `configkey` = ?' );
+ $query = OC_DB::prepare( 'UPDATE `*PREFIX*appconfig` SET `configvalue` = ?'
+ .' WHERE `appid` = ? AND `configkey` = ?' );
$query->execute( array( $value, $app, $key ));
}
}