new parameter $wrap can be passed to html_link()

This commit is contained in:
Uwe Steinmann 2021-07-06 07:34:26 +02:00
parent 00041b30bd
commit 9a616999d3

View File

@ -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)."</a>";
if(is_array($wrap) && count($wrap) == 2)
return $wrap[0].$tag.$wrap[1];
return $tag;
} /* }}} */