phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc hook_admin.inc.php, 1.22 class.uiproject


From: ceb
Subject: [Phpgroupware-cvs] projects/inc hook_admin.inc.php, 1.22 class.uiprojects_base.inc.php, 1.10 class.boprojects.inc.php, 1.156 class.soconfig.inc.php, 1.19 class.soprojects.inc.php, 1.109 class.uiconfig.inc.php, 1.32 class.boconfig.inc.php, 1.22
Date: Sat, 2 Apr 2005 01:52:00 +0200

Update of projects/inc

Modified Files:
     Branch: MAIN
            hook_admin.inc.php lines: +4 -6
            class.uiprojects_base.inc.php lines: +2 -2
            class.boprojects.inc.php lines: +5 -5
            class.soconfig.inc.php lines: +33 -81
            class.soprojects.inc.php lines: +24 -19
            class.uiconfig.inc.php lines: +28 -16
            class.boconfig.inc.php lines: +5 -5

Log Message:
update

====================================================
Index: projects/inc/hook_admin.inc.php
diff -u projects/inc/hook_admin.inc.php:1.21 
projects/inc/hook_admin.inc.php:1.22
--- projects/inc/hook_admin.inc.php:1.21        Mon Mar 14 17:39:39 2005
+++ projects/inc/hook_admin.inc.php     Fri Apr  1 23:52:28 2005
@@ -15,14 +15,12 @@
                $file = Array
                (
                        'Site Configuration'            => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' 
. $appname),
+                       'project administrators'        => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_admins'),
                        'Worktime statusmail'           => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.config_worktime_statusmail'),
                        'Worktime warnmail'                     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.config_worktime_warnmail'),
                        'Workhours booking'                     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.config_workhours_booking'),
-                       'managing committee'            => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_admins&action=pmanager'),
-                       'project administrators'        => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_admins&action=pad'),
-                       'sales department'                      => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_admins&action=psale'),
-                       'Global Categories'                     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname),
-                       'edit project id help msg'      => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.config_proid_help_msg')
+                       'edit project id help msg'      => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.config_proid_help_msg'),
+                       'Global Categories'                     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname)
                );
 //Do not modify below this line
                display_section($appname,$appname,$file);

====================================================
Index: projects/inc/class.uiprojects_base.inc.php
diff -u projects/inc/class.uiprojects_base.inc.php:1.9 
projects/inc/class.uiprojects_base.inc.php:1.10
--- projects/inc/class.uiprojects_base.inc.php:1.9      Thu Mar 31 23:00:22 2005
+++ projects/inc/class.uiprojects_base.inc.php  Fri Apr  1 23:52:28 2005
@@ -296,7 +296,7 @@
                        }

                        /* this will move to bookkeeping
-                       if ($this->boprojects->isprojectadmin('pad') || 
$this->boprojects->isprojectadmin('pmanager'))
+                       if ($this->boprojects->isprojectadmin())
                        {
                                $icons .= $icon_sep;
                                $icons .= $this->CreateButton(EXPORT_DIAMANT);

====================================================
Index: projects/inc/class.boprojects.inc.php
diff -u projects/inc/class.boprojects.inc.php:1.155 
projects/inc/class.boprojects.inc.php:1.156
--- projects/inc/class.boprojects.inc.php:1.155 Tue Mar 29 14:46:57 2005
+++ projects/inc/class.boprojects.inc.php       Fri Apr  1 23:52:27 2005
@@ -240,7 +240,7 @@
                        {
                                return True;
                        }
-                       if($this->isprojectadmin('pad') || 
$this->isprojectadmin('pmanager'))
+                       if($this->isprojectadmin())
                        {
                                return True;
                        }
@@ -315,7 +315,7 @@
                                        {
                                                return True;
                                        }
-                                       else if($this->isprojectadmin('pad') || 
$this->isprojectadmin('pmanager') && !is_array($cat))
+                                       else if($this->isprojectadmin() && 
!is_array($cat))
                                        {
                                                return True;
                                        }
@@ -335,7 +335,7 @@
                                        {
                                                return True;
                                        }
-                                       if($this->isprojectadmin('pad') || 
$this->isprojectadmin('pmanager'))
+                                       if($this->isprojectadmin())
                                        {
                                                return True;
                                        }
@@ -2412,7 +2412,7 @@
                        return $activities_list;
                }

-               function isprojectadmin($action = 'pad')
+               function isprojectadmin($action = 'project_admin')
                {
                        return 
$this->soprojects->soconfig->isprojectadmin($action);
                }

====================================================
Index: projects/inc/class.soconfig.inc.php
diff -u projects/inc/class.soconfig.inc.php:1.18 
projects/inc/class.soconfig.inc.php:1.19
--- projects/inc/class.soconfig.inc.php:1.18    Mon Mar 14 17:39:39 2005
+++ projects/inc/class.soconfig.inc.php Fri Apr  1 23:52:28 2005
@@ -7,7 +7,7 @@
        * Project Manager                                                   *
        * Written by Bettina Gille address@hidden                   *
        * -----------------------------------------------                   *
-       * Copyright 2000 - 2004 Free Software Foundation, Inc               *
+       * Copyright 2000 - 2005 Free Software Foundation, Inc               *
        *                                                                   *
        * This program is free software; you can redistribute it and/or     *
        * modify it under the terms of the GNU General Public License as    *
@@ -292,135 +292,87 @@
                        }
                }

-               function read_admins($action = 'pad',$type = '')
+               function read_admins($action = 'project_admin',$type = '')
                {
-                       switch($type)
+                       if($action != 'project_admin' && $action != 
'project_salesman')
                        {
-                               case 'user':
-                                       switch($action)
-                                       {
-                                               case 'pmanager':        $filter 
= "type='ma'"; break;
-                                               case 'psale':           $filter 
= "type='sa'"; break;
-                                               case 'pad':                     
$filter = "type='aa'"; break;
-                                       }
-                                       break;
-                               case 'group':
-                                       switch($action)
-                                       {
-                                               case 'pmanager':        $filter 
= "type='mg'"; break;
-                                               case 'psale':           $filter 
= "type='sg'"; break;
-                                               case 'pad':                     
$filter = "type='ag'"; break;
-                                       }
-                                       break;
-                               case 'all': $filter = "(type != 'accounting' 
AND type != 'role')"; break;
-                               default:
-                                       switch($action)
-                                       {
-                                               case 'pmanager':        $filter 
= "type='ma' or type='mg'"; break;
-                                               case 'psale':           $filter 
= "type='sa' or type='sg'"; break;
-                                               case 'pad':                     
$filter = "type='aa' or type='ag'"; break;
-                                       }
-                                       break;
+                               $action = 'project_admin';
+                       }
+
+                       if($type != '')
+                       {
+                               $typeselect = " AND acl_location='" . $type . 
"'";
                        }

-                       $sql = 'select account_id,type from 
phpgw_p_projectmembers WHERE ' . $filter;
-                       $this->db->query($sql);
+                       $sql = "select acl_account, acl_location from phpgw_acl 
WHERE acl_appname='" . $action . "'";
+                       $this->db->query($sql . $typeselect,__LINE__,__FILE__);
                        $this->total_records = $this->db->num_rows();
                        while ($this->db->next_record())
                        {
-                               $admins[] = array('account_id' => 
$this->db->f('account_id'),
-                                                                               
'type' => $this->db->f('type'));
+                               $admins[] = array('account_id' => 
$this->db->f('acl_account'),
+                                                                               
'type' => $this->db->f('acl_location'));
                        }
                        return $admins;
                }

-               function isprojectadmin($action = 'pad')
+               function isprojectadmin($action = 'project_admin')
                {
+                       if($action != 'project_admin' && $action != 
'project_salesman')
+                       {
+                               $action = 'project_admin';
+                       }
+
                        $admin_groups = 
$GLOBALS['phpgw']->accounts->membership($this->account);
                        $admins = $this->read_admins($action);

                        //_debug_array($admins);

-                       for ($i=0;$i<count($admins);$i++)
+                       for($i=0;$i<count($admins);++$i)
                        {
-                               switch($action)
+                               if ($admins[$i]['type'] == 'user' && 
$admins[$i]['account_id'] == $this->account)
                                {
-                                       case 'pmanager':
-                                               $type_a = 'ma';
-                                               $type_g = 'mg';
-                                               break;
-                                       case 'psale':
-                                               $type_a = 'sa';
-                                               $type_g = 'sg';
-                                               break;
-                                       default:
-                                               $type_a = 'aa';
-                                               $type_g = 'ag';
-                                               break;
-                               }
-
-                               if ($admins[$i]['type'] == $type_a && 
$admins[$i]['account_id'] == $this->account)
-                               {
-                                       return true;
+                                       return True;
                                }
-                               elseif ($admins[$i]['type'] == $type_g)
+                               elseif($admins[$i]['type'] == 'group')
                                {
                                        if (is_array($admin_groups))
                                        {
-                                               for 
($j=0;$j<count($admin_groups);$j++)
+                                               for 
($j=0;$j<count($admin_groups);++$j)
                                                {
                                                        if 
($admin_groups[$j]['account_id'] == $admins[$i]['account_id'])
-                                                               return true;
+                                                               return True;
                                                }
                                        }
                                }
                                else
                                {
-                                       return false;
+                                       return False;
                                }
                        }
                }

-               function edit_admins($action,$users = '', $groups = '')
+               function edit_admins($action = 'project_admin',$users = 0, 
$groups = 0)
                {
-                       switch($action)
+                       if($action != 'project_admin' && $action != 
'project_salesman')
                        {
-                               case 'psale':           $filter = "sa' OR 
type='sg"; break;
-                               case 'pmanager':        $filter = "ma' OR 
type='mg"; break;
-                               default:                        $filter = "aa' 
OR type='ag"; break;
+                               $action = 'project_admin';
                        }

-                       $this->db->query("DELETE from phpgw_p_projectmembers 
WHERE type='" . $filter . "'",__LINE__,__FILE__);
+                       $this->db->query("DELETE from phpgw_acl WHERE 
acl_appname='" . $action . "'",__LINE__,__FILE__);

                        if (is_array($users))
                        {
-                               switch($action)
-                               {
-                                       case 'psale':           $type = 'sa'; 
break;
-                                       case 'pmanager':        $type = 'ma'; 
break;
-                                       default:                        $type = 
'aa'; break;
-                               }
-
                                while($activ=each($users))
                                {
-                                       $this->db->query('insert into 
phpgw_p_projectmembers (project_id, account_id,type) values (0,' . $activ[1] . 
",'"
-                                                                       . $type 
. "')",__LINE__,__FILE__);
+                                       $this->db->query("INSERT into phpgw_acl 
values ('" . $action . "','user'," . $activ[1] . ',1)',__LINE__,__FILE__);
                                }
                        }

                        if (is_array($groups))
                        {
-                               switch($action)
-                               {
-                                       case 'psale':           $type = 'sg'; 
break;
-                                       case 'pmanager':        $type = 'mg'; 
break;
-                                       default:                        $type = 
'ag'; break;
-                               }
-
                                while($activ=each($groups))
                                {
-                                       $this->db->query('insert into 
phpgw_p_projectmembers (project_id, account_id,type) values (0,' . $activ[1] . 
",'"
-                                                                       . $type 
. "')",__LINE__,__FILE__);
+                                       $this->db->query("INSERT into phpgw_acl 
values ('" . $action . "','group'," . $activ[1] . ',1)',__LINE__,__FILE__);
                                }
                        }
                }

====================================================
Index: projects/inc/class.soprojects.inc.php
diff -u projects/inc/class.soprojects.inc.php:1.108 
projects/inc/class.soprojects.inc.php:1.109
--- projects/inc/class.soprojects.inc.php:1.108 Thu Mar 31 23:00:22 2005
+++ projects/inc/class.soprojects.inc.php       Fri Apr  1 23:52:28 2005
@@ -7,7 +7,7 @@
        * Project Manager                                                   *
        * Written by Bettina Gille address@hidden                   *
        * -----------------------------------------------                   *
-       * Copyright 2000 - 2004 Free Software Foundation, Inc.              *
+       * Copyright 2000 - 2005 Free Software Foundation, Inc.              *
        *                                                                   *
        * This program is free software; you can redistribute it and/or     *
        * modify it under the terms of the GNU General Public License as    *
@@ -158,7 +158,7 @@

                        if ($filter == 'none' || $filter == 'noadmin')
                        {
-                               if ($filter == 'none' && 
($this->soconfig->isprojectadmin('pad') || 
$this->soconfig->isprojectadmin('pmanager') || 
$this->soconfig->isprojectadmin('psale')))
+                               if ($filter == 'none' && 
($this->soconfig->isprojectadmin() || 
$this->soconfig->isprojectadmin('project_salesman')))
                                {
                                        $filtermethod = " ( access != 'private' 
OR coordinator = " . $this->account . ' )';
                                }
@@ -187,14 +187,6 @@
                        {
                                $filtermethod = ' coordinator=' . 
$this->account;
                        }
-                       elseif ($filter == 'anonym')
-                       {
-                               $filtermethod = " access = 'anonym' ";
-                       }
-                       elseif ($filter == 'employee')
-                       {
-                               $filtermethod = ' employee =' . $employee;
-                       }
                        else
                        {
                                $filtermethod = ' coordinator=' . 
$this->account . " AND access='private'";
@@ -1039,9 +1031,17 @@
                        if ($account_id > 0)
                        {
                                $this->db->query('delete from phpgw_categories 
where cat_owner=' . $account_id . " AND 
cat_appname='projects'",__LINE__,__FILE__);
+
+                               $this->db->query('delete from phpgw_acl where 
acl_account=' . $account_id . " AND (acl_appname='project_members' OR 
acl_appname='project_admin' "
+                                                               . "OR 
acl_appname='project_salesman')",__LINE__,__FILE__);
+
+                               $this->db->query('delete from 
phpgw_p_projectmembers where account_id=' . $account_id,__LINE__,__FILE__);
+
                                $this->db->query('delete from phpgw_p_hours 
where employee=' . $account_id,__LINE__,__FILE__);
-                               $this->db->query('select project_id from 
phpgw_p_projects where coordinator=' . $account_id,__LINE__,__FILE__);
+                               $this->db->query('delete from phpgw_p_ttracker 
where employee=' . $account_id,__LINE__,__FILE__);

+                               /* needs work to avoid deleting project if subs 
with different coordinator */
+                               $this->db->query('select project_id from 
phpgw_p_projects where coordinator=' . $account_id,__LINE__,__FILE__);
                                while ($this->db->next_record())
                                {
                                        $drop_list[] = 
$this->db->f('project_id');
@@ -1053,10 +1053,8 @@
 //                                     _debug_array($drop_list);
 //                                     exit;

-                                       $subdelete = ' OR parent in (' . 
implode(',',$drop_list) . ')';
-
-                                       $this->db->query('DELETE from 
phpgw_p_projects where project_id in (' . implode(',',$drop_list) . ')'
-                                                                       . 
$subdelete,__LINE__,__FILE__);
+                                       $this->db->query('DELETE from 
phpgw_p_projects where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);
+                                       $this->db->query('DELETE from 
phpgw_p_mstones where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);

                                        $this->db->query('select id from 
phpgw_p_delivery where project_id in (' . implode(',',$drop_list) . 
')',__LINE__,__FILE__);

@@ -1064,7 +1062,7 @@
                                        {
                                                $del[] = array
                                                (
-                                                       'id'    => 
$this->db->f('id')
+                                                       'id' => 
$this->db->f('id')
                                                );
                                        }

@@ -1085,7 +1083,7 @@
                                        {
                                                $inv[] = array
                                                (
-                                                       'id'    => 
$this->db->f('id')
+                                                       'id' => 
$this->db->f('id')
                                                );
                                        }

@@ -1109,10 +1107,17 @@

                        $this->db->query('UPDATE phpgw_p_projects set 
coordinator=' . $new . ' where coordinator=' . $old,__LINE__,__FILE__);
                        $this->db->query('UPDATE phpgw_p_hours set employee=' . 
$new . ' where employee=' . $old,__LINE__,__FILE__);
-                       $this->db->query('UPDATE phpgw_p_projectmembers set 
account_id=' . $new . ' where (account_id=' . $old . " AND 
type='aa')",__LINE__,__FILE__);
+                       $this->db->query('UPDATE phpgw_p_ttracker set 
employee=' . $new . ' where employee=' . $old,__LINE__,__FILE__);
+
+                       $this->db->query('UPDATE phpgw_p_projectmembers set 
account_id=' . $new . ' where (account_id=' . $old . " AND 
type='role')",__LINE__,__FILE__);
+
                        $this->db->query('UPDATE phpgw_p_invoice set owner=' . 
$new . ' where owner=' . $old,__LINE__,__FILE__);
                        $this->db->query('UPDATE phpgw_p_delivery set owner=' . 
$new . ' where owner=' . $old,__LINE__,__FILE__);
+
                        $this->db->query('UPDATE phpgw_categories set 
cat_owner=' . $new . ' where cat_owner=' . $old . " AND 
cat_appname='projects'",__LINE__,__FILE__);
+
+                       $this->db->query('UPDATE phpgw_acl set acl_account=' . 
$new . ' where acl_account=' . $old . " AND (acl_appname='project_members' OR 
acl_appname='project_admin' "
+                                                       . "OR 
acl_appname='project_salesman')",__LINE__,__FILE__);
                }



====================================================
Index: projects/inc/class.uiconfig.inc.php
diff -u projects/inc/class.uiconfig.inc.php:1.31 
projects/inc/class.uiconfig.inc.php:1.32
--- projects/inc/class.uiconfig.inc.php:1.31    Tue Mar 15 01:10:42 2005
+++ projects/inc/class.uiconfig.inc.php Fri Apr  1 23:52:28 2005
@@ -178,6 +178,9 @@
                        
$GLOBALS['phpgw']->template->set_var('opt_off_desc',lang('off'));
                        
$GLOBALS['phpgw']->template->set_var('opt_weekly_desc',lang('weekly'));
                        
$GLOBALS['phpgw']->template->set_var('opt_monthly_desc',lang('monthly'));
+
+                       
$GLOBALS['phpgw']->template->set_var('lang_admins',lang('project 
administrators'));
+                       
$GLOBALS['phpgw']->template->set_var('lang_salesmen',lang('sales department'));
                }

                function display_app_header()
@@ -739,24 +742,29 @@

                        switch($action)
                        {
-                               case 'psale':           $header_info = 
lang('salesmen list'); break;
-                               case 'pmanager':        $header_info = 
lang('manager list'); break;
-                               default:                        $header_info = 
lang('administrator list'); break;
+                               case 'project_salesman':        $header_info    
        = lang('salesmen list');
+                                                                               
        $selected_salesman      = ' SELECTED';
+                                                                               
        break;
+                               default:                                        
$header_info    = lang('administrator list');
+                                                                               
        $selected_admin = ' SELECTED';
+                                                                               
        break;
                        }

                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . $header_info;
-                       $GLOBALS['phpgw']->common->phpgw_header();
-                       echo parse_navbar();
+                       $GLOBALS['phpgw']->common->phpgw_header(True);
+
                        $this->set_app_langs();

                        
$GLOBALS['phpgw']->template->set_file(array('admin_list_t' => 
'list_admin.tpl'));
                        
$GLOBALS['phpgw']->template->set_block('admin_list_t','admin_list','list');
                        
$GLOBALS['phpgw']->template->set_block('admin_list_t','group_list','glist');
+                       
$GLOBALS['phpgw']->template->set_block('admin_list_t','group_th','gth');

-                       
$GLOBALS['phpgw']->template->set_var('search_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
                        $link_data['menuaction'] = 
'projects.uiconfig.list_admins';
                        
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
+                       
$GLOBALS['phpgw']->template->set_var('selected_admin',$selected_admin);
+                       
$GLOBALS['phpgw']->template->set_var('selected_salesman',$selected_salesman);

                        $admins = $this->boconfig->list_admins($action);

@@ -781,12 +789,11 @@
                        
$GLOBALS['phpgw']->template->set_var('lang_group',lang('group'));
 // -------------------------- end header declaration 
--------------------------------------

-                       for ($i=0;$i<count($admins);$i++)
+                       for ($i=0;$i<count($admins);++$i)
                        {
                                
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
-                               $lid = $admins[$i]['lid'];

-                               if ($admins[$i]['type']=='u')
+                               if ($admins[$i]['type']=='user')
                                {
                                        
$GLOBALS['phpgw']->template->set_var(array
                                        (
@@ -796,13 +803,20 @@
                                        ));
                                        
$GLOBALS['phpgw']->template->fp('list','admin_list',True);
                                }
-                               if ($admins[$i]['type']=='g')
+                               if ($admins[$i]['type']=='group')
                                {
+                                       $group_th = True;
                                        
$GLOBALS['phpgw']->template->set_var('lid',$admins[$i]['lid']);
                                        
$GLOBALS['phpgw']->template->fp('glist','group_list',True);
                                }
                        }

+                       if($group_th)
+                       {
+                               
$GLOBALS['phpgw']->template->fp('gth','group_th',True);
+                       }
+
+                       //$GLOBALS['phpgw']->template->set_var('gth','');
                        
$GLOBALS['phpgw']->template->pfp('out','admin_list_t',True);
                        $this->save_sessiondata($action);
                }
@@ -832,14 +846,12 @@

                        switch($action)
                        {
-                               case 'psale':           $header_info = 
lang('edit salesmen list'); break;
-                               case 'pmanager':        $header_info = 
lang('edit manager list'); break;
-                               default:                        lang('edit 
administrator list'); break;
+                               case 'project_salesman':        $header_info = 
lang('edit salesmen list'); break;
+                               default:                                        
$header_info = lang('edit administrator list'); break;
                        }

                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . $header_info;
-                       $GLOBALS['phpgw']->common->phpgw_header();
-                       echo parse_navbar();
+                       $GLOBALS['phpgw']->common->phpgw_header(True);

                        $this->set_app_langs();


====================================================
Index: projects/inc/class.boconfig.inc.php
diff -u projects/inc/class.boconfig.inc.php:1.21 
projects/inc/class.boconfig.inc.php:1.22
--- projects/inc/class.boconfig.inc.php:1.21    Mon Mar 14 17:39:39 2005
+++ projects/inc/class.boconfig.inc.php Fri Apr  1 23:52:27 2005
@@ -7,7 +7,7 @@
        * Project Manager                                                   *
        * Written by Bettina Gille address@hidden                   *
        * -----------------------------------------------                   *
-       * Copyright 2000 - 2004 Free Software Foundation, Inc.              *
+       * Copyright 2000 - 2005 Free Software Foundation, Inc.              *
        *                                                                   *
        * This program is free software; you can redistribute it and/or     *
        * modify it under the terms of the GNU General Public License as    *
@@ -200,7 +200,7 @@

                function list_admins($action)
                {
-                       $admins = 
$this->boprojects->soconfig->read_admins($action,$type='');
+                       $admins = 
$this->boprojects->soconfig->read_admins($action);

                        //_debug_array($admins);

@@ -208,7 +208,7 @@

                        if(is_array($admins))
                        {
-                               foreach($admins as $ad)
+                               foreach($admins as $key => $ad)
                                {
                                        $accounts = 
CreateObject('phpgwapi.accounts',$ad['account_id']);
                                        $accounts->read_repository();
@@ -218,7 +218,7 @@
                                                'lid'                   => 
$accounts->data['account_lid'],
                                                'firstname'             => 
$accounts->data['firstname'],
                                                'lastname'              => 
$accounts->data['lastname'],
-                                               'type'                  => 
$accounts->get_type($ad['account_id'])
+                                               'type'                  => 
$ad['type']
                                        );
                                        unset($accounts);
                                }






reply via email to

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