fixing the fix - now it works ;-)

search without start param returns now all entries
This commit is contained in:
Ralf Becker 2006-03-15 19:08:40 +00:00
parent d6d5b29ef5
commit 9a0ddd8d76
2 changed files with 4 additions and 2 deletions

View File

@ -574,7 +574,7 @@
$this->db->query($sql="SELECT $distinct main.info_id ".$sql_query,__LINE__,__FILE__); $this->db->query($sql="SELECT $distinct main.info_id ".$sql_query,__LINE__,__FILE__);
$query['total'] = $this->db->num_rows(); $query['total'] = $this->db->num_rows();
if (!$query['start'] || $query['start'] > $query['total']) if (isset($query['start']) && $query['start'] > $query['total'])
{ {
$query['start'] = 0; $query['start'] = 0;
} }
@ -584,7 +584,7 @@
} }
$this->db->query($sql="SELECT $distinct main.* $count_subs $sql_query $ordermethod",__LINE__,__FILE__, $this->db->query($sql="SELECT $distinct main.* $count_subs $sql_query $ordermethod",__LINE__,__FILE__,
(int) $query['start'],isset($query['start']) ? (int) $query['num_rows'] : -1); (int) $query['start'],isset($query['start']) ? (int) $query['num_rows'] : -1);
//echo "<p>sql='$sql'</p>\n"; //echo "<p>db::query('$sql',,,".(int)$query['start'].','.(isset($query['start']) ? (int) $query['num_rows'] : -1).")</p>\n";
while (($info =& $this->db->row(true))) while (($info =& $this->db->row(true)))
{ {
$info['info_responsible'] = $info['info_responsible'] ? explode(',',$info['info_responsible']) : array(); $info['info_responsible'] = $info['info_responsible'] ? explode(',',$info['info_responsible']) : array();

View File

@ -188,6 +188,8 @@
function get_rows($query,&$rows,&$readonlys) function get_rows($query,&$rows,&$readonlys)
{ {
//echo "<p>uiinfolog.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).")</p>\n"; //echo "<p>uiinfolog.get_rows(start=$query[start],search='$query[search]',filter='$query[filter]',cat_id=$query[cat_id],action='$query[action]/$query[action_id]',col_filter=".print_r($query['col_filter'],True).")</p>\n";
if (!isset($query['start'])) $query['start'] = 0;
$this->save_sessiondata($query); $this->save_sessiondata($query);
$ids = $this->bo->search($query); $ids = $this->bo->search($query);