summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/js/js.js1
-rw-r--r--core/js/oc-dialogs.js1
-rw-r--r--lib/private/Preview/GeneratorHelper.php3
3 files changed, 4 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 41041a42885..714529fe5d1 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1579,6 +1579,7 @@ OC.PasswordConfirmation = {
}
},
error: function() {
+ OC.PasswordConfirmation.requirePasswordConfirmation(self.callback);
OC.Notification.showTemporary(t('core', 'Failed to authenticate, try again'));
}
});
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index fc0734e9df4..3b5c1ae7199 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -149,6 +149,7 @@ var OCdialogs = {
modal : modal,
buttons : buttonlist
});
+ input.focus();
OCdialogs.dialogsCounter++;
});
},
diff --git a/lib/private/Preview/GeneratorHelper.php b/lib/private/Preview/GeneratorHelper.php
index 282c46a2a5d..6535fde058b 100644
--- a/lib/private/Preview/GeneratorHelper.php
+++ b/lib/private/Preview/GeneratorHelper.php
@@ -60,7 +60,8 @@ class GeneratorHelper {
* This is required to create the old view and path
*/
private function getViewAndPath(File $file) {
- $owner = $file->getOwner()->getUID();
+ $absPath = ltrim($file->getPath(), '/');
+ $owner = explode('/', $absPath)[0];
$userFolder = $this->rootFolder->getUserFolder($owner)->getParent();