From 938a25ebeb98968221307d3bd8fa777aaef9ca0b Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 13 Oct 2005 15:24:48 +0000 Subject: [PATCH] fixed SQL introduced for the multiple responsibles --- infolog/inc/class.soinfolog.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infolog/inc/class.soinfolog.inc.php b/infolog/inc/class.soinfolog.inc.php index 79dada7940..8b03a3056e 100644 --- a/infolog/inc/class.soinfolog.inc.php +++ b/infolog/inc/class.soinfolog.inc.php @@ -133,12 +133,12 @@ $filtermethod .= " AND info_responsible='0'"; } // implicit read-rights for responsible user - $filtermethod .= " OR (".$this->db->concat("','",'info_responsible',"'%'")." LIKE '%,$this->user,%' AND info_access='public')"; + $filtermethod .= " OR (".$this->db->concat("'%,'",'info_responsible',"',%'")." LIKE '%,$this->user,%' AND info_access='public')"; // private: own entries plus the one user is responsible for if ($filter == 'private' || $filter == 'own') { - $filtermethod .= " OR (".$this->db->concat("','",'info_responsible',"'%'")." LIKE '%,$this->user,%'". + $filtermethod .= " OR (".$this->db->concat("'%,'",'info_responsible',"',%'")." LIKE '%,$this->user,%'". ($filter == 'own' && count($public_user_list) ? // offer's should show up in own, eg. startpage, but need read-access " OR info_status = 'offer' AND info_owner IN(" . implode(',',$public_user_list) . ')' : '').")". " AND (info_access='public'".($has_private_access?" OR $has_private_access":'').')'; @@ -158,7 +158,7 @@ if ($filter == 'user' && $f_user > 0) { - $filtermethod = " ((info_owner=$f_user AND info_responsible=0 OR ".$this->db->concat("','",'info_responsible',"'%'")." LIKE '%,$f_user,%') AND $filtermethod)"; + $filtermethod = " ((info_owner=$f_user AND info_responsible=0 OR ".$this->db->concat("'%,'",'info_responsible',"',%'")." LIKE '%,$f_user,%') AND $filtermethod)"; } //echo "

aclFilter(filter='$filter_was',user='$user') = '$filtermethod', privat_user_list=".print_r($privat_user_list,True).", public_user_list=".print_r($public_user_list,True)."

\n"; @@ -487,7 +487,7 @@ { $data = (int) $data; if (!$data) continue; - $filtermethod .= " AND (".$this->db->concat("','",'info_responsible',"','")." LIKE '%,$data,%' OR info_responsible='0' AND info_owner=$data)"; + $filtermethod .= " AND (".$this->db->concat("'%,'",'info_responsible',"',%'")." LIKE '%,$data,%' OR info_responsible='0' AND info_owner=$data)"; } else {