mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-11-29 19:03:34 +00:00
new parameter $wrap can be passed to html_link()
This commit is contained in:
parent
00041b30bd
commit
9a616999d3
|
|
@ -307,7 +307,7 @@ class SeedDMS_View_Common {
|
||||||
* @param boolean $hsc set to false if htmlspecialchars() shall not be called
|
* @param boolean $hsc set to false if htmlspecialchars() shall not be called
|
||||||
* @return string link
|
* @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(!$nocheck)
|
||||||
if(!$this->check_access($view))
|
if(!$this->check_access($view))
|
||||||
return '';
|
return '';
|
||||||
|
|
@ -317,6 +317,8 @@ class SeedDMS_View_Common {
|
||||||
foreach($linkparams as $k=>$v)
|
foreach($linkparams as $k=>$v)
|
||||||
$tag .= " ".$k."=\"".$v."\"";
|
$tag .= " ".$k."=\"".$v."\"";
|
||||||
$tag .= ">".($hsc ? htmlspecialchars($link) : $link)."</a>";
|
$tag .= ">".($hsc ? htmlspecialchars($link) : $link)."</a>";
|
||||||
|
if(is_array($wrap) && count($wrap) == 2)
|
||||||
|
return $wrap[0].$tag.$wrap[1];
|
||||||
return $tag;
|
return $tag;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user