mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Moved to use the new limit_query() function
This commit is contained in:
parent
5b5d4d97b7
commit
8b9ff102bc
@ -57,7 +57,7 @@
|
||||
$p->set_var('lang_delete',lang('Delete'));
|
||||
$p->set_var('lang_view',lang('View'));
|
||||
|
||||
$account_info = $phpgw->accounts->get_list('accounts',$start,$sort, $order, $query, $total);
|
||||
$account_info = $phpgw->accounts->get_list('accounts',$start,$sort,$order,$query);
|
||||
|
||||
if (! count($account_info))
|
||||
{
|
||||
|
@ -86,15 +86,6 @@
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
if ($offset)
|
||||
{
|
||||
$limitclause = $phpgw->db->limit($start,$offset);
|
||||
}
|
||||
elseif ($start && !$offset)
|
||||
{
|
||||
$limitclause = $phpgw->db->limit($start);
|
||||
}
|
||||
|
||||
if (! $sort)
|
||||
{
|
||||
$sort = "DESC";
|
||||
@ -106,7 +97,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$orderclause = "ORDER BY account_lid,account_lastname,account_firstname ASC";
|
||||
$orderclause = "ORDER BY account_lid ASC";
|
||||
}
|
||||
|
||||
switch($_type)
|
||||
@ -140,8 +131,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM phpgw_accounts $whereclause $orderclause $limitclause";
|
||||
$this->db->query($sql,__LINE__,__FILE__);
|
||||
$sql = "SELECT * FROM phpgw_accounts $whereclause $orderclause";
|
||||
if ($offset)
|
||||
{
|
||||
$this->db->limit_query($sql,array($start,$offset),__LINE__,__FILE__);
|
||||
}
|
||||
elseif ($start == 0 || $start && !$offset)
|
||||
{
|
||||
$this->db->limit_query($sql,$start,__LINE__,__FILE__);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db->query($sql,__LINE__,__FILE__);
|
||||
}
|
||||
|
||||
while ($this->db->next_record()) {
|
||||
$accounts[] = Array(
|
||||
'account_id' => $this->db->f('account_id'),
|
||||
|
Loading…
Reference in New Issue
Block a user