summaryrefslogtreecommitdiffstats
path: root/lib/appconfig.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-04-28 17:45:41 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-04-28 17:45:41 +0200
commit96cb5a3d2e88c7ddab23aa799526d8ab687477c8 (patch)
tree1adf0bb533ecd30a7540447b98ab91e3482f559e /lib/appconfig.php
parent3e99aefb7ebdb115794ec7d25b2e73db504252ff (diff)
downloadnextcloud-server-96cb5a3d2e88c7ddab23aa799526d8ab687477c8.tar.gz
nextcloud-server-96cb5a3d2e88c7ddab23aa799526d8ab687477c8.zip
fix oc_appconfig for sqlite
Diffstat (limited to 'lib/appconfig.php')
-rw-r--r--lib/appconfig.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/appconfig.php b/lib/appconfig.php
index df338a412db..f7c49ca19cc 100644
--- a/lib/appconfig.php
+++ b/lib/appconfig.php
@@ -47,7 +47,7 @@ class OC_APPCONFIG{
*/
public static function getApps(){
// No magic in here!
- $query = OC_DB::prepare( 'SELECT DISTINCT( `appid` ) FROM `*PREFIX*appconfig`' );
+ $query = OC_DB::prepare( 'SELECT DISTINCT( appid ) FROM `*PREFIX*appconfig`' );
$result = $query->execute();
$apps = array();
@@ -68,7 +68,7 @@ class OC_APPCONFIG{
*/
public static function getKeys( $app ){
// No magic in here as well
- $query = OC_DB::prepare( 'SELECT `key` FROM `*PREFIX*appconfig` WHERE `appid` = ?' );
+ $query = OC_DB::prepare( 'SELECT key FROM `*PREFIX*appconfig` WHERE `appid` = ?' );
$result = $query->execute( array( $app ));
$keys = array();
@@ -91,7 +91,7 @@ class OC_APPCONFIG{
*/
public static function getValue( $app, $key, $default = null ){
// At least some magic in here :-)
- $query = OC_DB::prepare( 'SELECT `value` FROM `*PREFIX*appconfig` WHERE `appid` = ? AND `key` = ?' );
+ $query = OC_DB::prepare( 'SELECT value FROM *PREFIX*appconfig WHERE appid = ? AND key = ?' );
$result = $query->execute( array( $app, $key ));
if( !$result->numRows()){
@@ -118,11 +118,11 @@ class OC_APPCONFIG{
// null: does not exist
if( is_null( $exists )){
- $query = OC_DB::prepare( 'INSERT INTO `*PREFIX*appconfig` ( `appid`, `key`, `value` ) VALUES( ?, ?, ? )' );
+ $query = OC_DB::prepare( 'INSERT INTO *PREFIX*appconfig ( `appid`, `key`, `value` ) VALUES( ?, ?, ? )' );
$query->execute( array( $app, $key, $value ));
}
else{
- $query = OC_DB::prepare( 'UPDATE `*PREFIX*appconfig` SET `value` = ? WHERE `appid` = ? AND `key` = ?' );
+ $query = OC_DB::prepare( 'UPDATE *PREFIX*appconfig SET value = ? WHERE appid = ? AND key = ?' );
$query->execute( array( $value, $app, $key ));
}
}