* @param string target the target frame for this link
*/
function makeInternalLink($path, $text, $target='') {
- global $base_uri;
+ global $base_uri, $oTemplate;
// sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION);
- if ($target != '') {
- $target = " target=\"$target\"";
- }
// This is an inefficient hook and is only used by
// one plugin that still needs to patch this code,
//
//do_hook('internal_link', $text);
- return '<a href="'.$base_uri.$path.'"'.$target.'>'.$text.'</a>';
+ $oTemplate->assign('uri', $base_uri . $path);
+ $oTemplate->assign('text', $text);
+ $oTemplate->assign('target', $target);
+
+ // blank the onclick because the template object might
+ // already contain an onclick value due to having been
+ // used to show a compose link (when comp_in_new is turned on)
+ //
+ $oTemplate->assign('onclick', '');
+
+ return $oTemplate->fetch('hyperlink.tpl');
}
/**