From e70bcd80d13b121d62253c75edb8055fa99dc07e Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Tue, 4 Jan 2011 17:00:03 +1300 Subject: [PATCH] Fix caching problems. Signed-off-by: Andrew McMillan --- inc/Principal.php | 2 ++ inc/caldav-ACL.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/Principal.php b/inc/Principal.php index 36888a55..8ececd1b 100644 --- a/inc/Principal.php +++ b/inc/Principal.php @@ -157,6 +157,8 @@ class Principal { self::$byUserno[$row->user_no] = $row->username; self::$byEmail[$row->email] = $row->username; $this->assignRowValues($row); + $this->url = ConstructURL( $this->dav_name, true ); + $this->exists = true; return $this; } } diff --git a/inc/caldav-ACL.php b/inc/caldav-ACL.php index b57a0fd9..2d72fa25 100644 --- a/inc/caldav-ACL.php +++ b/inc/caldav-ACL.php @@ -169,7 +169,7 @@ function process_ace( $grantor, $by_principal, $by_collection, $ace ) { $qry = new AwlQuery($sql, $sqlparms); if ( $qry->Exec('ACL',__LINE__,__FILE__) ) { Principal::cacheDelete('dav_name',$grantee->dav_name()); - Principal::cacheFlush('principal_id IN (SELECT member_id FROM group_member WHERE group_id = '.$grantee_id); + Principal::cacheFlush('principal_id IN (SELECT member_id FROM group_member WHERE group_id = ?)', array($grantee_id)); } break;