From 9a616999d3bec7eb8e294f03f20616878f58f041 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 6 Jul 2021 07:34:26 +0200 Subject: [PATCH] new parameter $wrap can be passed to html_link() --- inc/inc.ClassViewCommon.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index ea9dc78d4..1f8c5f764 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -307,7 +307,7 @@ class SeedDMS_View_Common { * @param boolean $hsc set to false if htmlspecialchars() shall not be called * @return string link */ - protected function html_link($view='', $urlparams=array(), $linkparams=array(), $link, $hsc=true, $nocheck=false) { /* {{{ */ + protected function html_link($view='', $urlparams=array(), $linkparams=array(), $link, $hsc=true, $nocheck=false, $wrap=array()) { /* {{{ */ if(!$nocheck) if(!$this->check_access($view)) return ''; @@ -317,6 +317,8 @@ class SeedDMS_View_Common { foreach($linkparams as $k=>$v) $tag .= " ".$k."=\"".$v."\""; $tag .= ">".($hsc ? htmlspecialchars($link) : $link).""; + if(is_array($wrap) && count($wrap) == 2) + return $wrap[0].$tag.$wrap[1]; return $tag; } /* }}} */