From 9a0ddd8d76970030bf8a38ffeffe48b77d086856 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 15 Mar 2006 19:08:40 +0000 Subject: [PATCH] fixing the fix - now it works ;-) search without start param returns now all entries --- infolog/inc/class.soinfolog.inc.php | 4 ++-- infolog/inc/class.uiinfolog.inc.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index 1d5eae7298..583b63eb87 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -574,7 +574,7 @@ $this->db->query($sql="SELECT $distinct main.info_id ".$sql_query,__LINE__,__FILE__); $query['total'] = $this->db->num_rows(); - if (!$query['start'] || $query['start'] > $query['total']) + if (isset($query['start']) && $query['start'] > $query['total']) { $query['start'] = 0; } @@ -584,7 +584,7 @@ } $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); - //echo "

sql='$sql'

\n"; + //echo "

db::query('$sql',,,".(int)$query['start'].','.(isset($query['start']) ? (int) $query['num_rows'] : -1).")

\n"; while (($info =& $this->db->row(true))) { $info['info_responsible'] = $info['info_responsible'] ? explode(',',$info['info_responsible']) : array(); diff --git a/infolog/inc/class.uiinfolog.inc.php b/infolog/inc/class.uiinfolog.inc.php index 1d0faa74e5..71b0badb3c 100644 --- a/infolog/inc/class.uiinfolog.inc.php +++ b/infolog/inc/class.uiinfolog.inc.php @@ -188,6 +188,8 @@ function get_rows($query,&$rows,&$readonlys) { //echo "

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).")

\n"; + if (!isset($query['start'])) $query['start'] = 0; + $this->save_sessiondata($query); $ids = $this->bo->search($query);