[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] calendar/inc class.bocalendar.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] calendar/inc class.bocalendar.inc.php |
Date: |
Thu, 07 Dec 2006 20:34:27 +0000 |
CVSROOT: /sources/phpgroupware
Module name: calendar
Changes by: Sigurd Nes <sigurdne> 06/12/07 20:34:27
Modified files:
inc : class.bocalendar.inc.php
Log message:
ACL
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.bocalendar.inc.php?cvsroot=phpgroupware&r1=1.114&r2=1.115
Patches:
Index: class.bocalendar.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -b -r1.114 -r1.115
--- class.bocalendar.inc.php 7 Dec 2006 19:01:33 -0000 1.114
+++ class.bocalendar.inc.php 7 Dec 2006 20:34:27 -0000 1.115
@@ -12,7 +12,7 @@
* option) any later version. *
\**************************************************************************/
- /* $Id: class.bocalendar.inc.php,v 1.114 2006/12/07 19:01:33 sigurdne
Exp $ */
+ /* $Id: class.bocalendar.inc.php,v 1.115 2006/12/07 20:34:27 sigurdne
Exp $ */
class bocalendar
{
@@ -141,7 +141,7 @@
$this->cat = CreateObject('phpgwapi.categories');
$this->contacts = createObject('phpgwapi.contacts');
$this->grants =
$GLOBALS['phpgw']->acl->get_grants('calendar','.');
- //_debug_array($this->grants);
+
if(DEBUG_APP)
{
if(floor(phpversion()) >= 4)
@@ -1394,12 +1394,10 @@
if ( $event === 0)
{
//convert back to phpgw account id for acls
- /* $owner =
$GLOBALS['phpgw']->accounts->search_person($other > 0
+ $owner =
$GLOBALS['phpgw']->accounts->search_person($other > 0
? $other
: $this->owner
);
- */
- $owner = ($other > 0 ? $other :
$GLOBALS['phpgw_info']['user']['account_id']);
}
else
{
@@ -1412,12 +1410,11 @@
return False;
}
$owner =
$GLOBALS['phpgw']->accounts->search_person($event['owner']);
-//_debug_array($owner);
-// $owner = $event['owner'];
+
$private = $event['public'] == False ||
$event['public'] == 0;
}
$user = $GLOBALS['phpgw_info']['user']['account_id'];
-//_debug_array($this->grants);
+
$grants =
(isset($this->grants[$owner])?$this->grants[$owner]:'');
if ( $owner == $user ) //if the current user is the
owner they have full rights