mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
handling special chars in dirnames
This commit is contained in:
parent
5a106d1036
commit
f1672d7d10
4 changed files with 5 additions and 6 deletions
|
|
@ -104,7 +104,7 @@ if ($_GET['operation']) {
|
|||
OC_JSON::success();
|
||||
break;
|
||||
case 'get_covers':
|
||||
handleGetThumbnails($_GET['albumname']);
|
||||
handleGetThumbnails(urldecode($_GET['albumname']));
|
||||
break;
|
||||
case 'scan':
|
||||
handleGalleryScanning();
|
||||
|
|
@ -113,7 +113,7 @@ if ($_GET['operation']) {
|
|||
handleFilescan($_GET['cleanup']);
|
||||
break;
|
||||
case 'partial_create':
|
||||
handlePartialCreate($_GET['path']);
|
||||
handlePartialCreate(urldecode($_GET['path']));
|
||||
break;
|
||||
case 'store_settings':
|
||||
handleStoreSettings($_GET['root'], $_GET['order']);
|
||||
|
|
|
|||
|
|
@ -54,12 +54,12 @@ Albums={
|
|||
event.preventDefault();
|
||||
galleryRemove(event.data.name);
|
||||
});
|
||||
$("a.view", local).attr('href','?view='+a.name);
|
||||
$("a.view", local).attr('href','?view='+escape(a.name));
|
||||
$('h1',local).text(a.name);
|
||||
$(".gallery_album_cover", local).attr('title',a.name);
|
||||
$(".gallery_album_cover", local).css('background-repeat', 'no-repeat');
|
||||
$(".gallery_album_cover", local).css('background-position', '0');
|
||||
$(".gallery_album_cover", local).css('background-image','url("ajax/galleryOp.php?operation=get_covers&albumname='+a.name+'")');
|
||||
$(".gallery_album_cover", local).css('background-image','url("ajax/galleryOp.php?operation=get_covers&albumname='+escape(a.name)+'")');
|
||||
$(".gallery_album_cover", local).mousemove(function(e) {
|
||||
|
||||
var albumMetadata = Albums.find(this.title);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ class OC_Gallery_Album {
|
|||
public static function removeByPath($path, $owner) {
|
||||
$album = self::find($owner, null, $path);
|
||||
$album = $album->fetchRow();
|
||||
error_log($path . '--' . $album['album_name']);
|
||||
self::remove($owner, $album['album_name']);
|
||||
OC_Gallery_Photo::removeByAlbumId($album['album_id']);
|
||||
// find and remove any gallery which might be stored lower in dir hierarchy
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ class OC_Gallery_Scanner {
|
|||
if (self::isPhoto($path.$file)) $addpath = TRUE;
|
||||
}
|
||||
|
||||
if ($addpath) $ret[] = $path;
|
||||
if ($addpath) $ret[] = urlencode($path);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue