-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
With PR #2429 we changed some API responses of file_manager to JSON as for example:
$reply['status'] = json_encode([
'action' => $action,
'text' => [htmlspecialchars(mb_strimhalf(exec("tail -1 $status"), 70, '...'), ENT_QUOTES, 'UTF-8')]
]);
And we added the processing part to BrowseButton.page as follows:
function dfm_showProgress(data) {
if (!data) return 0;
// Try to parse as JSON first
try {
let parsed = JSON.parse(data);
// Universal JSON format: {action: int, text: [text0, text1]}
// text[0] = file/main text, text[1] = progress info (optional)
if (parsed.action !== undefined && Array.isArray(parsed.text)) {
...
We should complete this change and return JSON only. Steps:
- obtain all actions still returning raw HTML in
file_manager - change their response to JSON
- check if
dfm_showProgress()needs additional code to handle the response (e.g. add switch case per action id) - remove legacy code from
dfm_showProgress()which handles raw HTML
Metadata
Metadata
Assignees
Labels
No labels