diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php
index ac1d762..86834dc 100644
--- a/metadata/dbms/records.php
+++ b/metadata/dbms/records.php
@@ -152,36 +152,6 @@
}
}
- //Перевод для строки в которой встречаются подстроки вида: trt('')
- function parseGT($text)
- {
- $result='';
- $pLen=4; //Длина преамбулы trt(
- $cut=0;
- $from = 0; // Позиция поиска для итерации
- while (true)
- {
- $pos1 = strpos($text, 'trt(', $from);
- if($pos1 !== false)
- {
- $from = $pos1+$pLen+1;
- $pos2 = false;
- if($text[$pos1+$pLen] == '"') $pos2 = strpos($text, '")', $from);
- if($text[$pos1+$pLen] == '\'') $pos2 = strpos($text, '\')', $from);
- if($pos2 !== false)
- {
- $result.=substr($text, $cut, $pos1 - $cut );
- //$result.=__(substr($text, $pos1+3, $pos2 - $pos1 - 3 ));
- $toTranslate=substr($text, $pos1+$pLen+1, $pos2 - $pos1 - $pLen-1 );
- $result.=trt($toTranslate);
- $cut=$pos2+2;
- $from = $pos2 + $pLen;
- }
- }else break;
- }
- $result.=substr($text, $cut); //Копируем остатки
- return $result;
- }
function special_handler($exception)
{
@@ -273,7 +243,7 @@
$resX = $db->query($sql);
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -361,7 +331,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -482,7 +452,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -606,7 +576,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -661,7 +631,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -828,7 +798,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -872,7 +842,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -944,7 +914,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if(!$xmls){
sendError("XML node \"".$typename."\" not find!");
@@ -1141,7 +1111,7 @@
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
@@ -1393,12 +1363,12 @@
$field = $_REQUEST['f']; //Название поля с двоичными данными
$name = $_REQUEST['n']; //поле с названием файла
$idval = $_REQUEST['i']; //Идентификатор поля в базе
-
+
$xmls='';
$resX = $db->query('select xml from '.$Schema.'_metadata where del=false and name=\''.$typename.'\';');
while ($rowX = $resX->fetch(PDO::FETCH_ASSOC))// $row - ассоциативный массив значений, ключи - названия столбцов
{
- $xmls=''.parseGT($rowX['xml']).'';
+ $xmls=''.trts($rowX['xml']).'';
}
if($xmls=='')
{
diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js
index 2e5a20b..4662690 100644
--- a/metadata/dbms/tools.js
+++ b/metadata/dbms/tools.js
@@ -1611,10 +1611,10 @@ function isInt(value)
function isFloat(value)
{
let num="-1234567890.,"
- for (i=0;i