summaryrefslogtreecommitdiffstats
path: root/apps/gallery/ajax
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-01 18:50:31 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-01 18:50:31 +0200
commit70cea18cce0fcdb4d8118ff2d7abccc922417a6a (patch)
tree7f8c476cb75b38fea3ed4ad555f00885f6da2670 /apps/gallery/ajax
parentdc7cdda5ccc7d40bf9865e1af5a7846782ec700b (diff)
downloadnextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.tar.gz
nextcloud-server-70cea18cce0fcdb4d8118ff2d7abccc922417a6a.zip
ported getUser
Diffstat (limited to 'apps/gallery/ajax')
-rwxr-xr-x[-rw-r--r--]apps/gallery/ajax/createAlbum.php2
-rwxr-xr-x[-rw-r--r--]apps/gallery/ajax/galleryOp.php22
2 files changed, 12 insertions, 12 deletions
diff --git a/apps/gallery/ajax/createAlbum.php b/apps/gallery/ajax/createAlbum.php
index ca02c3ae209..eaf5c296de9 100644..100755
--- a/apps/gallery/ajax/createAlbum.php
+++ b/apps/gallery/ajax/createAlbum.php
@@ -25,7 +25,7 @@
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
-OC_Gallery_Album::create(OC_User::getUser(), $_GET['album_name']);
+OC_Gallery_Album::create(OCP\USER::getUser(), $_GET['album_name']);
OC_JSON::success(array('name' => $_GET['album_name']));
diff --git a/apps/gallery/ajax/galleryOp.php b/apps/gallery/ajax/galleryOp.php
index 98cf71ec14f..aaf4a7d8658 100644..100755
--- a/apps/gallery/ajax/galleryOp.php
+++ b/apps/gallery/ajax/galleryOp.php
@@ -28,15 +28,15 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('gallery');
function handleRename($oldname, $newname) {
- OC_Gallery_Album::rename($oldname, $newname, OC_User::getUser());
+ OC_Gallery_Album::rename($oldname, $newname, OCP\USER::getUser());
OC_Gallery_Album::changeThumbnailPath($oldname, $newname);
}
function handleRemove($name) {
- $album_id = OC_Gallery_Album::find(OC_User::getUser(), $name);
+ $album_id = OC_Gallery_Album::find(OCP\USER::getUser(), $name);
$album_id = $album_id->fetchRow();
$album_id = $album_id['album_id'];
- OC_Gallery_Album::remove(OC_User::getUser(), $name);
+ OC_Gallery_Album::remove(OCP\USER::getUser(), $name);
OC_Gallery_Photo::removeByAlbumId($album_id);
}
@@ -74,25 +74,25 @@ function handleStoreSettings($root, $order) {
return;
}
- $current_root = OC_Preferences::getValue(OC_User::getUser(),'gallery', 'root', '/');
+ $current_root = OC_Preferences::getValue(OCP\USER::getUser(),'gallery', 'root', '/');
$root = trim($root);
$root = rtrim($root, '/').'/';
$rescan = $current_root==$root?'no':'yes';
- OC_Preferences::setValue(OC_User::getUser(), 'gallery', 'root', $root);
- OC_Preferences::setValue(OC_User::getUser(), 'gallery', 'order', $order);
+ OC_Preferences::setValue(OCP\USER::getUser(), 'gallery', 'root', $root);
+ OC_Preferences::setValue(OCP\USER::getUser(), 'gallery', 'order', $order);
OC_JSON::success(array('rescan' => $rescan));
}
function handleGetGallery($path) {
$a = array();
- $root = OC_Preferences::getValue(OC_User::getUser(),'gallery', 'root', '/');
+ $root = OC_Preferences::getValue(OCP\USER::getUser(),'gallery', 'root', '/');
$path = utf8_decode(rtrim($root.$path,'/'));
if($path == '') $path = '/';
$pathLen = strlen($path);
- $result = OC_Gallery_Album::find(OC_User::getUser(), null, $path);
+ $result = OC_Gallery_Album::find(OCP\USER::getUser(), null, $path);
$album_details = $result->fetchRow();
- $result = OC_Gallery_Album::find(OC_User::getUser(), null, null, $path);
+ $result = OC_Gallery_Album::find(OCP\USER::getUser(), null, null, $path);
while ($r = $result->fetchRow()) {
$album_name = $r['album_name'];
@@ -126,8 +126,8 @@ function handleGetGallery($path) {
function handleShare($path, $share, $recursive) {
$recursive = $recursive == 'true' ? 1 : 0;
- $owner = OC_User::getUser();
- $root = OC_Preferences::getValue(OC_User::getUser(),'gallery', 'root', '/');
+ $owner = OCP\USER::getUser();
+ $root = OC_Preferences::getValue(OCP\USER::getUser(),'gallery', 'root', '/');
$path = utf8_decode(rtrim($root.$path,'/'));
if($path == '') $path = '/';
$r = OC_Gallery_Album::find($owner, null, $path);