From c1a18f55ddd78bcbc0128126a2725a033d746880 Mon Sep 17 00:00:00 2001 From: "chencongzhi520@gmail.com" Date: Sat, 30 Jun 2012 06:49:16 +0000 Subject: [PATCH] * Change a tag function adjust whether need newline. --- lib/front/front.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/front/front.class.php b/lib/front/front.class.php index 95dacca716..2882cc06a4 100644 --- a/lib/front/front.class.php +++ b/lib/front/front.class.php @@ -77,13 +77,15 @@ class html * @param string $title the link title. * @param string $target the target window * @param string $misc other params. + * @param boolean $newline * @return string */ - static public function a($href = '', $title = '', $target = "_self", $misc = '') + static public function a($href = '', $title = '', $target = "_self", $misc = '', $newline = true) { if(empty($title)) $title = $href; - if($target == '_self') return "$title\n"; - return "$title\n"; + $newline = $newline ? "\n" : ''; + if($target == '_self') return "$title$newline"; + return "$title$newline"; } /**