Fix caching problems.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
Andrew McMillan 2011-01-04 17:00:03 +13:00
parent 52e9ad0018
commit e70bcd80d1
2 changed files with 3 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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;