From dceddb57f8c08fc104fd6407948ca3c0a8a319db Mon Sep 17 00:00:00 2001 From: Mathias Arzberger Date: Tue, 29 Aug 2017 18:01:52 +0200 Subject: [PATCH] Update ModuleOmSearch.php add support for php7 --- modules/ModuleOmSearch.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/ModuleOmSearch.php b/modules/ModuleOmSearch.php index 93c9ab1..c655e5b 100644 --- a/modules/ModuleOmSearch.php +++ b/modules/ModuleOmSearch.php @@ -266,9 +266,7 @@ protected function compile() // Shorten context and highlight keywords if (!empty($arrContext)) { - $this->import('String'); - - $objTemplate->context = trim($this->String->substrHtml(implode('…', $arrContext), $this->totalLength)); + $objTemplate->context = trim(\StringUtil::substrHtml(implode('…', $arrContext), $this->totalLength)); $objTemplate->context = preg_replace('/(\PL)(' . implode('|', $arrMatches) . ')(\PL)/ui', '$1$2$3', $objTemplate->context); $objTemplate->hasContext = true; @@ -336,4 +334,4 @@ public function saveKeywords($strKeywords, $intResults, $intRelevance) } -?> \ No newline at end of file +?>