phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] preferences/inc class.boadmin_acl.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] preferences/inc class.boadmin_acl.inc.php
Date: Sun, 22 Oct 2006 20:00:42 +0000

CVSROOT:        /sources/phpgroupware
Module name:    preferences
Changes by:     Sigurd Nes <sigurdne>   06/10/22 20:00:42

Modified files:
        inc            : class.boadmin_acl.inc.php 

Log message:
        tuning

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/class.boadmin_acl.inc.php?cvsroot=phpgroupware&r1=1.6&r2=1.7

Patches:
Index: class.boadmin_acl.inc.php
===================================================================
RCS file: /sources/phpgroupware/preferences/inc/class.boadmin_acl.inc.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- class.boadmin_acl.inc.php   13 Oct 2006 20:59:03 -0000      1.6
+++ class.boadmin_acl.inc.php   22 Oct 2006 20:00:42 -0000      1.7
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package hrm
        * @subpackage admin
-       * @version $Id: class.boadmin_acl.inc.php,v 1.6 2006/10/13 20:59:03 
sigurdne Exp $
+       * @version $Id: class.boadmin_acl.inc.php,v 1.7 2006/10/22 20:00:42 
sigurdne Exp $
        */
 
        /**
@@ -220,7 +220,7 @@
                {
                        if ( !is_array($values) )
                        {
-                               return;
+//                             return;
                        }
 
                        $totalacl = array();
@@ -245,7 +245,7 @@
                                $this->acl->read_repository();
                                $this->acl->delete($this->acl_app, 
$this->location, $grantor, $type);
                                $this->acl->add($this->acl_app, 
$this->location, $rights, $grantor, $type);
-                               $this->acl->save_repository();
+                               $this->acl->save_repository($this->acl_app, 
$this->location);
                        }
 
                        if (is_array($r_processed) && count($user_checked))
@@ -256,14 +256,20 @@
                        {
                                $user_delete = $r_processed;
                        }
+
+                       $users_at_location = 
$this->acl->get_accounts_at_location($this->acl_app, $this->location, $grantor 
,$type);
+                       
                        if(is_array($user_delete) && count($user_delete)>0)
                        {
                                while(list(,$user_id) = each($user_delete))
                                {
+                                       if(isset($users_at_location[$user_id]) 
&& $users_at_location[$user_id])
+                                       {
                                        $this->acl->account_id = $user_id;
                                        $this->acl->read_repository();
                                        $this->acl->delete($this->acl_app, 
$this->location, $grantor, $type);
-                                       $this->acl->save_repository();
+                                               
$this->acl->save_repository($this->acl_app, $this->location);
+                                       }
                                }
                        }
                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]