From 8be9b04981c4f0bdf0a2b8d424f55c797ad90a32 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 27 Jul 2022 10:23:44 +0200 Subject: Remove legacy #dir element in files list Removed legacy "#dir" input element in the DOM. Apps should use OCA.Files.App.currentFileList or OCA.Sharing.PublicApp.fileList and call getCurrentDirectory() to retrieve the current directory and changeDirectory() to change it. Signed-off-by: Vincent Petry --- apps/files_sharing/js/public.js | 3 ++- apps/files_sharing/templates/list.php | 2 -- apps/files_sharing/templates/public.php | 2 -- apps/files_sharing/tests/js/publicAppSpec.js | 5 ++++- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index c08d72d6e05..91883138845 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -45,7 +45,8 @@ OCA.Sharing.PublicApp = { OCA.Files.fileActions = fileActions; this._initialized = true; - this.initialDir = $('#dir').val(); + var urlParams = OC.Util.History.parseUrlQuery(); + this.initialDir = urlParams.path || '/'; var token = $('#sharingToken').val(); var hideDownload = $('#hideDownload').val(); diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php index 023726c6833..066736013b9 100644 --- a/apps/files_sharing/templates/list.php +++ b/apps/files_sharing/templates/list.php @@ -2,8 +2,6 @@ - -