From 09af510530ded749a2c0594b0d06cb0d53629337 Mon Sep 17 00:00:00 2001 From: Repellent Date: Sat, 18 Jun 2016 20:59:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=BE=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=201.2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module.php | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/module.php b/module.php index b5ff6f0..e116927 100644 --- a/module.php +++ b/module.php @@ -1,3 +1,9 @@ + + [mod_quickfinder:XXX] в нужном месте вашего шаблона, где XXX - идентификаторы меню навигации указанные через запятую.'; $modul['ModuleAutor'] = 'Arcanum, UPD Repellent '; $modul['ModuleCopyright'] = '© 2007-2016 AVE.CMS'; @@ -131,6 +137,7 @@ function mod_quickfinder($navi_ids = '') printQuickfinder($nav_items, $quickfinder); echo $quickfinder . ''; } + $sql->Close(); } function printQuickfinder(&$nav_items, &$quickfinder = '', $parent = '0') @@ -149,6 +156,9 @@ function printQuickfinder(&$nav_items, &$quickfinder = '', $parent = '0') 'index.php?id=' . $row['document_id'] = rewrite_link('index.php?id=' . $row['document_id']); + + if($row['alias']=='/') { + if (!start_with('javascript:', 'index.php?id=' . $row['document_id'])) { if ($row['target'] == '_blank') @@ -160,14 +170,30 @@ function printQuickfinder(&$nav_items, &$quickfinder = '', $parent = '0') $row['alias'] = "window.location.href = '" . $row['alias'] . "'"; } } + } else { + + + if (!start_with('javascript:', 'index.php?id=' . $row['document_id'])) + { + if ($row['target'] == '_blank') + { + $row['alias'] = "javascript:window.open('". ABS_PATH. $row['alias'] . "', '', '')"; + } + else + { + $row['alias'] = "window.location.href = '". ABS_PATH. $row['alias'] . "'"; + } + } + + } $quickfinder .= ''; + if (isset($nav_items[$row['navigation_item_id']])) { printQuickfinder($nav_items, $quickfinder, $row['navigation_item_id']); } } } - ?> \ No newline at end of file