summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/preferences.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-05-06 19:18:57 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-06-05 16:54:03 +0200
commit2d83424a29e4dbaeb16856c87378a753b10cdb90 (patch)
treea196f127f85944cb531e8413e93336d9f5be06b5 /lib/private/legacy/preferences.php
parent4b650a20a42b70412cee9dd835e096e16da6d530 (diff)
downloadnextcloud-server-2d83424a29e4dbaeb16856c87378a753b10cdb90.tar.gz
nextcloud-server-2d83424a29e4dbaeb16856c87378a753b10cdb90.zip
allow to set pre-condition for setValue
Diffstat (limited to 'lib/private/legacy/preferences.php')
-rw-r--r--lib/private/legacy/preferences.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/legacy/preferences.php b/lib/private/legacy/preferences.php
index 71d0b749f43..060274085fe 100644
--- a/lib/private/legacy/preferences.php
+++ b/lib/private/legacy/preferences.php
@@ -84,14 +84,14 @@ class OC_Preferences{
* @param string $app app
* @param string $key key
* @param string $value value
- * @return bool
+ * @param string $preCondition only set value if the key had a specific value before
+ * @return bool true if value was set, otherwise false
*
* Adds a value to the preferences. If the key did not exist before, it
* will be added automagically.
*/
- public static function setValue( $user, $app, $key, $value ) {
- self::$object->setValue( $user, $app, $key, $value );
- return true;
+ public static function setValue( $user, $app, $key, $value, $preCondition = null ) {
+ return self::$object->setValue( $user, $app, $key, $value, $preCondition );
}
/**