From 4ab83c587d6612708fb9ffb05bc0b63d517fa58d Mon Sep 17 00:00:00 2001 From: valentina Date: Fri, 23 May 2025 09:55:23 +0200 Subject: [PATCH] fix: navigazione record per moduli custom --- editor.php | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/editor.php b/editor.php index 3281d9b2b..09d53fc2b 100755 --- a/editor.php +++ b/editor.php @@ -186,25 +186,27 @@ if (empty($record) || !$has_access) { $posizioni = $module_query ? $dbo->fetchArray($module_query) : 0; $key = $posizioni ? array_search($id_record, array_column($posizioni, 'id')) : 0; - // Precedente - $prev = $posizioni[$key - 1]['id']; + if (is_array($posizioni)) { + // Precedente + $prev = $posizioni[$key - 1]['id']; - // Successivo - $next = $posizioni[$key + 1]['id']; + // Successivo + $next = $posizioni[$key + 1]['id']; - echo ''; + echo ''; - echo ' -
- - - - '.($key + 1).'/'.count($posizioni).' - - - -
-
'; + echo ' +
+ + + + '.($key + 1).'/'.count($posizioni).' + + + +
+
'; + } echo '
';