Index: trunk/kernel/include/permissions.php =================================================================== diff -u -r13 -r342 --- trunk/kernel/include/permissions.php (.../permissions.php) (revision 13) +++ trunk/kernel/include/permissions.php (.../permissions.php) (revision 342) @@ -193,6 +193,18 @@ } } + function Set_Permission($CategoryId,$GroupId,$PermName,$Value,$Type) + { + $Perm = $this->GetPermByName($PermName); + if($Perm) + { + $Id = $Perm->Get("PermissionId"); + $this->Edit_Permission($Id,$CategoryId,$GroupId,$PermName,$Value,$Type); + } + else + $this->Add_Permission($CategoryId,$GroupId,$PermName,$Value,$Type); + } + function Add_Permission($CategoryId,$GroupId,$PermName,$Value,$Type) { $p = new clsPermission();