Added feature to return only the link(), not the <a href> back

This commit is contained in:
jengo 2001-07-11 22:43:10 +00:00
parent 2ae98b0577
commit 5fe11da983

View File

@ -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 '<a href="' . $phpgw->link($program,"order=$var&sort=$sort&filter=$filter&"
. "qfield=$qfield&start=$start&query=" . urlencode($_query) . $extra) . '">' . $text . '</a>';
if ($build_a_href)
{
return '<a href="' . $phpgw->link($program,"order=$var&sort=$sort&filter=$filter&"
. "qfield=$qfield&start=$start&query=" . urlencode($_query) . $extra) . '">' . $text . '</a>';
}
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='')