summaryrefslogtreecommitdiffstats
path: root/apps/gallery
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
parentff66600bc060dd2713b88b4af88e5a0a291710e0 (diff)
downloadnextcloud-server-82a61e2e1a0f392759b69f7336213ff70a7bc877.tar.gz
nextcloud-server-82a61e2e1a0f392759b69f7336213ff70a7bc877.zip
port oc_preferences
Diffstat (limited to 'apps/gallery')
-rwxr-xr-xapps/gallery/ajax/galleryOp.php10
-rwxr-xr-xapps/gallery/lib/album.php2
-rwxr-xr-xapps/gallery/lib/hooks_handlers.php2
-rwxr-xr-xapps/gallery/lib/photo.php2
-rwxr-xr-xapps/gallery/lib/scanner.php2
-rwxr-xr-xapps/gallery/templates/index.php2
6 files changed, 10 insertions, 10 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);
diff --git a/apps/gallery/lib/album.php b/apps/gallery/lib/album.php
index 8775cd52e11..f58140c4999 100755
--- a/apps/gallery/lib/album.php
+++ b/apps/gallery/lib/album.php
@@ -79,7 +79,7 @@ class OC_Gallery_Album {
$sql .= ' AND parent_path = ?';
$args[] = $parent;
}
- $order = OC_Preferences::getValue($owner, 'gallery', 'order', 'ASC');
+ $order = OCP\Config::getUserValue($owner, 'gallery', 'order', 'ASC');
$sql .= ' ORDER BY album_name ' . $order;
$stmt = OC_DB::prepare($sql);
diff --git a/apps/gallery/lib/hooks_handlers.php b/apps/gallery/lib/hooks_handlers.php
index 525afc4127e..678d3fe7531 100755
--- a/apps/gallery/lib/hooks_handlers.php
+++ b/apps/gallery/lib/hooks_handlers.php
@@ -59,7 +59,7 @@ class OC_Gallery_Hooks_Handlers {
}
public static function pathInRoot($path) {
- $root = OC_Preferences::getValue(OCP\USER::getUser(), 'gallery', 'root', '/');
+ $root = OCP\Config::getUserValue(OCP\USER::getUser(), 'gallery', 'root', '/');
return substr($path, 0, strlen($path)>strlen($root)?strlen($root):strlen($path)) == $root;
}
diff --git a/apps/gallery/lib/photo.php b/apps/gallery/lib/photo.php
index 7885ce2bf56..010eb9ab91b 100755
--- a/apps/gallery/lib/photo.php
+++ b/apps/gallery/lib/photo.php
@@ -98,6 +98,6 @@ class OC_Gallery_Photo {
}
public static function getGalleryRoot() {
- return OC_Preferences::getValue(OCP\USER::getUser(), 'gallery', 'root', '');
+ return OCP\Config::getUserValue(OCP\USER::getUser(), 'gallery', 'root', '');
}
}
diff --git a/apps/gallery/lib/scanner.php b/apps/gallery/lib/scanner.php
index 11c7541a75f..7a137cb3f50 100755
--- a/apps/gallery/lib/scanner.php
+++ b/apps/gallery/lib/scanner.php
@@ -24,7 +24,7 @@
class OC_Gallery_Scanner {
public static function getGalleryRoot() {
- return OC_Preferences::getValue(OCP\USER::getUser(), 'gallery', 'root', '/');
+ return OCP\Config::getUserValue(OCP\USER::getUser(), 'gallery', 'root', '/');
}
public static function getScanningRoot() {
return OC_Filesystem::getRoot().self::getGalleryRoot();
diff --git a/apps/gallery/templates/index.php b/apps/gallery/templates/index.php
index c9a6fb15627..854e4480bcf 100755
--- a/apps/gallery/templates/index.php
+++ b/apps/gallery/templates/index.php
@@ -9,7 +9,7 @@ OCP\Util::addscript('files_imageviewer', 'jquery.fancybox-1.3.4.pack');
OCP\Util::addStyle( 'files_imageviewer', 'jquery.fancybox-1.3.4' );
$l = OC_L10N::get('gallery');
?>
-<script type="text/javascript">var gallery_scanning_root='<? echo OC_Preferences::getValue(OCP\USER::getUser(), 'gallery', 'root', '/'); ?>'; var gallery_default_order = '<? echo OC_Preferences::getValue(OCP\USER::getUser(), 'gallery', 'order', 'ASC'); ?>';</script>
+<script type="text/javascript">var gallery_scanning_root='<? echo OCP\Config::getUserValue(OCP\USER::getUser(), 'gallery', 'root', '/'); ?>'; var gallery_default_order = '<? echo OCP\Config::getUserValue(OCP\USER::getUser(), 'gallery', 'order', 'ASC'); ?>';</script>
<div id="controls">
<div id="scan">
<div id="scanprogressbar"></div>