Skip to content

Commit

Permalink
version 4.10.56.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatiana committed Aug 31, 2023
2 parents 5b9f6e2 + 85f99b0 commit 1d6ba92
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 12 deletions.
4 changes: 2 additions & 2 deletions http/html.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
type="text/css"
href="/css/libs.css?v=ead40ab">
<script src="/js/libs.js?v=665342a"></script>
<script src="/js/functions.js?v=67bc3ca"></script>
<script src="/js/functions.js?v=4718f08"></script>

<link rel="stylesheet"
type="text/css"
href="/css/main.css?v=7f3689c">
<script src="/js/main.js?v=b263331"></script>
<script src="/js/main.js?v=7870ff1"></script>

</head>
<body id="pk">
Expand Down
2 changes: 1 addition & 1 deletion http/js/functions.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion http/js/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion totum/common/Totum.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
class Totum
{
public const VERSION = '4.10.56.0';
public const VERSION = '4.10.56.1';


public const TABLE_CODE_PARAMS = ['row_format', 'table_format', 'on_duplicate', 'default_action'];
Expand Down
2 changes: 2 additions & 0 deletions totum/common/calculates/CalculateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,8 @@ protected function funcLinkToPanel($params)
$hash = $params['hash'];
} elseif ($this->Table->getTableRow()['id'] === $tableRow['id']) {
$hash = $this->Table->getTableRow()['sess_hash'];
}else{
$this->__checkNotEmptyParams($params, ['hash']);
}
if (!empty($hash)) {
$link .= '?sess_hash=' . $hash;
Expand Down
22 changes: 20 additions & 2 deletions totum/common/calculates/FuncServicesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected function generateByTemplate($params, $serviceName, $extention)

$this->__checkNotEmptyParams($params, ['template']);
$this->__checkNotArrayParams($params, ['comment']);
$this->__checkListParam($params, ['data']);
$this->__checkListParam($params, ['data', 'titles']);

if (is_array($params['template']) && key_exists(0, $params['data'])) {
if (count($params['template']) != count($params['data'])) {
Expand All @@ -234,6 +234,11 @@ protected function generateByTemplate($params, $serviceName, $extention)

$Config = $this->Table->getTotum()->getConfig();

if ($isTitles = !empty($params['titles'])) {
$isMenyTitles = is_array($params['titles'][0] ?? null);
}


$preparedData = [];
foreach ($templates as $i => $template) {
$pdf = $params['pdf'] ?? false;
Expand All @@ -242,9 +247,22 @@ protected function generateByTemplate($params, $serviceName, $extention)
'true', true => true,
default => is_array($_pdf) ? $_pdf : false
};
$titles = [];
if ($template === '*NEW*' && $isTitles) {
foreach ($isMenyTitles ? ($params['titles'][$i] ?? []) : $params['titles'] as $title) {
if (is_array($title)) {
$title = json_encode($title, true);
}
$titles[] = $title;
}
if ($titles) {
$titles = [$titles];
}
}

$preparedData[] = [
'template' => $template === '*NEW*' ? '*NEW*' : base64_encode(File::getContent($template, $Config)),
'data' => $datas[$i],
'data' => array_merge($titles, $datas[$i]),
'pdf' => $_pdf,
];
}
Expand Down
8 changes: 8 additions & 0 deletions totum/moduls/Table/AdminTableActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ public function bugFinder()
die(json_encode(['ok' => 1, 'fields' => $fields, 'tableId' => $this->Table->getTableRow()['id']], JSON_UNESCAPED_UNICODE));
}

public function delete()
{
if (!empty($this->post['force']) && $this->post['force']==='true') {
$this->Table->setDeleteForce();
}
return parent::delete();
}

public function getAllTables()
{
$tables = [];
Expand Down
Binary file modified totum/moduls/install/start.json.gz.ttm
Binary file not shown.
4 changes: 2 additions & 2 deletions totum/templates/html.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
type="text/css"
href="/css/libs.css?v=ead40ab">
<script src="/js/libs.js?v=665342a"></script>
<script src="/js/functions.js?v=67bc3ca"></script>
<script src="/js/functions.js?v=4718f08"></script>

<link rel="stylesheet"
type="text/css"
href="/css/main.css?v=7f3689c">
<script src="/js/main.js?v=b263331"></script>
<script src="/js/main.js?v=7870ff1"></script>

</head>
<body id="pk">
Expand Down
4 changes: 2 additions & 2 deletions totum/templates/page_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

<?php
if ($isCreatorView ?? null) { ?>
<script src="/js/functions.js?v=67bc3ca"></script>
<script src="/js/functions.js?v=4718f08"></script>
<?php
echo '<script>App.functions=App.functions.concat(' . $this->Config->getExtFunctionsTemplates() . ')</script>';
?>
<?php
} ?>

<script src="/js/main.js?v=b263331"></script>
<script src="/js/main.js?v=7870ff1"></script>
<script src="/js/i18n/<?= $this->Config->getLang() ?>.js?9"></script>
<script>App.lang = App.langs["<?= $this->Config->getLang() ?>"]</script>

Expand Down
2 changes: 1 addition & 1 deletion totum/templates/page_template_simple.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet"
type="text/css"
href="/css/main.css?v=7f3689c">
<script src="/js/main.js?v=b263331"></script>
<script src="/js/main.js?v=7870ff1"></script>
<script src="/js/i18n/<?= $this->Config->getLang() ?>.js?9"></script>
<script>App.lang = App.langs["<?= $this->Config->getLang() ?>"]</script>

Expand Down

0 comments on commit 1d6ba92

Please sign in to comment.