Skip to content

Commit

Permalink
Merge pull request #33116 from nextcloud/backport/33113/stable23
Browse files Browse the repository at this point in the history
[stable23] Remove .php from ajax url
  • Loading branch information
CarlSchwan authored Jul 5, 2022
2 parents 14af5f3 + e6ee00c commit 661f608
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/files/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
],
[
'name' => 'ajax#getStorageStats',
'url' => '/ajax/getstoragestats.php',
'url' => '/ajax/getstoragestats',
'verb' => 'GET',
],
[
Expand Down
6 changes: 4 additions & 2 deletions apps/files/js/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
state.call.abort();
}
state.dir = currentDir;
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php') + '?dir=' + encodeURIComponent(currentDir),function(response) {
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats?dir={dir}', {
dir: currentDir,
}), function(response) {
state.dir = null;
state.call = null;
Files.updateMaxUploadFilesize(response);
Expand All @@ -37,7 +39,7 @@
},
_updateStorageQuotas: function() {
var state = Files.updateStorageQuotas;
state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) {
state.call = $.getJSON(OC.generateUrl('apps/files/ajax/getstoragestats'), function(response) {
Files.updateQuota(response);
});
},
Expand Down

0 comments on commit 661f608

Please sign in to comment.