phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.bobilling.inc.php, 1.8.4.1, 1.8.4.


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] projects/inc class.bobilling.inc.php, 1.8.4.1, 1.8.4.2 class.bodeliveries.inc.php, 1.15.4.2, 1.15.4.3 class.boprojects.inc.php, 1.42.2.5.2.36, 1.42.2.5.2.37 class.sobilling.inc.php, 1.11.2.1.2.4, 1.11.2.1.2.5 class.sodeliveries.inc.php, 1.15.2.1.2.3, 1.15.2.1.2.4 class.uibilling.inc.php, 1.18.2.6.2.8, 1.18.2.6.2.9 class.uiprojects.inc.php, 1.47.2.7.2.38, 1.47.2.7.2.39 hook_admin.inc.php, 1.6.2.1, 1.6.2.1.2.1
Date: Thu, 23 Oct 2003 11:16:37 +0000

Update of /cvsroot/phpgroupware/projects/inc
In directory subversions:/tmp/cvs-serv32137/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.bobilling.inc.php class.bodeliveries.inc.php 
        class.boprojects.inc.php class.sobilling.inc.php 
        class.sodeliveries.inc.php class.uibilling.inc.php 
        class.uiprojects.inc.php hook_admin.inc.php 
Log Message:
bugfixes

Index: hook_admin.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/hook_admin.inc.php,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.1.2.1
diff -C2 -d -r1.6.2.1 -r1.6.2.1.2.1
*** hook_admin.inc.php  13 Mar 2002 21:32:20 -0000      1.6.2.1
--- hook_admin.inc.php  23 Oct 2003 11:16:34 -0000      1.6.2.1.2.1
***************
*** 15,21 ****
                $file = Array
                (
!                       'Administration'        => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pad'),
!                       'Accountancy'           => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pbo'),
!                       'Global Categories'     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname)
                );
  //Do not modify below this line
--- 15,22 ----
                $file = Array
                (
!                       'Site Configuration'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' 
. $appname),
!                       'Administration'                => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pad'),
!                       'Accountancy'                   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_admins&action=pbo'),
!                       'Global Categories'             => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index&appname='
 . $appname)
                );
  //Do not modify below this line

Index: class.uiprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.47.2.7.2.38
retrieving revision 1.47.2.7.2.39
diff -C2 -d -r1.47.2.7.2.38 -r1.47.2.7.2.39
*** class.uiprojects.inc.php    23 Sep 2003 23:41:23 -0000      1.47.2.7.2.38
--- class.uiprojects.inc.php    23 Oct 2003 11:16:34 -0000      1.47.2.7.2.39
***************
*** 290,298 ****
  
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
!                       
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
-                       
$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)));
-                       
$GLOBALS['phpgw']->template->set_var('status_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($this->status));
  
--- 290,297 ----
  
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
!                       
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
! 
                        
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
                        
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($this->status));
  

Index: class.boprojects.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.42.2.5.2.36
retrieving revision 1.42.2.5.2.37
diff -C2 -d -r1.42.2.5.2.36 -r1.42.2.5.2.37
*** class.boprojects.inc.php    21 Oct 2003 12:06:24 -0000      1.42.2.5.2.36
--- class.boprojects.inc.php    23 Oct 2003 11:16:34 -0000      1.42.2.5.2.37
***************
*** 999,1002 ****
--- 999,1014 ----
  
                }
+ 
+               function get_site_config()
+               {
+                       $this->config = 
CreateObject('phpgwapi.config','projects');
+                       $this->config->read_repository();
+ 
+                       if ($this->config->config_data)
+                       {
+                               $items = $this->config->config_data;
+                       }
+                       return $items;
+               }
        }
  ?>

Index: class.bodeliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.bodeliveries.inc.php,v
retrieving revision 1.15.4.2
retrieving revision 1.15.4.3
diff -C2 -d -r1.15.4.2 -r1.15.4.3
*** class.bodeliveries.inc.php  20 Jun 2003 22:04:32 -0000      1.15.4.2
--- class.bodeliveries.inc.php  23 Oct 2003 11:16:34 -0000      1.15.4.3
***************
*** 47,50 ****
--- 47,51 ----
                        $this->soprojects       = 
CreateObject('projects.soprojects');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
+                       $this->boprojects       = 
CreateObject('projects.boprojects');
                }
  
***************
*** 67,73 ****
                }
  
                function read_deliveries($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $del = $this->sodeliveries->read_deliveries($start, 
$query, $sort, $order, $limit, $project_id);
                        $this->total_records = 
$this->sodeliveries->total_records;
                        return $del;
--- 68,86 ----
                }
  
+               function get_site_config()
+               {
+                       return $this->boprojects->get_site_config();
+               }
+ 
                function read_deliveries($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $co = $this->get_site_config();
! 
!                       if($co['invoice_acl'] == 'yes')
!                       {
!                               $owner = True;
!                       }
! 
!                       $del = $this->sodeliveries->read_deliveries($start, 
$query, $sort, $order, $limit, $project_id, $owner = False);
                        $this->total_records = 
$this->sodeliveries->total_records;
                        return $del;

Index: class.bobilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.bobilling.inc.php,v
retrieving revision 1.8.4.1
retrieving revision 1.8.4.2
diff -C2 -d -r1.8.4.1 -r1.8.4.2
*** class.bobilling.inc.php     20 Jun 2003 22:04:32 -0000      1.8.4.1
--- class.bobilling.inc.php     23 Oct 2003 11:16:33 -0000      1.8.4.2
***************
*** 46,54 ****
                        $this->soprojects       = 
CreateObject('projects.soprojects');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
                }
  
                function read_invoices($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $bill = $this->sobilling->read_invoices($start, $query, 
$sort, $order, $limit, $project_id);
                        $this->total_records = $this->sobilling->total_records;
                        return $bill;
--- 46,67 ----
                        $this->soprojects       = 
CreateObject('projects.soprojects');
                        $this->contacts         = 
CreateObject('phpgwapi.contacts');
+                       $this->boprojects       = 
CreateObject('projects.boprojects');
+               }
+ 
+               function get_site_config()
+               {
+                       return $this->boprojects->get_site_config();
                }
  
                function read_invoices($start, $query, $sort, $order, $limit, 
$project_id)
                {
!                       $co = $this->get_site_config();
! 
!                       if($co['invoice_acl'] == 'yes')
!                       {
!                               $owner = True;
!                       }
! 
!                       $bill = $this->sobilling->read_invoices($start, $query, 
$sort, $order, $limit, $project_id, $owner = False);
                        $this->total_records = $this->sobilling->total_records;
                        return $bill;

Index: class.sodeliveries.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.sodeliveries.inc.php,v
retrieving revision 1.15.2.1.2.3
retrieving revision 1.15.2.1.2.4
diff -C2 -d -r1.15.2.1.2.3 -r1.15.2.1.2.4
*** class.sodeliveries.inc.php  20 Jun 2003 22:04:32 -0000      1.15.2.1.2.3
--- class.sodeliveries.inc.php  23 Oct 2003 11:16:34 -0000      1.15.2.1.2.4
***************
*** 33,38 ****
                function sodeliveries()
                {
!                       $this->db                       = $GLOBALS['phpgw']->db;
!                       $this->db2                      = $this->db;
                }
  
--- 33,39 ----
                function sodeliveries()
                {
!                       $this->db               = $GLOBALS['phpgw']->db;
!                       $this->db2              = $this->db;
!                       $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                }
  
***************
*** 52,57 ****
                {
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("INSERT INTO phpgw_p_delivery 
(num,project_id,date,customer) VALUES ('" . $values['delivery_num'] . "',"
!                                                       . 
intval($values['project_id']) . ',' . time() . ',' . 
intval($values['customer']) . ')',__LINE__,__FILE__);
  
                        $this->db2->query("SELECT id from phpgw_p_delivery 
WHERE num='" . $values['delivery_num'] . "'",__LINE__,__FILE__);
--- 53,58 ----
                {
                        $values['delivery_num'] = 
$this->db->db_addslashes($values['delivery_num']);
!                       $this->db->query("INSERT INTO phpgw_p_delivery 
(num,project_id,date,customer,owner) VALUES ('" . $values['delivery_num'] . "',"
!                                                       . 
intval($values['project_id']) . ',' . time() . ',' . 
intval($values['customer']) . ',' . $this->account . ')',__LINE__,__FILE__);
  
                        $this->db2->query("SELECT id from phpgw_p_delivery 
WHERE num='" . $values['delivery_num'] . "'",__LINE__,__FILE__);
***************
*** 159,163 ****
  
  
!               function read_deliveries($start, $query = '', $sort = '', 
$order = '', $limit = True, $project_id = '')
                {
                        $project_id = intval($project_id);
--- 160,164 ----
  
  
!               function read_deliveries($start, $query = '', $sort = '', 
$order = '', $limit = True, $project_id = '', $owner = False)
                {
                        $project_id = intval($project_id);
***************
*** 177,180 ****
--- 178,186 ----
                        }
  
+                       if ($owner)
+                       {
+                               $acl_select = ' AND owner=' . $this->account;
+                       }
+ 
                        if ($project_id)
                        {
***************
*** 190,203 ****
                        }
  
!                       $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql . 
$querymethod,__LINE__,__FILE__);
                        }
  
--- 196,209 ----
                        }
  
!                       $this->db2->query($sql . $acl_select,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql . $acl_select . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql . $acl_select . 
$querymethod,__LINE__,__FILE__);
                        }
  

Index: class.sobilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.sobilling.inc.php,v
retrieving revision 1.11.2.1.2.4
retrieving revision 1.11.2.1.2.5
diff -C2 -d -r1.11.2.1.2.4 -r1.11.2.1.2.5
*** class.sobilling.inc.php     20 Jun 2003 22:04:32 -0000      1.11.2.1.2.4
--- class.sobilling.inc.php     23 Oct 2003 11:16:34 -0000      1.11.2.1.2.5
***************
*** 34,39 ****
                function sobilling()
                {
!                       $this->db       = $GLOBALS['phpgw']->db;
!                       $this->db2      = $this->db;
                }
  
--- 34,40 ----
                function sobilling()
                {
!                       $this->db               = $GLOBALS['phpgw']->db;
!                       $this->db2              = $this->db;
!                       $this->account  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                }
  
***************
*** 50,54 ****
                }
  
!               function read_invoices($start, $query = '', $sort = '', $order 
= '', $limit = True, $project_id = '')
                {
                        $project_id = intval($project_id);
--- 51,55 ----
                }
  
!               function read_invoices($start, $query = '', $sort = '', $order 
= '', $limit = True, $project_id = '', $owner = False)
                {
                        $project_id = intval($project_id);
***************
*** 68,71 ****
--- 69,77 ----
                        }
  
+                       if ($owner)
+                       {
+                               $acl_select = ' AND owner=' . $this->account;
+                       }
+ 
                        if ($project_id)
                        {
***************
*** 80,93 ****
                        }
  
!                       $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql . 
$querymethod,__LINE__,__FILE__);
                        }
  
--- 86,99 ----
                        }
  
!                       $this->db2->query($sql. $acl_select,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
  
                        if ($limit)
                        {
!                               $this->db->limit_query($sql . $acl_select . 
$querymethod,$start,__LINE__,__FILE__);
                        }
                        else
                        {
!                               $this->db->query($sql . $acl_select . 
$querymethod,__LINE__,__FILE__);
                        }
  
***************
*** 134,139 ****
                {
                        $values['invoice_num'] = 
$this->db->db_addslashes($values['invoice_num']);
!                       $this->db->query("INSERT INTO phpgw_p_invoice 
(num,sum,project_id,customer,date) VALUES ('" . $values['invoice_num'] . "',0,"
!                                                       . 
intval($values['project_id']) . ',' . intval($values['customer']) . ',' . 
intval($values['date']) . ')',__LINE__,__FILE__);
  
                        $this->db2->query("SELECT id from phpgw_p_invoice WHERE 
num='" . $values['invoice_num'] . "'",__LINE__,__FILE__);
--- 140,145 ----
                {
                        $values['invoice_num'] = 
$this->db->db_addslashes($values['invoice_num']);
!                       $this->db->query("INSERT INTO phpgw_p_invoice 
(num,sum,project_id,customer,date,owner) VALUES ('" . $values['invoice_num'] . 
"',0,"
!                                                       . 
intval($values['project_id']) . ',' . intval($values['customer']) . ',' . 
intval($values['date']) . ',' . $this->account),__LINE__,__FILE__);
  
                        $this->db2->query("SELECT id from phpgw_p_invoice WHERE 
num='" . $values['invoice_num'] . "'",__LINE__,__FILE__);

Index: class.uibilling.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/projects/inc/class.uibilling.inc.php,v
retrieving revision 1.18.2.6.2.8
retrieving revision 1.18.2.6.2.9
diff -C2 -d -r1.18.2.6.2.8 -r1.18.2.6.2.9
*** class.uibilling.inc.php     1 Oct 2003 20:28:58 -0000       1.18.2.6.2.8
--- class.uibilling.inc.php     23 Oct 2003 11:16:34 -0000      1.18.2.6.2.9
***************
*** 247,253 ****
  
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
!                       
$GLOBALS['phpgw']->template->set_var('filter_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
                        
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
-                       
$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)));
  
--- 247,253 ----
  
                        
$GLOBALS['phpgw']->template->set_var('action_list',$action_list);
!                       
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
! 
                        
$GLOBALS['phpgw']->template->set_var('filter_list',$this->nextmatchs->new_filter($this->filter));
                        
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
  





reply via email to

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