From 3314480b2a76e4f69a890ed7e4105455ef98a764 Mon Sep 17 00:00:00 2001 From: "M@dD3n" Date: Thu, 4 Aug 2022 17:14:41 +0300 Subject: [PATCH] Fixes --- admin/navigation.php | 2 +- admin/request.php | 2 +- admin/templates/blocks/form.tpl | 2 +- admin/templates/navigation/template.tpl | 2 +- admin/templates/request/form.tpl | 4 ++-- admin/templates/sysblocks/form.tpl | 2 +- class/class.blocks.php | 8 +++++--- lib/debug/debug.tpl | 8 ++++++++ 8 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 lib/debug/debug.tpl diff --git a/admin/navigation.php b/admin/navigation.php index 83d77f7..28ce69a 100644 --- a/admin/navigation.php +++ b/admin/navigation.php @@ -59,7 +59,7 @@ { require(BASE_DIR . '/class/class.user.php'); $AVE_User = new AVE_User; - $AVE_Navigation->navigationEdit((int)$_REQUEST['navigation_id']); + $AVE_Navigation->navigationEdit($_REQUEST['navigation_id']); } break; diff --git a/admin/request.php b/admin/request.php index 17f3c71..df16c5f 100644 --- a/admin/request.php +++ b/admin/request.php @@ -43,7 +43,7 @@ if(check_permission_acp('request_edit')) { $AVE_Rubric->rubricTemplateShow(0, 1); - $AVE_Request->requestEdit((int)$_REQUEST['Id']); + $AVE_Request->requestEdit($_REQUEST['Id']); } break; diff --git a/admin/templates/blocks/form.tpl b/admin/templates/blocks/form.tpl index c30e9dd..7f88d5e 100644 --- a/admin/templates/blocks/form.tpl +++ b/admin/templates/blocks/form.tpl @@ -87,7 +87,7 @@
{if $smarty.request.id != ''} - + {else} diff --git a/admin/templates/navigation/template.tpl b/admin/templates/navigation/template.tpl index eab642d..3ac2902 100644 --- a/admin/templates/navigation/template.tpl +++ b/admin/templates/navigation/template.tpl @@ -43,7 +43,7 @@ {#NAVI_RETURN_TO_LIST#}
diff --git a/admin/templates/request/form.tpl b/admin/templates/request/form.tpl index 77eeb91..29a1d1a 100644 --- a/admin/templates/request/form.tpl +++ b/admin/templates/request/form.tpl @@ -13,7 +13,7 @@ function changeRub(select) {ldelim} {if $smarty.request.action=='new'} location.href='index.php?do=request&action=new&rubric_id=' + select.options[select.selectedIndex].value + '{if $smarty.request.request_title_new!=''}&request_title_new={$smarty.request.request_title_new|escape|stripslashes}{/if}'; {else} - location.href='index.php?do=request&action=edit&Id={$smarty.request.Id|escape}&rubric_id=' + select.options[select.selectedIndex].value; + location.href='index.php?do=request&action=edit&Id={$rid}&rubric_id=' + select.options[select.selectedIndex].value; {/if} {rdelim} @@ -29,7 +29,7 @@ function changeRub(select) {ldelim}
{#REQUEST_EDIT2#}
diff --git a/admin/templates/sysblocks/form.tpl b/admin/templates/sysblocks/form.tpl index 46c8d94..34a33b1 100644 --- a/admin/templates/sysblocks/form.tpl +++ b/admin/templates/sysblocks/form.tpl @@ -228,7 +228,7 @@
{if $smarty.request.id != ''} - + {else} diff --git a/class/class.blocks.php b/class/class.blocks.php index 181eaca..8b84248 100755 --- a/class/class.blocks.php +++ b/class/class.blocks.php @@ -70,7 +70,7 @@ * * @param int $block_id идентификатор системного блока */ - function blockSave($block_id = null) + function blockSave ($block_id = null) { global $AVE_DB, $AVE_Template; @@ -156,7 +156,7 @@ * * @param int $block_id идентификатор системного блока */ - function blockEdit($block_id) + function blockEdit ($block_id) { global $AVE_DB, $AVE_Template; @@ -167,9 +167,11 @@ " . PREFIX . "_blocks WHERE id = '" . $block_id . "' + OR + block_alias = '" . $block_id . "' ")->FetchAssocArray(); - $AVE_Template->assign('sid', $block_id); + $AVE_Template->assign('sid', $row['id']); $oCKeditor = new CKeditor(); $oCKeditor->returnOutput = true; diff --git a/lib/debug/debug.tpl b/lib/debug/debug.tpl new file mode 100644 index 0000000..d656788 --- /dev/null +++ b/lib/debug/debug.tpl @@ -0,0 +1,8 @@ +{foreach from=$edit item=group key=title} + {$title} + +{/foreach} \ No newline at end of file