summaryrefslogtreecommitdiffstats
path: root/apps/gallery/ajax
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-02 15:54:34 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-02 15:54:34 +0200
commit82a61e2e1a0f392759b69f7336213ff70a7bc877 (patch)
treea78094228b8454feb9212c2b7c3f54f5427fc03c /apps/gallery/ajax
parentff66600bc060dd2713b88b4af88e5a0a291710e0 (diff)
downloadnextcloud-server-82a61e2e1a0f392759b69f7336213ff70a7bc877.tar.gz
nextcloud-server-82a61e2e1a0f392759b69f7336213ff70a7bc877.zip
port oc_preferences
Diffstat (limited to 'apps/gallery/ajax')
-rwxr-xr-xapps/gallery/ajax/galleryOp.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php
index aaf4a7d8658..75b18c6f7bf 100755
--- a/apps/gallery/ajax/galleryOp.php
+++ b/apps/gallery/ajax/galleryOp.php
@@ -74,18 +74,18 @@ function handleStoreSettings($root, $order) {
return;
}
- $current_root = OC_Preferences::getValue(OCP\USER::getUser(),'gallery', 'root', '/');
+ $current_root = OCP\Config::getUserValue(OCP\USER::getUser(),'gallery', 'root', '/');
$root = trim($root);
$root = rtrim($root, '/').'/';
$rescan = $current_root==$root?'no':'yes';
- OC_Preferences::setValue(OCP\USER::getUser(), 'gallery', 'root', $root);
- OC_Preferences::setValue(OCP\USER::getUser(), 'gallery', 'order', $order);
+ OCP\Config::setUserValue(OCP\USER::getUser(), 'gallery', 'root', $root);
+ OCP\Config::setUserValue(OCP\USER::getUser(), 'gallery', 'order', $order);
OC_JSON::success(array('rescan' => $rescan));
}
function handleGetGallery($path) {
$a = array();
- $root = OC_Preferences::getValue(OCP\USER::getUser(),'gallery', 'root', '/');
+ $root = OCP\Config::getUserValue(OCP\USER::getUser(),'gallery', 'root', '/');
$path = utf8_decode(rtrim($root.$path,'/'));
if($path == '') $path = '/';
$pathLen = strlen($path);
@@ -127,7 +127,7 @@ function handleGetGallery($path) {
function handleShare($path, $share, $recursive) {
$recursive = $recursive == 'true' ? 1 : 0;
$owner = OCP\USER::getUser();
- $root = OC_Preferences::getValue(OCP\USER::getUser(),'gallery', 'root', '/');
+ $root = OCP\Config::getUserValue(OCP\USER::getUser(),'gallery', 'root', '/');
$path = utf8_decode(rtrim($root.$path,'/'));
if($path == '') $path = '/';
$r = OC_Gallery_Album::find($owner, null, $path);