From ae102dc267e4c62566549a48e693053f22315ff5 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 16 Oct 2024 17:54:18 +0200 Subject: [PATCH] media button to deep search close #442 + fix deep search regex issues using preg_quote! --- app/class/Modelpage.php | 2 +- app/view/templates/media.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/class/Modelpage.php b/app/class/Modelpage.php index 89765203..3be120c2 100644 --- a/app/class/Modelpage.php +++ b/app/class/Modelpage.php @@ -759,7 +759,7 @@ protected function deepsearch(array $pagelist, string $regex, array $options): a } else { $case = 'i'; } - $regex = '/' . $regex . '/' . $case; + $regex = '/' . preg_quote($regex, '/') . '/'; $pageselected = []; foreach ($pagelist as $page) { $count = 0; diff --git a/app/view/templates/media.php b/app/view/templates/media.php index fd8db432..55a230a8 100644 --- a/app/view/templates/media.php +++ b/app/view/templates/media.php @@ -153,6 +153,7 @@ user perms + s code @@ -204,6 +205,14 @@ date('hrdi') ?> uid('name') ?> permissions() ?> + + + + + e($media->getcode()) ?>