Skip to content

Commit 661f608

Browse files
authored
Merge pull request #33116 from nextcloud/backport/33113/stable23
[stable23] Remove .php from ajax url
2 parents 14af5f3 + e6ee00c commit 661f608

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

apps/files/appinfo/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
],
100100
[
101101
'name' => 'ajax#getStorageStats',
102-
'url' => '/ajax/getstoragestats.php',
102+
'url' => '/ajax/getstoragestats',
103103
'verb' => 'GET',
104104
],
105105
[

apps/files/js/files.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
state.call.abort();
2626
}
2727
state.dir = currentDir;
28-
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php') + '?dir=' + encodeURIComponent(currentDir),function(response) {
28+
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats?dir={dir}', {
29+
dir: currentDir,
30+
}), function(response) {
2931
state.dir = null;
3032
state.call = null;
3133
Files.updateMaxUploadFilesize(response);
@@ -37,7 +39,7 @@
3739
},
3840
_updateStorageQuotas: function() {
3941
var state = Files.updateStorageQuotas;
40-
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) {
42+
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats'), function(response) {
4143
Files.updateQuota(response);
4244
});
4345
},

0 commit comments

Comments
 (0)