phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: property/inc class.boproject.inc.php, 1.11, 1.12


From: Sigurd Nes <address@hidden>
Subject: [Phpgroupware-cvs] CVS: property/inc class.boproject.inc.php, 1.11, 1.12 class.borequest.inc.php, 1.8, 1.9 class.botts.inc.php, 1.15, 1.16 class.bowo_hour.inc.php, 1.8, 1.9 class.boworkorder.inc.php, 1.11, 1.12 class.soadmin.inc.php, 1.7, 1.8 class.sob_account.inc.php, 1.2, 1.3 class.socategory.inc.php, 1.7, 1.8 class.socommon.inc.php, 1.31, 1.32 class.sodocument.inc.php, 1.11, 1.12 class.sodrawing.inc.php, 1.10, 1.11 class.soequipment.inc.php, 1.21, 1.22 class.soinvoice.inc.php, 1.30, 1.31 class.solocation.inc.php, 1.19, 1.20 class.someter.inc.php, 1.7, 1.8 class.soowner.inc.php, 1.5, 1.6 class.sopricebook.inc.php, 1.10, 1.11 class.soproject.inc.php, 1.24, 1.25 class.soreport.inc.php, 1.5, 1.6 class.sorequest.inc.php, 1.14, 1.15 class.sostandard_2.inc.php, 1.18, 1.19 class.sostandard_3.inc.php, 1.5, 1.6 class.sostandard_entity.inc.php, 1.12, 1.13 class.sotemplate.inc.php, 1.4, 1.5 class.sotenant.inc.php, 1.5, 1.6 class.sotts.inc.php, 1.23, 1.24 class.sowo_hour.inc.php, 1.10, 1.11 class.soworkorder.inc.php, 1.16, 1.17
Date: Wed, 09 Jul 2003 07:12:21 -0400

Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv31765/inc

Modified Files:
        class.boproject.inc.php class.borequest.inc.php 
        class.botts.inc.php class.bowo_hour.inc.php 
        class.boworkorder.inc.php class.soadmin.inc.php 
        class.sob_account.inc.php class.socategory.inc.php 
        class.socommon.inc.php class.sodocument.inc.php 
        class.sodrawing.inc.php class.soequipment.inc.php 
        class.soinvoice.inc.php class.solocation.inc.php 
        class.someter.inc.php class.soowner.inc.php 
        class.sopricebook.inc.php class.soproject.inc.php 
        class.soreport.inc.php class.sorequest.inc.php 
        class.sostandard_2.inc.php class.sostandard_3.inc.php 
        class.sostandard_entity.inc.php class.sotemplate.inc.php 
        class.sotenant.inc.php class.sotts.inc.php 
        class.sowo_hour.inc.php class.soworkorder.inc.php 
Log Message:
no message

Index: class.boproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boproject.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.boproject.inc.php     23 Jun 2003 12:26:43 -0000      1.11
--- class.boproject.inc.php     9 Jul 2003 11:12:16 -0000       1.12
***************
*** 61,65 ****
                                $this->query = $query;
                        }
!                       if(!empty($filter))
                        {
                                $this->filter = $filter;
--- 61,65 ----
                                $this->query = $query;
                        }
!                       if(isset($filter))
                        {
                                $this->filter = $filter;

Index: class.borequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.borequest.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.borequest.inc.php     30 Jun 2003 10:49:14 -0000      1.8
--- class.borequest.inc.php     9 Jul 2003 11:12:16 -0000       1.9
***************
*** 61,65 ****
                                $this->query = $query;
                        }
!                       if(!empty($filter))
                        {
                                $this->filter = $filter;
--- 61,65 ----
                                $this->query = $query;
                        }
!                       if(isset($filter))
                        {
                                $this->filter = $filter;

Index: class.botts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.botts.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.botts.inc.php 4 Jul 2003 09:56:25 -0000       1.15
--- class.botts.inc.php 9 Jul 2003 11:12:16 -0000       1.16
***************
*** 80,84 ****
                                $this->query = $query;
                        }
!                       if(!empty($filter))
                        {
                                $this->filter = $filter;
--- 80,84 ----
                                $this->query = $query;
                        }
!                       if(isset($filter))
                        {
                                $this->filter = $filter;

Index: class.bowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bowo_hour.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** class.bowo_hour.inc.php     23 May 2003 08:40:19 -0000      1.8
--- class.bowo_hour.inc.php     9 Jul 2003 11:12:16 -0000       1.9
***************
*** 58,62 ****
                                $this->query = $query;
                        }
!                       if(!empty($filter))
                        {
                                $this->filter = $filter;
--- 58,62 ----
                                $this->query = $query;
                        }
!                       if(isset($filter))
                        {
                                $this->filter = $filter;

Index: class.boworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.boworkorder.inc.php   21 Jun 2003 19:27:35 -0000      1.11
--- class.boworkorder.inc.php   9 Jul 2003 11:12:16 -0000       1.12
***************
*** 62,66 ****
                                $this->query = $query;
                        }
!                       if(!empty($filter))
                        {
                                $this->filter = $filter;
--- 62,66 ----
                                $this->query = $query;
                        }
!                       if(isset($filter))
                        {
                                $this->filter = $filter;

Index: class.soadmin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soadmin.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.soadmin.inc.php       1 Jul 2003 09:01:50 -0000       1.7
--- class.soadmin.inc.php       9 Jul 2003 11:12:16 -0000       1.8
***************
*** 9,13 ****
        class soadmin
        {
-               var $grants;
  
                function soadmin()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----

Index: class.sob_account.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sob_account.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.sob_account.inc.php   29 Jun 2003 15:43:11 -0000      1.2
--- class.sob_account.inc.php   9 Jul 2003 11:12:16 -0000       1.3
***************
*** 9,13 ****
        class sob_account
        {
-               var $grants;
  
                function sob_account()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                }
--- 15,18 ----

Index: class.socategory.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socategory.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.socategory.inc.php    1 Jul 2003 11:19:24 -0000       1.7
--- class.socategory.inc.php    9 Jul 2003 11:12:16 -0000       1.8
***************
*** 9,13 ****
        class socategory
        {
-               var $grants;
  
                function socategory()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----

Index: class.socommon.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.socommon.inc.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** class.socommon.inc.php      29 Jun 2003 10:12:52 -0000      1.31
--- class.socommon.inc.php      9 Jul 2003 11:12:16 -0000       1.32
***************
*** 9,13 ****
        class socommon
        {
-               var $grants;
  
                function socommon()
--- 9,12 ----

Index: class.sodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sodocument.inc.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** class.sodocument.inc.php    30 Jun 2003 10:49:14 -0000      1.11
--- class.sodocument.inc.php    9 Jul 2003 11:12:16 -0000       1.12
***************
*** 9,13 ****
        class sodocument
        {
-               var $grants;
  
                function sodocument()
--- 9,12 ----
***************
*** 144,185 ****
                                $ordermethod = ' order by 
fm_document.location_code ASC';
                        }
!                       $filtermethod = ' ( fm_document.user_id=' . 
$this->account;
!                       if (is_array($this->grants))
!                       {
!                               $grants = $this->grants;
!                               while (list($user) = each($grants))
!                               {
!                                       $public_user_list[] = $user;
!                               }
!                               reset($public_user_list);
!                               $filtermethod .= " OR 
(fm_document.access='public' OR fm_document.user_id IN(" . 
implode(',',$public_user_list) . ")))";
!                       }
!                       else
!                       {
!                               $filtermethod .= ' )';
!                       }
  
                        if ($cat_id == 'equipment'):
                        {
!                               $filtermethod .= " AND 
(fm_document.equipment_id is not NULL AND fm_document.equipment_id !='')";
                        }
                        elseif ($cat_id == 'location'):
                        {
!                               $filtermethod .= " AND ( 
fm_document.equipment_id is NULL OR fm_document.equipment_id='') ";
                        }
                        else:
                        {
!                               $filtermethod .= " AND 
fm_document.location_code is NULL ";
                        }
                        endif;
  
                        if ($equipment_type)
                        {
!                               $filtermethod .= " AND 
fm_equipment.equipment_type_id ='$equipment_type' ";
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " AND 
fm_document.user_id='$filter' ";
                        }
  
--- 143,174 ----
                                $ordermethod = ' order by 
fm_document.location_code ASC';
                        }
! 
!                       $where= 'WHERE';
  
                        if ($cat_id == 'equipment'):
                        {
!                               $filtermethod .= " $where 
(fm_document.equipment_id is not NULL AND fm_document.equipment_id !='')";
                        }
                        elseif ($cat_id == 'location'):
                        {
!                               $filtermethod .= " $where ( 
fm_document.equipment_id is NULL OR fm_document.equipment_id='') ";
                        }
                        else:
                        {
!                               $filtermethod .= " $where 
fm_document.location_code is NULL ";
                        }
                        endif;
  
+                       $where= 'AND';
+ 
+ 
                        if ($equipment_type)
                        {
!                               $filtermethod .= " $where 
fm_equipment.equipment_type_id ='$equipment_type' ";
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " $where 
fm_document.user_id='$filter' ";
                        }
  
***************
*** 189,197 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND (fm_document.address LIKE 
'%$query%' or fm_document.location_code LIKE '%$query%')";
                        }
  
  
!                       $sql .= "  WHERE $filtermethod $querymethod 
$groupmethod";
  
  //echo $sql;
--- 178,186 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_document.address 
LIKE '%$query%' or fm_document.location_code LIKE '%$query%')";
                        }
  
  
!                       $sql .= " $filtermethod $querymethod $groupmethod";
  
  //echo $sql;

Index: class.sodrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sodrawing.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.sodrawing.inc.php     29 Jun 2003 17:07:32 -0000      1.10
--- class.sodrawing.inc.php     9 Jul 2003 11:12:16 -0000       1.11
***************
*** 9,13 ****
        class sodrawing
        {
-               var $grants;
  
                function sodrawing()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon',True);
--- 15,18 ----
***************
*** 135,167 ****
                        }
  
!                       $filtermethod = ' ( fm_drawing.user_id=' . 
$this->account;
!                       if (is_array($this->grants))
!                       {
!                               $grants = $this->grants;
!                               while (list($user) = each($grants))
!                               {
!                                       $public_user_list[] = $user;
!                               }
!                               reset($public_user_list);
!                               $filtermethod .= " OR 
(fm_drawing.access='public' OR fm_drawing.user_id IN(" . 
implode(',',$public_user_list) . ")))";
!                       }
!                       else
!                       {
!                               $filtermethod .= ' )';
!                       }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_drawing.category='$cat_id' ";
                        }
  
                        if ($status_id)
                        {
!                               $filtermethod .= " AND 
fm_drawing.status='$status_id' ";
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " AND 
fm_drawing.coordinator='$filter' ";
                        }
  
--- 133,154 ----
                        }
  
!                       $where= 'WHERE';
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " $where 
fm_drawing.category='$cat_id' ";
!                               $where= 'AND';
                        }
  
                        if ($status_id)
                        {
!                               $filtermethod .= " $where 
fm_drawing.status='$status_id' ";
!                               $where= 'AND';
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " $where 
fm_drawing.coordinator='$filter' ";
!                               $where= 'AND';
                        }
  
***************
*** 171,179 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND (fm_drawing.address LIKE 
'%$query%' or fm_drawing.location_code LIKE '%$query%')";
                        }
  
  
!                       $sql .= " WHERE $filtermethod $querymethod";
  //echo $sql;
                        $this->uicols           = $this->bocommon->uicols;
--- 158,166 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_drawing.address 
LIKE '%$query%' or fm_drawing.location_code LIKE '%$query%')";
                        }
  
  
!                       $sql .= " $filtermethod $querymethod";
  //echo $sql;
                        $this->uicols           = $this->bocommon->uicols;

Index: class.soequipment.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soequipment.inc.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** class.soequipment.inc.php   30 Jun 2003 10:49:14 -0000      1.21
--- class.soequipment.inc.php   9 Jul 2003 11:12:16 -0000       1.22
***************
*** 9,13 ****
        class soequipment
        {
-               var $grants;
  
                function soequipment()
--- 9,12 ----

Index: class.soinvoice.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soinvoice.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** class.soinvoice.inc.php     2 Jul 2003 22:26:28 -0000       1.30
--- class.soinvoice.inc.php     9 Jul 2003 11:12:16 -0000       1.31
***************
*** 58,62 ****
                                $end_date               = 
(isset($data['end_date'])?$data['end_date']:'');
                                $vendor_id              = 
(isset($data['vendor_id'])?$data['vendor_id']:'');
!                               $loc1   = 
(isset($data['loc1'])?$data['loc1']:'');
                                $workorder_id   = 
(isset($data['workorder_id'])?$data['workorder_id']:'');
                                $allrows                = 
(isset($data['allrows'])?$data['allrows']:'');
--- 58,62 ----
                                $end_date               = 
(isset($data['end_date'])?$data['end_date']:'');
                                $vendor_id              = 
(isset($data['vendor_id'])?$data['vendor_id']:'');
!                               $loc1                   = 
(isset($data['loc1'])?$data['loc1']:'');
                                $workorder_id   = 
(isset($data['workorder_id'])?$data['workorder_id']:'');
                                $allrows                = 
(isset($data['allrows'])?$data['allrows']:'');

Index: class.solocation.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.solocation.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** class.solocation.inc.php    5 Jul 2003 21:41:35 -0000       1.19
--- class.solocation.inc.php    9 Jul 2003 11:12:16 -0000       1.20
***************
*** 9,13 ****
        class solocation
        {
-               var $grants;
  
                function solocation()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->soadmin_location         = 
CreateObject($this->currentapp.'.soadmin_location');
--- 15,18 ----

Index: class.someter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.someter.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** class.someter.inc.php       30 Jun 2003 10:49:14 -0000      1.7
--- class.someter.inc.php       9 Jul 2003 11:12:16 -0000       1.8
***************
*** 9,13 ****
        class someter
        {
-               var $grants;
  
                function someter()
--- 9,12 ----

Index: class.soowner.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soowner.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.soowner.inc.php       21 Jun 2003 19:27:35 -0000      1.5
--- class.soowner.inc.php       9 Jul 2003 11:12:16 -0000       1.6
***************
*** 10,14 ****
        class soowner
        {
-               var $grants;
  
                function soowner()
--- 10,13 ----

Index: class.sopricebook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sopricebook.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.sopricebook.inc.php   21 Jun 2003 19:27:35 -0000      1.10
--- class.sopricebook.inc.php   9 Jul 2003 11:12:16 -0000       1.11
***************
*** 9,13 ****
        class sopricebook
        {
-               var $grants;
  
                function sopricebook()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----
***************
*** 225,229 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('building_owner')];
                                $pricebook[] = array
                                (
--- 223,226 ----
***************
*** 241,246 ****
                                        'descr'                         => 
stripslashes($this->db->f('descr')),
                                        'base_descr'            => 
stripslashes($this->db->f('base_descr')),
!                                       'index_count'           => 
$this->db->f('index_count'),
!                                       'grants'                        => 
$ngrants
                                );
                        }
--- 238,242 ----
                                        'descr'                         => 
stripslashes($this->db->f('descr')),
                                        'base_descr'            => 
stripslashes($this->db->f('base_descr')),
!                                       'index_count'           => 
$this->db->f('index_count')
                                );
                        }
***************
*** 310,314 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('building_owner')];
                                $agreement[] = array
                                (
--- 306,309 ----
***************
*** 316,321 ****
                                        'num'                           => 
$this->db->f('num'),
                                        'status'                        => 
$this->db->f('status'),
!                                       'descr'                         => 
stripslashes($this->db->f('descr')),
!                                       'grants'                        => 
$ngrants
                                );
                        }
--- 311,315 ----
                                        'num'                           => 
$this->db->f('num'),
                                        'status'                        => 
$this->db->f('status'),
!                                       'descr'                         => 
stripslashes($this->db->f('descr'))
                                );
                        }
***************
*** 401,405 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('building_owner')];
                                $pricebook[] = array
                                (
--- 395,398 ----
***************
*** 410,415 ****
                                        'w_cost'                        => 
$this->db->f('w_cost'),
                                        'total_cost'            => 
$this->db->f('total_cost'),
!                                       'date'                          => 
$this->db->f('date'),
!                                       'grants'                        => 
$ngrants
                                );
                        }
--- 403,407 ----
                                        'w_cost'                        => 
$this->db->f('w_cost'),
                                        'total_cost'            => 
$this->db->f('total_cost'),
!                                       'date'                          => 
$this->db->f('date')
                                );
                        }
***************
*** 482,486 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('building_owner')];
                                $pricebook[] = array
                                (
--- 474,477 ----
***************
*** 492,497 ****
                                        'ns3420'                => 
$this->db->f('ns3420'),
                                        'unit'                  => 
$this->db->f('unit'),
!                                       'descr'                 => 
stripslashes($this->db->f('descr')),
!                                       'grants'                => $ngrants
                                );
                        }
--- 483,487 ----
                                        'ns3420'                => 
$this->db->f('ns3420'),
                                        'unit'                  => 
$this->db->f('unit'),
!                                       'descr'                 => 
stripslashes($this->db->f('descr'))
                                );
                        }
***************
*** 565,569 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('building_owner')];
                                $pricebook[] = array
                                (
--- 555,558 ----
***************
*** 572,577 ****
                                        'branch'                => 
$this->db->f('branch'),
                                        'vendor_name'   => 
$this->db->f('org_name'),
!                                       'vendor_id'             => 
$this->db->f('vendor_id'),
!                                       'grants'                => $ngrants
                                );
                        }
--- 561,565 ----
                                        'branch'                => 
$this->db->f('branch'),
                                        'vendor_name'   => 
$this->db->f('org_name'),
!                                       'vendor_id'             => 
$this->db->f('vendor_id')
                                );
                        }

Index: class.soproject.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soproject.inc.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** class.soproject.inc.php     26 Jun 2003 09:02:06 -0000      1.24
--- class.soproject.inc.php     9 Jul 2003 11:12:17 -0000       1.25
***************
*** 9,13 ****
        class soproject
        {
-               var $grants;
  
                function soproject()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
--- 15,18 ----
***************
*** 157,189 ****
                        }
  
!                       $filtermethod = ' ( fm_project.user_id=' . 
$this->account;
!                       if (is_array($this->grants))
!                       {
!                               $grants = $this->grants;
!                               while (list($user) = each($grants))
!                               {
!                                       $public_user_list[] = $user;
!                               }
!                               reset($public_user_list);
!                               $filtermethod .= " OR 
(fm_project.access='public' OR fm_project.user_id IN(" . 
implode(',',$public_user_list) . ")))";
!                       }
!                       else
!                       {
!                               $filtermethod .= ' )';
!                       }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_project.category='$cat_id' ";
                        }
  
                        if ($status_id)
                        {
!                               $filtermethod .= " AND 
fm_project.status='$status_id' ";
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " AND 
fm_project.coordinator='$filter' ";
                        }
  
--- 155,176 ----
                        }
  
!                       $where= 'WHERE';
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " $where 
fm_project.category='$cat_id' ";
!                               $where= 'AND';
                        }
  
                        if ($status_id)
                        {
!                               $filtermethod .= " $where 
fm_project.status='$status_id' ";
!                               $where= 'AND';
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " $where 
fm_project.coordinator='$filter' ";
!                               $where= 'AND';
                        }
  
***************
*** 193,200 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND (fm_project.name LIKE 
'%$query%' or fm_project.address LIKE '%$query%' or fm_project.location_code 
LIKE '%$query%')";
                        }
  
!                       $sql .= " WHERE $filtermethod $querymethod";
  //echo $sql;
                        $this->uicols           = $this->bocommon->uicols;
--- 180,187 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_project.name LIKE 
'%$query%' or fm_project.address LIKE '%$query%' or fm_project.location_code 
LIKE '%$query%')";
                        }
  
!                       $sql .= " $filtermethod $querymethod";
  //echo $sql;
                        $this->uicols           = $this->bocommon->uicols;

Index: class.soreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soreport.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.soreport.inc.php      26 Jun 2003 09:02:06 -0000      1.5
--- class.soreport.inc.php      9 Jul 2003 11:12:17 -0000       1.6
***************
*** 9,13 ****
        class soreport
        {
-               var $grants;
  
                function soreport()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
--- 15,18 ----

Index: class.sorequest.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sorequest.inc.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** class.sorequest.inc.php     24 Jun 2003 13:07:40 -0000      1.14
--- class.sorequest.inc.php     9 Jul 2003 11:12:17 -0000       1.15
***************
*** 9,13 ****
        class sorequest
        {
-               var $grants;
  
                function sorequest()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->soproject        = 
CreateObject($this->currentapp.'.soproject');
--- 15,18 ----

Index: class.sostandard_2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_2.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.sostandard_2.inc.php  21 Jun 2003 19:27:35 -0000      1.18
--- class.sostandard_2.inc.php  9 Jul 2003 11:12:17 -0000       1.19
***************
*** 9,13 ****
        class sostandard_2
        {
-               var $grants;
  
                function sostandard_2()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db               = $GLOBALS['phpgw']->db;
                        $this->db2              = $this->db;
-                       $this->grants   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----

Index: class.sostandard_3.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_3.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.sostandard_3.inc.php  21 Jun 2003 19:27:35 -0000      1.5
--- class.sostandard_3.inc.php  9 Jul 2003 11:12:17 -0000       1.6
***************
*** 9,13 ****
        class sostandard_3
        {
-               var $grants;
  
                function sostandard_3()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----

Index: class.sostandard_entity.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sostandard_entity.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** class.sostandard_entity.inc.php     28 Jun 2003 17:57:57 -0000      1.12
--- class.sostandard_entity.inc.php     9 Jul 2003 11:12:17 -0000       1.13
***************
*** 9,13 ****
        class sostandard_entity
        {
-               var $grants;
  
                function sostandard_entity()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----

Index: class.sotemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotemplate.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.sotemplate.inc.php    21 Jun 2003 19:27:35 -0000      1.4
--- class.sotemplate.inc.php    9 Jul 2003 11:12:17 -0000       1.5
***************
*** 9,13 ****
        class sotemplate
        {
-               var $grants;
  
                function sotemplate()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->socommon         = 
CreateObject($this->currentapp.'.socommon');
--- 15,18 ----
***************
*** 54,82 ****
                        }
  
!                       $filtermethod = ' ( fm_template.owner=' . 
$this->account;
!                       if (is_array($this->grants))
!                       {
!                               $grants = $this->grants;
!                               while (list($user) = each($grants))
!                               {
!                                       $public_user_list[] = $user;
!                               }
!                               reset($public_user_list);
!                               $filtermethod .= " OR ( fm_template.owner IN(" 
. implode(',',$public_user_list) . ")))";
!                       }
!                       else
!                       {
!                               $filtermethod .= ' )';
!                       }
! 
  
                        if ($chapter_id > 0)
                        {
!                               $filtermethod .= " AND chapter_id='$chapter_id' 
";
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " AND 
fm_template.owner='$filter' ";
                        }
  
--- 52,67 ----
                        }
  
!                       $where= 'WHERE';
  
                        if ($chapter_id > 0)
                        {
!                               $filtermethod .= " $where 
chapter_id='$chapter_id' ";
!                               $where= 'AND';
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " $where 
fm_template.owner='$filter' ";
!                               $where= 'AND';
                        }
  
***************
*** 87,96 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND (fm_template.descr LIKE 
'%$query%')";
                        }
  
                        $sql = "SELECT 
fm_template.id,fm_template.descr,fm_template.name,fm_template.owner,fm_template.entry_date,"
                         . " fm_chapter.descr as chapter  FROM fm_template 
$this->join fm_chapter  on fm_template.chapter_id=fm_chapter.id"
!                        . " WHERE $filtermethod $querymethod";
  
                        $this->db2->query($sql,__LINE__,__FILE__);
--- 72,81 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_template.descr LIKE 
'%$query%')";
                        }
  
                        $sql = "SELECT 
fm_template.id,fm_template.descr,fm_template.name,fm_template.owner,fm_template.entry_date,"
                         . " fm_chapter.descr as chapter  FROM fm_template 
$this->join fm_chapter  on fm_template.chapter_id=fm_chapter.id"
!                        . " $filtermethod $querymethod";
  
                        $this->db2->query($sql,__LINE__,__FILE__);
***************
*** 108,112 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('fm_workorder.owner')];
                                $template_list[] = array
                                (
--- 93,96 ----
***************
*** 116,121 ****
                                        'owner'                         => 
$this->db->f('owner'),
                                        'entry_date'            => 
$this->db->f('entry_date'),
!                                       'chapter'                       => 
$this->db->f('chapter'),
!                                       'grants'                        => 
$ngrants
                                        );
                        }
--- 100,104 ----
                                        'owner'                         => 
$this->db->f('owner'),
                                        'entry_date'            => 
$this->db->f('entry_date'),
!                                       'chapter'                       => 
$this->db->f('chapter')
                                        );
                        }
***************
*** 180,184 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('fm_workorder.owner')];
                                $hour_list[] = array
                                (
--- 163,166 ----
***************
*** 198,203 ****
                                        'billperae'                     => 
$this->db->f('billperae'),
                                        'building_part'         => 
$this->db->f('building_part'),
!                                       'dim_d'                         => 
$this->db->f('dim_d'),
!                                       'grants'                        => 
$ngrants
                                        );
                        }
--- 180,184 ----
                                        'billperae'                     => 
$this->db->f('billperae'),
                                        'building_part'         => 
$this->db->f('building_part'),
!                                       'dim_d'                         => 
$this->db->f('dim_d')
                                        );
                        }

Index: class.sotenant.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotenant.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.sotenant.inc.php      1 Jul 2003 11:19:24 -0000       1.5
--- class.sotenant.inc.php      9 Jul 2003 11:12:17 -0000       1.6
***************
*** 10,14 ****
        class sotenant
        {
-               var $grants;
  
                function sotenant()
--- 10,13 ----

Index: class.sotts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sotts.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** class.sotts.inc.php 4 Jul 2003 09:56:25 -0000       1.23
--- class.sotts.inc.php 9 Jul 2003 11:12:17 -0000       1.24
***************
*** 9,13 ****
        class sotts
        {
-               var $grants;
  
                function sotts()
--- 9,12 ----
***************
*** 78,113 ****
                        }
  
!                       if ($filter == 'open')
!                       {
!                               $filtermethod = " status='O'";
!                               $where = 'AND';
  
!                       }
!                       elseif ($filter == 'closed')
                        {
!                               $filtermethod = " status='X'";
!                               $where = 'AND';
                        }
! 
!                       $filtermethod .= " $where ( user_id= $this->account";
! 
!                       if (is_array($this->grants))
                        {
!                               $grants = $this->grants;
!                               while (list($user) = each($grants))
!                               {
!                                       $public_user_list[] = $user;
!                               }
!                               reset($public_user_list);
!                               $filtermethod .= "  AND user_id IN(" . 
implode(',',$public_user_list) . "))";
                        }
!                       else
                        {
!                                       $filtermethod .= ' )';
                        }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND cat_id='$cat_id' ";
                        }
  
--- 77,102 ----
                        }
  
!                       $where= 'WHERE';
  
!                       if ($filter == 'all'):
                        {
!                               $where= 'WHERE';
                        }
!                       elseif ($filter == 'closed'):
                        {
!                               $filtermethod = " $where status='X'";
!                               $where = 'AND';
                        }
!                       else: // open
                        {
!                               $filtermethod = " $where status='O'";
!                               $where = 'AND';
                        }
+                       endif;
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " $where cat_id='$cat_id' ";
!                               $where = 'AND';
                        }
  
***************
*** 117,124 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND (subject LIKE '%$query%' 
or address LIKE '%$query%' or location_code LIKE '%$query%')";
                        }
  
!                       $sql = "SELECT * FROM fm_tts_tickets WHERE 
$filtermethod $querymethod";
  
  //echo $sql;
--- 106,113 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (subject LIKE 
'%$query%' or address LIKE '%$query%' or location_code LIKE '%$query%')";
                        }
  
!                       $sql = "SELECT * FROM fm_tts_tickets $filtermethod 
$querymethod";
  
  //echo $sql;

Index: class.sowo_hour.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.sowo_hour.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** class.sowo_hour.inc.php     21 Jun 2003 19:27:35 -0000      1.10
--- class.sowo_hour.inc.php     9 Jul 2003 11:12:17 -0000       1.11
***************
*** 9,13 ****
        class sowo_hour
        {
-               var $grants;
  
                function sowo_hour()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                               = 
$GLOBALS['phpgw']->db;
                        $this->db2                              = $this->db;
-                       $this->grants                   = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account                  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->soworkorder              = 
CreateObject($this->currentapp.'.soworkorder');
--- 15,18 ----
***************
*** 101,105 ****
                        while ($this->db->next_record())
                        {
-                               $ngrants = 
(int)$this->grants[$this->db->f('fm_workorder.owner')];
                                $hour_list[] = array
                                (
--- 99,102 ----
***************
*** 120,125 ****
                                        'remark'                        => 
$this->db->f('remark'),
                                        'building_part'         => 
$this->db->f('building_part'),
!                                       'dim_d'                         => 
$this->db->f('dim_d'),
!                                       'grants'                        => 
$ngrants
                                        );
                        }
--- 117,121 ----
                                        'remark'                        => 
$this->db->f('remark'),
                                        'building_part'         => 
$this->db->f('building_part'),
!                                       'dim_d'                         => 
$this->db->f('dim_d')
                                        );
                        }

Index: class.soworkorder.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.soworkorder.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** class.soworkorder.inc.php   21 Jun 2003 19:27:35 -0000      1.16
--- class.soworkorder.inc.php   9 Jul 2003 11:12:17 -0000       1.17
***************
*** 9,13 ****
        class soworkorder
        {
-               var $grants;
  
                function soworkorder()
--- 9,12 ----
***************
*** 16,20 ****
                        $this->db                       = $GLOBALS['phpgw']->db;
                        $this->db2                      = $this->db;
-                       $this->grants           = 
$GLOBALS['phpgw']->acl->get_grants($this->currentapp);
                        $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
--- 15,18 ----
***************
*** 182,214 ****
                        }
  
!                       $filtermethod = ' ( fm_workorder.user_id=' . 
$this->account;
!                       if (is_array($this->grants))
!                       {
!                               $grants = $this->grants;
!                               while (list($user) = each($grants))
!                               {
!                                       $public_user_list[] = $user;
!                               }
!                               reset($public_user_list);
!                               $filtermethod .= " OR 
(fm_workorder.access='public' OR fm_workorder.user_id IN(" . 
implode(',',$public_user_list) . ")))";
!                       }
!                       else
!                       {
!                               $filtermethod .= ' )';
!                       }
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " AND 
fm_workorder.category='$cat_id' ";
                        }
  
                        if ($status_id)
                        {
!                               $filtermethod .= " AND 
fm_workorder.status='$status_id' ";
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " AND 
fm_workorder.user_id='$filter' ";
                        }
  
--- 180,201 ----
                        }
  
!                       $where= 'WHERE';
  
                        if ($cat_id > 0)
                        {
!                               $filtermethod .= " $where 
fm_workorder.category='$cat_id' ";
!                               $where= 'AND';
                        }
  
                        if ($status_id)
                        {
!                               $filtermethod .= " $where 
fm_workorder.status='$status_id' ";
!                               $where= 'AND';
                        }
  
                        if ($filter)
                        {
!                               $filtermethod .= " $where 
fm_workorder.user_id='$filter' ";
!                               $where= 'AND';
                        }
  
***************
*** 218,225 ****
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " AND (fm_workorder.title LIKE 
'%$query%' or fm_workorder.descr LIKE '%$query%' or fm_project.address LIKE 
'%$query%' or fm_project.location_code LIKE '%$query%')";
                        }
  
!                       $sql .= " WHERE $filtermethod $querymethod";
  //echo $sql;
                        $this->uicols           = $this->bocommon->uicols;
--- 205,212 ----
                                $query = ereg_replace('"','',$query);
  
!                               $querymethod = " $where (fm_workorder.title 
LIKE '%$query%' or fm_workorder.descr LIKE '%$query%' or fm_project.address 
LIKE '%$query%' or fm_project.location_code LIKE '%$query%')";
                        }
  
!                       $sql .= " $filtermethod $querymethod";
  //echo $sql;
                        $this->uicols           = $this->bocommon->uicols;





reply via email to

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