mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
formatting
This commit is contained in:
parent
dda262cfea
commit
e5e315711c
@ -49,8 +49,8 @@
|
||||
$this->template->set_block('_nextmatchs','search_filter');
|
||||
$this->template->set_block('_nextmatchs','cats_search_filter');
|
||||
|
||||
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'])
|
||||
&& intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) > 0)
|
||||
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) &&
|
||||
intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) > 0)
|
||||
{
|
||||
$this->maxmatches = intval($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']);
|
||||
}
|
||||
@ -94,7 +94,6 @@
|
||||
return $this->template->fp('out','link');
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
@function page
|
||||
@abstract ?
|
||||
@ -285,11 +284,10 @@
|
||||
);
|
||||
|
||||
$extravars = $this->split_extras($extravars,$extradata);
|
||||
|
||||
$ret_str = '';
|
||||
|
||||
if (($start != 0)
|
||||
&& ($start > $this->maxmatches))
|
||||
if (($start != 0) &&
|
||||
($start > $this->maxmatches))
|
||||
{
|
||||
$extravars['start'] = 0;
|
||||
$ret_str .= $this->set_link('left','first.gif',$scriptname,lang('First page'),$extravars);
|
||||
@ -343,8 +341,8 @@
|
||||
|
||||
$ret_str = '';
|
||||
|
||||
if (($total > $this->maxmatches)
|
||||
&& ($total > $start + $this->maxmatches))
|
||||
if (($total > $this->maxmatches) &&
|
||||
($total > $start + $this->maxmatches))
|
||||
{
|
||||
$extravars['start'] = ($start + $this->maxmatches);
|
||||
$ret_str .= $this->set_link('right','right.gif',$scriptname,lang('Next page'),$extravars);
|
||||
@ -354,8 +352,8 @@
|
||||
$ret_str .= $this->set_icon('right','right-grey.gif',lang('Next page'));
|
||||
}
|
||||
|
||||
if (($start != $total - $this->maxmatches)
|
||||
&& (($total - $this->maxmatches) > ($start + $this->maxmatches)))
|
||||
if (($start != $total - $this->maxmatches) &&
|
||||
(($total - $this->maxmatches) > ($start + $this->maxmatches)))
|
||||
{
|
||||
$extravars['start'] = ($total - $this->maxmatches);
|
||||
$ret_str .= $this->set_link('right','last.gif',$scriptname,lang('Last page'),$extravars);
|
||||
@ -461,7 +459,7 @@
|
||||
$filter_obj = array(array('none','show all'));
|
||||
$index = 0;
|
||||
|
||||
$GLOBALS['phpgw']->db->query("SELECT $idxfieldname, $strfieldname from $filtertable",__LINE__,__FILE__);
|
||||
$GLOBALS['phpgw']->db->query("SELECT $idxfieldname, $strfieldname FROM $filtertable",__LINE__,__FILE__);
|
||||
while($GLOBALS['phpgw']->db->next_record())
|
||||
{
|
||||
$index++;
|
||||
@ -540,7 +538,6 @@
|
||||
if (is_array($filter_obj))
|
||||
{
|
||||
$str = '';
|
||||
|
||||
$indexlimit = count($filter_obj);
|
||||
|
||||
for ($index=0; $index<$indexlimit; $index++)
|
||||
@ -609,7 +606,7 @@
|
||||
*/
|
||||
function show_sort_order($sort,$var,$order,$program,$text,$extra='',$build_a_href=True)
|
||||
{
|
||||
global $phpgw, $filter, $qfield, $start;
|
||||
global $filter, $qfield, $start;
|
||||
|
||||
if (($order == $var) && ($sort == 'ASC'))
|
||||
{
|
||||
@ -663,7 +660,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
@function show_sort_order_imap
|
||||
@abstract ?
|
||||
@ -710,7 +706,6 @@
|
||||
return '<a href="' .$link .'">' .$text .'</a>';
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
@function nav_left_right_imap
|
||||
@abstract same code as left and right (as of Dec 07, 2001) except all combined into one function
|
||||
@ -743,8 +738,8 @@
|
||||
$out_vars['cmd_suffix'] = $feed_vars['cmd_suffix'];
|
||||
|
||||
// first page
|
||||
if (($feed_vars['start'] != 0)
|
||||
&& ($feed_vars['start'] > $this->maxmatches))
|
||||
if (($feed_vars['start'] != 0) &&
|
||||
($feed_vars['start'] > $this->maxmatches))
|
||||
{
|
||||
$out_vars['start'] = 0;
|
||||
$return_array['first_page'] = $this->set_link_imap('left','first.gif',lang('First page'),$out_vars);
|
||||
@ -776,8 +771,8 @@
|
||||
// things that might change
|
||||
$out_vars['start'] = $feed_vars['start'];
|
||||
// next page
|
||||
if (($feed_vars['total'] > $this->maxmatches)
|
||||
&& ($feed_vars['total'] > $feed_vars['start'] + $this->maxmatches))
|
||||
if (($feed_vars['total'] > $this->maxmatches) &&
|
||||
($feed_vars['total'] > $feed_vars['start'] + $this->maxmatches))
|
||||
{
|
||||
$out_vars['start'] = ($feed_vars['start'] + $this->maxmatches);
|
||||
$return_array['next_page'] = $this->set_link_imap('right','right.gif',lang('Next page'),$out_vars);
|
||||
@ -787,8 +782,8 @@
|
||||
$return_array['next_page'] = $this->set_icon_imap('right','right-grey.gif',lang('Next page'));
|
||||
}
|
||||
// last page
|
||||
if (($feed_vars['start'] != $feed_vars['total'] - $this->maxmatches)
|
||||
&& (($feed_vars['total'] - $this->maxmatches) > ($feed_vars['start'] + $this->maxmatches)))
|
||||
if (($feed_vars['start'] != $feed_vars['total'] - $this->maxmatches) &&
|
||||
(($feed_vars['total'] - $this->maxmatches) > ($feed_vars['start'] + $this->maxmatches)))
|
||||
{
|
||||
$out_vars['start'] = ($feed_vars['total'] - $this->maxmatches);
|
||||
$return_array['last_page'] = $this->set_link_imap('right','last.gif',lang('Last page'),$out_vars);
|
||||
@ -820,6 +815,5 @@
|
||||
$img_full = $GLOBALS['phpgw']->common->image('phpgwapi',$img);
|
||||
return '<img src="'.$img_full.'" border="0" width="12" height="12" alt="'.$alt_text.'">'."\r\n";
|
||||
}
|
||||
|
||||
} // End of nextmatchs class
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user