From 93aa618e803022677303cc7894b72dfe18530735 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 21 Jun 2022 16:44:37 +0200 Subject: [PATCH] Remove .php from url Probably here for legacy reasons, but it is a bit weird to call an .php endpoint that doesn't correspond to a .php file Signed-off-by: Carl Schwan (cherry picked from commit c7931086cc557211073540cf13e2af4c5afaaad3) --- apps/files/appinfo/routes.php | 2 +- apps/files/js/files.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php index a98170363e9..2aeef05558c 100644 --- a/apps/files/appinfo/routes.php +++ b/apps/files/appinfo/routes.php @@ -99,7 +99,7 @@ $application->registerRoutes( ], [ 'name' => 'ajax#getStorageStats', - 'url' => '/ajax/getstoragestats.php', + 'url' => '/ajax/getstoragestats', 'verb' => 'GET', ], [ diff --git a/apps/files/js/files.js b/apps/files/js/files.js index ae247584682..6aa871d99c0 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -25,7 +25,7 @@ state.call.abort(); } state.dir = currentDir; - state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php') + '?dir=' + encodeURIComponent(currentDir),function(response) { + state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats') + '?dir=' + encodeURIComponent(currentDir),function(response) { state.dir = null; state.call = null; Files.updateMaxUploadFilesize(response); @@ -37,7 +37,7 @@ }, _updateStorageQuotas: function() { var state = Files.updateStorageQuotas; - state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) { + state.call = $.getJSON(OC.filePath('files','ajax','getstoragestats'),function(response) { Files.updateQuota(response); }); }, -- 2.39.5