mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
fix gallery sharing when root is not /
This commit is contained in:
parent
45a3d84748
commit
f74d11c0c3
1 changed files with 3 additions and 0 deletions
|
|
@ -127,6 +127,9 @@ 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', '/');
|
||||
$path = utf8_decode(rtrim($root.$path,'/'));
|
||||
if($path == '') $path = '/';
|
||||
$r = OC_Gallery_Album::find($owner, null, $path);
|
||||
if ($row = $r->fetchRow()) {
|
||||
$albumId = $row['album_id'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue