diff options
Diffstat (limited to 'apps/gallery/ajax/galleryOp.php')
-rwxr-xr-x[-rw-r--r--] | apps/gallery/ajax/galleryOp.php | 22 |
1 files changed, 11 insertions, 11 deletions
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); |