PasteCSV fix + code cleanup

This commit is contained in:
jokob-sk
2024-07-18 17:53:48 +10:00
parent 4a3598e840
commit db621a110e
11 changed files with 11 additions and 1397 deletions

View File

@@ -464,20 +464,19 @@ function ExportCSV() {
//------------------------------------------------------------------------------
function ImportCSV() {
global $db;
$file = '../../../config/devices.csv';
$data = "";
$skipped = "";
$error = "";
// check if content passed in query string
if(isset ($_REQUEST['content']) && !empty ($_REQUEST['content']))
if(isset ($_POST['content']) && !empty ($_POST['content']))
{
// Decode the Base64 string
$data = base64_decode($_REQUEST['content']);
$data = base64_decode($_POST['content']);
} else if (file_exists($file)) { // try to get the data form the file
global $db;
$skipped = "";
$error = "";
// Read the CSV file
$data = file_get_contents($file);

0
front/php/templates/language/fr_fr.json Normal file → Executable file
View File