diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php index 7ba1e5c..d2f808c 100644 --- a/metadata/dbms/records.php +++ b/metadata/dbms/records.php @@ -1101,7 +1101,7 @@ }else if ($fn==8)//Получить отчёт как Excel.xls файл (почти тоже самое что и функция 4) { - $dir='./temp/'; + $dir='./temp/'; //$tmpfname = tempnam($dir, ""); // отправка файла в отдельном файле download.php для совместимости с java версией session_write_close(); //Разблокируем сессионный файл так как запросы могут быть достаточно долгими @@ -1307,7 +1307,6 @@ header('Content-type: text/xml'); echo ''; - //deleteTempFiles($dir); }else { sendError(1,trt('Not found the requested node:').' "'.$typename.'"!'); diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index e87d4d0..2b00a96 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -1462,10 +1462,11 @@ class SRec } } - //Get column number by name + //Get column number by name, if result=-1 then not find else find getColN(name){ - let i=-1; + let result=-1; //determine the sequence number of the column + let pos=0; let node=findNodeOnPath(this.nodeMetadata,"type/objects-list"); let nodeCol = node.firstChild; while (nodeCol != null) @@ -1473,13 +1474,14 @@ class SRec if(nodeCol.nodeName=="column") { if(nodeCol.getAttribute("n")==name){ + result=pos; break; } - i++; + pos++; } nodeCol = nodeCol.nextSibling; } - return i; + return result; } //find the value in the result set by the id of the record and the name of the column diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index 99b6411..4ebbfa6 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -622,7 +622,7 @@ function getCookie(c_name) //expires - Сколько дней хранить куки //path - Путь куда разрешено пересылать куки (по умолчанию текущий) -function setCookie (name, value, expires, path, domain, secure) +function setCookie(name, value, expires, path, domain, secure) { let exDate=new Date(); exDate.setDate(exDate.getDate() + expires); @@ -632,8 +632,8 @@ function setCookie (name, value, expires, path, domain, secure) ((expires) ? "; expires=" + expires : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + - ((secure) ? "; secure" : ""); - + ((secure) ? "; secure" : "") + + "; SameSite=Strict"; document.cookie = str; }