fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8533] property: user list


From: Sigurd Nes
Subject: [Fmsystem-commits] [8533] property: user list
Date: Mon, 09 Jan 2012 09:54:11 +0000

Revision: 8533
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8533
Author:   sigurdne
Date:     2012-01-09 09:54:11 +0000 (Mon, 09 Jan 2012)
Log Message:
-----------
property: user list

Modified Paths:
--------------
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.boworkorder.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.soworkorder.inc.php
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/inc/class.uirequest.inc.php
    trunk/property/inc/class.uiworkorder.inc.php

Modified: trunk/property/inc/class.boproject.inc.php
===================================================================
--- trunk/property/inc/class.boproject.inc.php  2012-01-09 09:26:53 UTC (rev 
8532)
+++ trunk/property/inc/class.boproject.inc.php  2012-01-09 09:54:11 UTC (rev 
8533)
@@ -810,4 +810,9 @@
                {
                        return $this->so->bulk_update_status($start_date, 
$end_date, $status_filter, $status_new, $execute, $type, 
$user_id,$ids,$paid,$closed_orders);
                }
+
+               public function get_user_list()
+               {
+                       return $this->so->get_user_list();
+               }
        }

Modified: trunk/property/inc/class.boworkorder.inc.php
===================================================================
--- trunk/property/inc/class.boworkorder.inc.php        2012-01-09 09:26:53 UTC 
(rev 8532)
+++ trunk/property/inc/class.boworkorder.inc.php        2012-01-09 09:54:11 UTC 
(rev 8533)
@@ -774,4 +774,8 @@
                        $this->so->delete($workorder_id);
                }
 
+               public function get_user_list()
+               {
+                       return $this->so->get_user_list();
+               }
        }

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2012-01-09 09:26:53 UTC (rev 
8532)
+++ trunk/property/inc/class.soproject.inc.php  2012-01-09 09:54:11 UTC (rev 
8533)
@@ -1477,4 +1477,35 @@
 
                        $this->db->transaction_commit();
                }
+
+               public function get_user_list()
+               {
+                       $values = array();
+                       $users = 
$GLOBALS['phpgw']->accounts->get_list('accounts', $start=-1, $sort='ASC', 
$order='account_lastname', $query,$offset=-1);
+                       $sql = 'SELECT DISTINCT coordinator AS user_id FROM 
fm_project';
+                       $this->db->query($sql,__LINE__,__FILE__);
+
+                       $account_lastname = array();
+                       while($this->db->next_record())
+                       {
+                               $user_id        = $this->db->f('user_id');
+                               if(isset($users[$user_id]))
+                               {
+                                       $name   = 
$users[$user_id]->__toString();
+                                       $values[] = array
+                                       (
+                                               'id'    => $user_id,
+                                               'name'  => $name
+                                       );
+                                       $account_lastname[]  = $name;
+                               }
+                       }
+
+                       if($values)
+                       {
+                               array_multisort($account_lastname, SORT_ASC, 
$values);
+                       }
+
+                       return $values;
+               }
        }

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2012-01-09 09:26:53 UTC 
(rev 8532)
+++ trunk/property/inc/class.soworkorder.inc.php        2012-01-09 09:54:11 UTC 
(rev 8533)
@@ -1201,4 +1201,35 @@
                        $this->db->transaction_commit();
 
                }
+
+               public function get_user_list()
+               {
+                       $values = array();
+                       $users = 
$GLOBALS['phpgw']->accounts->get_list('accounts', $start=-1, $sort='ASC', 
$order='account_lastname', $query,$offset=-1);
+                       $sql = 'SELECT DISTINCT user_id AS user_id FROM 
fm_workorder';
+                       $this->db->query($sql,__LINE__,__FILE__);
+
+                       $account_lastname = array();
+                       while($this->db->next_record())
+                       {
+                               $user_id        = $this->db->f('user_id');
+                               if(isset($users[$user_id]))
+                               {
+                                       $name   = 
$users[$user_id]->__toString();
+                                       $values[] = array
+                                       (
+                                               'id'    => $user_id,
+                                               'name'  => $name
+                                       );
+                                       $account_lastname[]  = $name;
+                               }
+                       }
+
+                       if($values)
+                       {
+                               array_multisort($account_lastname, SORT_ASC, 
$values);
+                       }
+
+                       return $values;
+               }
        }

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2012-01-09 09:26:53 UTC (rev 
8532)
+++ trunk/property/inc/class.uiproject.inc.php  2012-01-09 09:54:11 UTC (rev 
8533)
@@ -262,7 +262,7 @@
                                $default_value = array 
('id'=>'','name'=>lang('no hour category'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[4]  = 
$this->bocommon->get_user_list_right2('filter',2,$this->user_id,$this->acl_location);
+                               $values_combo_box[4]  = 
$this->bo->get_user_list();
                                array_unshift 
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 projects')));
                                $default_value = array 
('id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[4],$default_value);

Modified: trunk/property/inc/class.uirequest.inc.php
===================================================================
--- trunk/property/inc/class.uirequest.inc.php  2012-01-09 09:26:53 UTC (rev 
8532)
+++ trunk/property/inc/class.uirequest.inc.php  2012-01-09 09:54:11 UTC (rev 
8533)
@@ -279,7 +279,7 @@
                                }
                                array_unshift ($values_combo_box[4],array 
('id'=>'','name'=> lang('condition degree')));
 
-                               $values_combo_box[5]  = 
$this->bo->get_user_list('filter',$this->filter,$extra=false,$default=false,$start=-1,$sort='ASC',$order='account_lastname',$query='',$offset=-1);
+                               $values_combo_box[5]  = 
$this->bo->get_user_list();
                                array_unshift 
($values_combo_box[5],array('user_id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>$GLOBALS['phpgw_info']['user']['fullname']));
                                $default_value = array 
('user_id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[5],$default_value);

Modified: trunk/property/inc/class.uiworkorder.inc.php
===================================================================
--- trunk/property/inc/class.uiworkorder.inc.php        2012-01-09 09:26:53 UTC 
(rev 8532)
+++ trunk/property/inc/class.uiworkorder.inc.php        2012-01-09 09:54:11 UTC 
(rev 8533)
@@ -269,7 +269,7 @@
                                $default_value = array ('id'=>'','name'=> 
lang('no hour category'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               $values_combo_box[4]  = 
$this->bocommon->get_user_list_right2('filter',2,$this->filter,$this->acl_location);
+                               $values_combo_box[4]  = 
$this->bo->get_user_list();
                                array_unshift 
($values_combo_box[4],array('id'=>$GLOBALS['phpgw_info']['user']['account_id'],'name'=>lang('mine
 orders')));
                                $default_value = array 
('id'=>'','name'=>lang('no user'));
                                array_unshift 
($values_combo_box[4],$default_value);




reply via email to

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