fix gallery sharing when root is not /
This commit is contained in:
parent
45a3d84748
commit
f74d11c0c3
|
@ -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 New Issue