mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 16:59:36 +01:00
update formated_list to prevent error msg if array empty
This commit is contained in:
parent
f64f65b91a
commit
6121405967
@ -219,7 +219,7 @@
|
|||||||
$this->app_name = $app_name;
|
$this->app_name = $app_name;
|
||||||
$this->db = $phpgw->db;
|
$this->db = $phpgw->db;
|
||||||
$this->db2 = $this->db;
|
$this->db2 = $this->db;
|
||||||
$this->total_records = $this->db->num_rows();
|
$this->total_records = $this->db2->num_rows();
|
||||||
$this->grants = $phpgw->acl->get_grants($app_name);
|
$this->grants = $phpgw->acl->get_grants($app_name);
|
||||||
$this->cats = $this->return_array($type,$start,$limit,$query,$sort,$order,$public);
|
$this->cats = $this->return_array($type,$start,$limit,$query,$sort,$order,$public);
|
||||||
}
|
}
|
||||||
@ -286,8 +286,12 @@
|
|||||||
|
|
||||||
$cats = $this->return_array($type,$start,False,$query,$sort,$order,$public);
|
$cats = $this->return_array($type,$start,False,$query,$sort,$order,$public);
|
||||||
|
|
||||||
|
$this->total_records = $this->db2->num_rows();
|
||||||
|
|
||||||
$s = '<table border="0" cellpadding="2" cellspacing="2">' . "\n";
|
$s = '<table border="0" cellpadding="2" cellspacing="2">' . "\n";
|
||||||
|
|
||||||
|
if ($this->total_records > 0)
|
||||||
|
{
|
||||||
for ($i=0;$i<count($cats);$i++)
|
for ($i=0;$i<count($cats);$i++)
|
||||||
{
|
{
|
||||||
$image_set = ' ';
|
$image_set = ' ';
|
||||||
@ -306,9 +310,11 @@
|
|||||||
|
|
||||||
$s .= '<tr>' . "\n";
|
$s .= '<tr>' . "\n";
|
||||||
$s .= '<td width="8">' . $image_set . '</td>' . "\n";
|
$s .= '<td width="8">' . $image_set . '</td>' . "\n";
|
||||||
$s .= '<td>' . $space_set . '<a href="' . $phpgw->link($site_link,'cat_id=' . $cats[$i]['id']) . '">' . $phpgw->strip_html($cats[$i]['name']) . '</a></td>' . "\n";
|
$s .= '<td>' . $space_set . '<a href="' . $phpgw->link($site_link,'cat_id=' . $cats[$i]['id']) . '">' . $phpgw->strip_html($cats[$i]['name'])
|
||||||
|
. '</a></td>' . "\n";
|
||||||
$s .= '</tr>' . "\n";
|
$s .= '</tr>' . "\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$s .= '</table>' . "\n";
|
$s .= '</table>' . "\n";
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user