phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [19012] fix: compatibility with old and new api


From: Pascal Vilarem
Subject: [Phpgroupware-cvs] [19012] fix: compatibility with old and new api
Date: Wed, 10 Dec 2008 16:48:21 +0000

Revision: 19012
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19012
Author:   maat
Date:     2008-12-10 16:48:20 +0000 (Wed, 10 Dec 2008)

Log Message:
-----------
fix: compatibility with old and new api

Modified Paths:
--------------
    modules/ged/trunk/inc/class.ged_dm.inc.php
    modules/ged/trunk/inc/class.soflows.inc.php

Modified: modules/ged/trunk/inc/class.ged_dm.inc.php
===================================================================
--- modules/ged/trunk/inc/class.ged_dm.inc.php  2008-12-10 12:04:42 UTC (rev 
19011)
+++ modules/ged/trunk/inc/class.ged_dm.inc.php  2008-12-10 16:48:20 UTC (rev 
19012)
@@ -55,9 +55,15 @@
                        $this->sqlaclchangeacl=$sqlaclbase.") AND ( 
".$this->tables['acl'].".aclchangeacl=1 )";
                }
                
-               //$this->ged_config=$GLOBALS['ged_config'];
                $config=CreateObject('phpgwapi.config','ged');
-               $config->read();
+               if ( is_callable(array($config,'read_repository')))
+               {
+                       $config->read_repository();
+               }
+               else
+               {
+                       $config->read();
+               }
                $this->ged_config=$config->config_data;
                //_debug_array($this->ged_config);
                unset($config);

Modified: modules/ged/trunk/inc/class.soflows.inc.php
===================================================================
--- modules/ged/trunk/inc/class.soflows.inc.php 2008-12-10 12:04:42 UTC (rev 
19011)
+++ modules/ged/trunk/inc/class.soflows.inc.php 2008-12-10 16:48:20 UTC (rev 
19012)
@@ -114,11 +114,15 @@
                                $the_account_id=$account_id;
                        }
                        
-                       
$the_groups=$GLOBALS['phpgw']->acl->get_location_list_for_id('phpgw_group', 1, 
$the_account_id);
+                       // TODO fix this line to retrieve the list of groups
+                       // As it seems it's not the correct way now :-/
+                       
//$the_groups=$GLOBALS['phpgw']->acl->get_location_list_for_id('phpgw_group', 
1, $the_account_id);
+                       $account = createObject('phpgwapi.accounts', 
$account_id, 'u');
+                       $the_groups = $account->membership($account_id);
                        
                        $or="";
                        $sql_role_base="( ";
-                       foreach ( $the_groups as $group )
+                       foreach ( $the_groups as $group => $groupname )
                        {
                                
$sql_role_base.=$or."phpgw_flows_roles.account_id=".intval($group)." ";
                                $or="OR ";






reply via email to

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