diff --git a/phpgwapi/inc/class.nextmatchs.inc.php b/phpgwapi/inc/class.nextmatchs.inc.php index cb9a1b3480..d9820c1dc6 100644 --- a/phpgwapi/inc/class.nextmatchs.inc.php +++ b/phpgwapi/inc/class.nextmatchs.inc.php @@ -440,12 +440,11 @@ @param $text ? @param $extra default '' */ - function show_sort_order($sort,$var,$order,$program,$text,$extra='') + function show_sort_order($sort,$var,$order,$program,$text,$extra='',$build_a_href=True) { global $phpgw, $filter, $qfield, $start, $query; $_query = stripslashes($query); - if (($order == $var) && ($sort == 'ASC')) { $sort = 'DESC'; @@ -459,8 +458,16 @@ $sort = 'ASC'; } - return '' . $text . ''; + if ($build_a_href) + { + return '' . $text . ''; + } + else + { + return $phpgw->link($program,"order=$var&sort=$sort&filter=$filter&" + . "qfield=$qfield&start=$start&query=" . urlencode($_query) . $extra); + } } function show_sort_order_imap($sort,$order,$program,$text,$extra='')