summaryrefslogtreecommitdiffstats
path: root/lib/preferences.php
diff options
context:
space:
mode:
authorJakob Sack <kde@jakobsack.de>2011-04-15 19:24:23 +0200
committerJakob Sack <kde@jakobsack.de>2011-04-15 19:24:23 +0200
commit3d89b2caa41bc99f48b8377c87e9c653f467631d (patch)
tree6aafbd2f185f7ce2ea9340c0370480766e5d1bfc /lib/preferences.php
parent3c01e307484a2738ed0314b7acf829cb7c9d8cdb (diff)
downloadnextcloud-server-3d89b2caa41bc99f48b8377c87e9c653f467631d.tar.gz
nextcloud-server-3d89b2caa41bc99f48b8377c87e9c653f467631d.zip
php is not perl
Diffstat (limited to 'lib/preferences.php')
-rw-r--r--lib/preferences.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/preferences.php b/lib/preferences.php
index 7b510e5b7de..6fb3cf1312f 100644
--- a/lib/preferences.php
+++ b/lib/preferences.php
@@ -69,7 +69,7 @@ class OC_PREFERENCES{
public static function getApps( $user ){
// No need for more comments
$query = OC_DB::prepare( 'SELECT DISTINCT( `appid` ) FROM `*PREFIX*preferences` WHERE `userid` = ?' );
- $result = $query->execute( $user );
+ $result = $query->execute( array( $user ));
$apps = array();
while( $row = $result->fetchRow()){
@@ -91,7 +91,7 @@ class OC_PREFERENCES{
public static function getKeys( $user, $app ){
// No need for more comments
$query = OC_DB::prepare( 'SELECT `key` FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ?' );
- $result = $query->execute( $user, $app );
+ $result = $query->execute( array( $user, $app ));
$keys = array();
while( $row = $result->fetchRow()){
@@ -115,7 +115,7 @@ class OC_PREFERENCES{
public static function getValue( $user, $app, $key, $default = null ){
// Try to fetch the value, return default if not exists.
$query = OC_DB::prepare( 'SELECT `value` FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ? AND `key` = ?' );
- $result = $query->execute( $user, $app, $key );
+ $result = $query->execute( array( $user, $app, $key ));
if( !$result->numRows()){
return $default;
@@ -144,11 +144,11 @@ class OC_PREFERENCES{
// null: does not exist. Insert.
if( is_null( $exists )){
$query = OC_DB::prepare( 'INSERT INTO `*PREFIX*preferences` ( `userid`, `appid`, `key`, `value` ) VALUES( ?, ?, ?, ? )' );
- $query->execute( $user, $app, $key, $value );
+ $query->execute( array( $user, $app, $key, $value ));
}
else{
$query = OC_DB::prepare( 'UPDATE `*PREFIX*preferences` SET `value` = ? WHERE `userid` = ? AND `appid` = ? AND `key` = ?' );
- $query->execute( $value, $user, $app, $key );
+ $query->execute( array( $value, $user, $app, $key ));
}
}
@@ -164,7 +164,7 @@ class OC_PREFERENCES{
public static function deleteKey( $user, $app, $key ){
// No need for more comments
$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ? AND `key` = ?' );
- $result = $query->execute( $user, $app, $key );
+ $result = $query->execute( array( $user, $app, $key ));
return true;
}
@@ -180,7 +180,7 @@ class OC_PREFERENCES{
public static function deleteApp( $user, $app ){
// No need for more comments
$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*preferences` WHERE `userid` = ? AND `appid` = ?' );
- $result = $query->execute( $user, $app );
+ $result = $query->execute( array( $user, $app ));
return true;
}
@@ -195,7 +195,7 @@ class OC_PREFERENCES{
public static function deleteUser( $user ){
// No need for more comments
$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*preferences` WHERE `userid` = ?' );
- $result = $query->execute( $user );
+ $result = $query->execute( array( $user ));
return true;
}
@@ -210,7 +210,7 @@ class OC_PREFERENCES{
public static function deleteAppFromAllUsers( $app ){
// No need for more comments
$query = OC_DB::prepare( 'DELETE FROM `*PREFIX*preferences` WHERE `appid` = ?' );
- $result = $query->execute( $app );
+ $result = $query->execute( array( $app ));
return true;
}