From bcd2fd613ec7a29b05ab90dc4739e974c2060811 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 8 May 2025 18:19:28 +0200 Subject: Change non-modifying AJAX requests from POST to GET --- modules-available/statistics/page.inc.php | 2 +- modules-available/statistics/templates/js-pciquery.html | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'modules-available/statistics') diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index f07dca56..3a938ff9 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -286,7 +286,7 @@ class Page_Statistics extends Page } if ($action === 'json-lookup') { $reply = []; - foreach (Request::post('list', [], 'array') as $item) { + foreach (Request::any('list', [], 'array') as $item) { $name = PciId::getPciId(PciId::AUTO, $item, true); if ($name === false) { $name = '?????'; diff --git a/modules-available/statistics/templates/js-pciquery.html b/modules-available/statistics/templates/js-pciquery.html index 5d4df867..55683161 100644 --- a/modules-available/statistics/templates/js-pciquery.html +++ b/modules-available/statistics/templates/js-pciquery.html @@ -4,8 +4,7 @@ var doQuery = function() { if (missing && missing.length > 0) { $.ajax({ - url: '?do=statistics', dataType: "json", method: "POST", data: { - token: TOKEN, + url: '?do=statistics', dataType: "json", method: "GET", data: { action: 'json-lookup', list: missing.splice(0, 10) // Query 10 at a time max } @@ -21,4 +20,4 @@ } doQuery(); }); - \ No newline at end of file + -- cgit v1.2.3-55-g7522