[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] projects/inc class.boprojecthours.inc.php class...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] projects/inc class.boprojecthours.inc.php class... |
Date: |
Sun, 26 Nov 2006 14:14:26 +0000 |
CVSROOT: /sources/phpgroupware
Module name: projects
Changes by: Sigurd Nes <sigurdne> 06/11/26 14:14:26
Modified files:
inc : class.boprojecthours.inc.php
class.boprojects.inc.php class.soconfig.inc.php
class.soprojecthours.inc.php
class.soprojects.inc.php
class.uiprojecthours.inc.php
class.uiprojects.inc.php
class.uiprojects_base.inc.php
Log message:
notice and link
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojecthours.inc.php?cvsroot=phpgroupware&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojects.inc.php?cvsroot=phpgroupware&r1=1.162&r2=1.163
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soconfig.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soprojecthours.inc.php?cvsroot=phpgroupware&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soprojects.inc.php?cvsroot=phpgroupware&r1=1.114&r2=1.115
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojecthours.inc.php?cvsroot=phpgroupware&r1=1.87&r2=1.88
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojects.inc.php?cvsroot=phpgroupware&r1=1.165&r2=1.166
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojects_base.inc.php?cvsroot=phpgroupware&r1=1.16&r2=1.17
Patches:
Index: class.boprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- class.boprojecthours.inc.php 25 Nov 2006 15:50:00 -0000 1.38
+++ class.boprojecthours.inc.php 26 Nov 2006 14:14:26 -0000 1.39
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.boprojecthours.inc.php,v 1.38 2006/11/25 15:50:00
sigurdne Exp $
+ * @version $Id: class.boprojecthours.inc.php,v 1.39 2006/11/26 14:14:26
sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v $
*/
@@ -87,7 +87,8 @@
function edit_perms($pro)
{
- $pro['action'] =
isset($pro['action'])?$pro['action']:'edit';
+ $pro['action'] =
(isset($pro['action'])?$pro['action']:'edit');
+ $pro['booked'] =
(isset($pro['booked'])?$pro['booked']:'');
switch($pro['action'])
{
@@ -97,7 +98,7 @@
if (($pro['status'] != 'billed') && ($pro['status'] !=
'closed') && ($pro['booked'] != 'Y'))
{
- if ($pro['employee'] == $this->account &&
!$pro['adminonly'])
+ if (isset($pro['employee']) && $pro['employee']
== $this->account && !$pro['adminonly'])
{
return True;
}
Index: class.boprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.162
retrieving revision 1.163
diff -u -b -r1.162 -r1.163
--- class.boprojects.inc.php 25 Nov 2006 23:12:10 -0000 1.162
+++ class.boprojects.inc.php 26 Nov 2006 14:14:26 -0000 1.163
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.boprojects.inc.php,v 1.162 2006/11/25 23:12:10
sigurdne Exp $
+ * @version $Id: class.boprojects.inc.php,v 1.163 2006/11/26 14:14:26
sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.boprojects.inc.php,v $
*/
@@ -23,6 +23,7 @@
var $html_output;
var $bohours;
var $project_id;
+ var $limit;
var $public_functions = array
(
@@ -234,13 +235,13 @@
switch($pro['action'])
{
case 'subs':
- if($pro['main_co'])
+ if(isset($pro['main_co']) &&
$pro['main_co'])
{
$main_co = $pro['main_co'];
}
else
{
- if($pro['project_id'] &&
!$pro['main'])
+ if(isset($pro['project_id']) &&
$pro['project_id'] && !$pro['main'])
{
$pro['main'] =
$this->soprojects->return_value('main',$pro['project_id']);
}
@@ -307,17 +308,17 @@
}
break;
case 'subs':
-
if($this->check_perms($this->grants[$pro['coordinator']],PHPGW_ACL_ADD) ||
$pro['coordinator'] == $this->account)
+
if(isset($this->grants[$pro['coordinator']]) &&
($this->check_perms($this->grants[$pro['coordinator']],PHPGW_ACL_ADD) ||
$pro['coordinator'] == $this->account))
{
return True;
}
//$main_co =
$this->soprojects->return_value('co',$pro['main']);
-
if($this->check_perms($this->grants[$pro['main_co']],PHPGW_ACL_ADD) ||
$pro['main_co'] == $this->account)
+ if(isset($pro['main_co']) &&
($this->check_perms($this->grants[$pro['main_co']],PHPGW_ACL_ADD) ||
$pro['main_co'] == $this->account))
{
return True;
}
$parent_co =
$this->soprojects->return_value('co',$pro['parent']);
-
if($this->check_perms($this->grants[$parent_co],PHPGW_ACL_ADD) || $parent_co ==
$this->account)
+ if(isset($this->grants[$parent_co]) &&
($this->check_perms($this->grants[$parent_co],PHPGW_ACL_ADD) || $parent_co ==
$this->account))
{
return True;
}
@@ -423,18 +424,19 @@
return False; */
- while(!count($empl) && $project_id)
+ while((!isset($empl) || !count($empl))>0 && $project_id)
{
$myproject =
$this->soprojects->read_single_project($project_id);
$empl =
$GLOBALS['phpgw']->acl->get_ids_for_location($project_id, 7, 'project_members');
- if(!count($empl) || $empl[0] == '')
+ // if(!count($empl) || $empl[0] == '')
+ if(!isset($empl) || !count($empl)>0 || $empl[0]
== '')
{
$empl = null;
$project_id = $myproject['parent'];
}
}
- if(count($empl))
+ if(isset($empl) && count($empl)>0)
{
return $empl;
}
@@ -486,7 +488,7 @@
}
}
}
- if(is_array($emp))
+ if(isset($emp) && is_array($emp))
{
$emps = array();
$emps = $emp;
@@ -662,7 +664,7 @@
}
else
{
- if(!$params['billable'])
+ if(!isset($params['billable']) ||
!$params['billable'])
{
$params['billable'] =
$this->return_value('billable',$params['project_id']);
}
@@ -687,7 +689,7 @@
$sub_pro[$i] =
$sub['project_id'];
++$i;
- if($sub['parent'] ==
$params['project_id'])
+ if(isset($sub['parent']) &&
$sub['parent'] == $params['project_id'])
{
$sum_budget +=
$sub['budget']+$sub['budget_childs'];
$sum_ptime +=
$sub['time_planned']+$sub['time_planned_childs'];
@@ -769,6 +771,8 @@
$h_jobs_bill =
$this->sohours->get_time_used(array('project_array' => $sub_pro_bill)); //
project is billable
+ $uhours_jobs_bill = 0;
+ $uhours_jobs_nobill = 0;
if(is_array($h_jobs_bill))
{
foreach($h_jobs_bill as $hjb)
@@ -788,7 +792,7 @@
$uhours_jobs_bill = $uhours_jobs_nobill
= 0;
}
- $h_jobs_nobill =
$this->sohours->get_time_used(array('project_array' => $sub_pro_nobill)); //
project is not billable
+ $h_jobs_nobill =
(isset($sub_pro_nobill)?$this->sohours->get_time_used(array('project_array' =>
$sub_pro_nobill)):''); // project is not billable
if(is_array($h_jobs_nobill))
{
@@ -1072,7 +1076,7 @@
'status' => $this->status,
'cat_id' => ($params['action'] == 'mains'?$this->cat_id:0),
'action' => $params['action'],
-
'parent' => $params['parent'],
+
'parent' => (isset($params['parent'])?$params['parent']:''),
'main' => (isset($params['main'])?$params['main']:''),
'project_id' => (isset($params['project_id'])?$params['project_id']:'')
));
@@ -1282,11 +1286,11 @@
{
$d = array
(
- 'date' =>
$date + (60*60) *
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'],
+ 'date' =>
$date + (60*60) *
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])?$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']:0),
'date_formatted' =>
$GLOBALS['phpgw']->common->show_date($date,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']),
- 'day' =>
date('d',$values['edate']),
- 'month' =>
date('m',$values['edate']),
- 'year' =>
date('Y',$values['edate'])
+ 'day' =>
(isset($values['edate'])?date('d',$values['edate']):''),
+ 'month' =>
(isset($values['edate'])?date('m',$values['edate']):''),
+ 'year' =>
(isset($values['edate'])?date('Y',$values['edate']):'')
);
return $d;
}
@@ -1304,7 +1308,7 @@
if ($edate > 0)
{
- $edate = $edate + (60*60) *
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'];
+ $edate = $edate + (60*60) *
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])?$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']:0);
$edateout =
$GLOBALS['phpgw']->common->show_date($edate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
}
if($this->html_output && $colored)
@@ -1356,13 +1360,13 @@
$atime =
$this->sohours->format_wh($pro['ptime']-$acc['ptime_jobs_min']);
}
- $uhours_pro =
$this->colored($acc['uhours_pro'],$pro['ptime'],$acc['uhours_pro_wminutes'],'hours');
- $uhours_jobs =
$this->colored($acc['uhours_jobs'],$pro['ptime'],$acc['uhours_jobs_wminutes'],'hours');
+ $uhours_pro =
$this->colored((isset($acc['uhours_pro'])?$acc['uhours_pro']:''),$pro['ptime'],(isset($acc['uhours_pro_wminutes'])?$acc['uhours_pro_wminutes']:''),'hours');
+ $uhours_jobs =
$this->colored((isset($acc['uhours_jobs'])?$acc['uhours_jobs']:''),$pro['ptime'],(isset($acc['uhours_jobs_wminutes'])?$acc['uhours_jobs_wminutes']:''),'hours');
- $ubudget_pro =
$this->colored($acc['u_budget'],$pro['budget'],$acc['u_budget']);
- $ubudget_jobs =
$this->colored($acc['u_budget_jobs'],$pro['budget'],$acc['u_budget_jobs']);
- $ubudget_pro = $acc['u_budget'];
- $ubudget_jobs = $acc['u_budget_jobs'];
+ $ubudget_pro =
$this->colored((isset($acc['u_budget'])?$acc['u_budget']:''),$pro['budget'],(isset($acc['u_budget'])?$acc['u_budget']:''));
+ $ubudget_jobs =
$this->colored((isset($acc['u_budget_jobs'])?$acc['u_budget_jobs']:''),$pro['budget'],(isset($acc['u_budget_jobs'])?$acc['u_budget_jobs']:''));
+ $ubudget_pro =
(isset($acc['u_budget'])?$acc['u_budget']:'');
+ $ubudget_jobs =
(isset($acc['u_budget_jobs'])?$acc['u_budget_jobs']:'');
$project = array
(
@@ -1382,8 +1386,8 @@
'e_budget_childs' =>
$pro['e_budget_childs'],
'pbudget_jobs' =>
$acc['pbudget_jobs']?$acc['pbudget_jobs']:'0.00',
'ap_budget_jobs' =>
$pro['budget']-$acc['pbudget_jobs'],
- 'a_budget' =>
$pro['budget']-$acc['u_budget'],
- 'a_budget_jobs' =>
$pro['budget']-$acc['u_budget_jobs'],
+ 'a_budget' =>
$pro['budget']-(isset($acc['u_budget'])?$acc['u_budget']:0),
+ 'a_budget_jobs' =>
$pro['budget']-(isset($acc['u_budget_jobs'])?$acc['u_budget_jobs']:0),
'u_budget' =>
$ubudget_pro, //$acc['u_budget']?$acc['u_budget']:'0.00',
'u_budget_jobs' => $ubudget_jobs,
//$acc['u_budget_jobs']?$acc['u_budget_jobs']:'0.00',
'project_id' => $pro['project_id'],
@@ -1412,14 +1416,14 @@
'plan_bottom_up' => (($pro['plan_bottom_up'] ==
'Y')?'Y':'N'),
'direct_work' =>
(($pro['direct_work'] == 'Y')?'Y':'N'),
'uhours_pro' => $uhours_pro,
//$acc['uhours_pro']?$acc['uhours_pro']:'0:00',
- 'uhours_pro_nobill' =>
$acc['uhours_pro_nobill']?$acc['uhours_pro_nobill']:'0:00',
- 'uhours_pro_bill' =>
$acc['uhours_pro_bill']?$acc['uhours_pro_bill']:'0:00',
+ 'uhours_pro_nobill' =>
(isset($acc['uhours_pro_nobill'])?$acc['uhours_pro_nobill']:'0:00'),
+ 'uhours_pro_bill' =>
(isset($acc['uhours_pro_bill'])?$acc['uhours_pro_bill']:'0:00'),
'uhours_jobs' => $uhours_jobs,
//$acc['uhours_jobs']?$acc['uhours_jobs']:'0:00',
- 'uhours_jobs_nobill'=>
$acc['uhours_jobs_nobill']?$acc['uhours_jobs_nobill']:'0:00',
- 'uhours_jobs_bill' =>
$acc['uhours_jobs_bill']?$acc['uhours_jobs_bill']:'0:00',
- 'uhours_jobs_wminutes' =>
$acc['uhours_jobs_wminutes']?$acc['uhours_jobs_wminutes']:0,
- 'ahours_pro' =>
$acc['ahours_pro']?$acc['ahours_pro']:'0:00',
- 'ahours_jobs' =>
$acc['ahours_jobs']?$acc['ahours_jobs']:'0:00',
+ 'uhours_jobs_nobill'=>
(isset($acc['uhours_jobs_nobill'])?$acc['uhours_jobs_nobill']:'0:00'),
+ 'uhours_jobs_bill' =>
(isset($acc['uhours_jobs_bill'])?$acc['uhours_jobs_bill']:'0:00'),
+ 'uhours_jobs_wminutes' =>
(isset($acc['uhours_jobs_wminutes'])?$acc['uhours_jobs_wminutes']:0),
+ 'ahours_pro' =>
(isset($acc['ahours_pro'])?$acc['ahours_pro']:'0:00'),
+ 'ahours_jobs' =>
(isset($acc['ahours_jobs'])?$acc['ahours_jobs']:'0:00'),
'priority' =>
$pro['priority'],
'inv_method' =>
$GLOBALS['phpgw']->strip_html($pro['inv_method']),
'discount' =>
$pro['discount'],
@@ -2756,7 +2760,7 @@
(
'text' => ($active_project_id==0?
'<b>'.lang('projects').'</b>' : lang('projects')),
'parent_id' => '0',
- 'href' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_projects&status=active'),
+ 'href' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.list_projects','status'=>'active')),
'target' => '_parent',
'icon' => ''
);
Index: class.soconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- class.soconfig.inc.php 25 Nov 2006 10:28:07 -0000 1.22
+++ class.soconfig.inc.php 26 Nov 2006 14:14:26 -0000 1.23
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.soconfig.inc.php,v 1.22 2006/11/25 10:28:07
sigurdne Exp $
+ * @version $Id: class.soconfig.inc.php,v 1.23 2006/11/26 14:14:26
sigurdne Exp $
* $Source: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v $
*/
@@ -666,6 +666,7 @@
$select = ' order by charge_name asc';
}
+ $charges = false;
$this->db->query('SELECT * from phpgw_p_surcharges' .
$select,__LINE__,__FILE__);
while($this->db->next_record())
Index: class.soprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soprojecthours.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- class.soprojecthours.inc.php 8 Apr 2005 15:52:58 -0000 1.40
+++ class.soprojecthours.inc.php 26 Nov 2006 14:14:26 -0000 1.41
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.soprojecthours.inc.php,v 1.40 2005/04/08 15:52:58
ceb Exp $
+ * @version $Id: class.soprojecthours.inc.php,v 1.41 2006/11/26 14:14:26
sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.soprojecthours.inc.php,v $
*/
@@ -172,7 +172,7 @@
.
intval($values['activity_id']) . ',' . time() . ',' . intval($values['sdate'])
. ',' . intval($values['edate']) . ",'"
.
$values['hours_descr'] . "','" . $values['remark'] . "','" .
(isset($values['billable'])?'N':'Y') . "'," . intval($values['w_minutes'])
. ",'" .
$values['status'] . "'," . intval($values['employee']) . ',' .
intval($values['pro_parent']) . ',' . intval($values['pro_main'])
- . ',' .
$values['km_distance'] . ',' . $values['t_journey'] . ',' .
intval($values['surcharge']) . ',"N")',__LINE__,__FILE__);
+ . ',' .
$values['km_distance'] . ',' . $values['t_journey'] . ',' .
intval($values['surcharge']) . ",'N')",__LINE__,__FILE__);
}
function edit_hours($values)
@@ -368,10 +368,10 @@
function get_time_used($params = 0)
{
- $project_id = intval($params['project_id']);
- $project_array = $params['project_array'];
- $hours =
isset($params['hours'])?$params['hours']:True;
- $action =
$params['action']?$params['action']:'subs';
+ $project_id =
(isset($params['project_id'])?intval($params['project_id']):'');
+ $project_array =
(isset($params['project_array'])?$params['project_array']:'');
+ $hours =
(isset($params['hours'])?$params['hours']:True);
+ $action =
(isset($params['action'])?$params['action']:'subs');
$columns =
'id,minutes,t_journey,billable,surcharge,employee';
$this->column_array = explode(',',$columns);
Index: class.soprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -b -r1.114 -r1.115
--- class.soprojects.inc.php 25 Nov 2006 23:12:10 -0000 1.114
+++ class.soprojects.inc.php 26 Nov 2006 14:14:26 -0000 1.115
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.soprojects.inc.php,v 1.114 2006/11/25 23:12:10
sigurdne Exp $
+ * @version $Id: class.soprojects.inc.php,v 1.115 2006/11/26 14:14:26
sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.soprojects.inc.php,v $
*/
@@ -389,7 +389,7 @@
$s .= ' . ';
}
- $s .=
$GLOBALS['phpgw']->strip_html($p['title']) . ' [ ' .
$GLOBALS['phpgw']->strip_html($p['number']?$p['number']:$p['p_number']) . ' ]';
+ $s .=
$GLOBALS['phpgw']->strip_html($p['title']) . ' [ ' .
$GLOBALS['phpgw']->strip_html(isset($p['number'])?$p['number']:$p['p_number'])
. ' ]';
$s .= '</option>';
}
}
@@ -1371,7 +1371,7 @@
//_debug_array($data);
$emp_select = '';
- $roles = '';
+ $roles = false;
if($account_id > 0)
{
$emp_select = ' and account_id=' . $account_id;
Index: class.uiprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -b -r1.87 -r1.88
--- class.uiprojecthours.inc.php 25 Nov 2006 23:12:10 -0000 1.87
+++ class.uiprojecthours.inc.php 26 Nov 2006 14:14:26 -0000 1.88
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.uiprojecthours.inc.php,v 1.87 2006/11/25 23:12:10
sigurdne Exp $
+ * @version $Id: class.uiprojecthours.inc.php,v 1.88 2006/11/26 14:14:26
sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v $
*/
@@ -140,8 +140,7 @@
{
$main =
$this->boprojects->read_single_project($pro_main,'hours');
$GLOBALS['phpgw']->template->set_var('title_main',$main['title']);
-
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.view_project&action=mains&project_id='
-
. $pro_main));
+
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.view_project','action'=>'mains','project_id'=>$pro_main)));
$GLOBALS['phpgw']->template->set_var('coordinator_main',$main['coordinatorout']);
$GLOBALS['phpgw']->template->set_var('number_main',$main['number']);
$GLOBALS['phpgw']->template->set_var('customer_main',$main['customerout']);
@@ -191,7 +190,7 @@
for ($i=0;$i<count($pro);$i++)
{
-
$this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template);
+
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
// --------------- template declaration for list records
-------------------------------------
@@ -199,13 +198,16 @@
$link_data['project_id'] =
$pro[$i]['project_id'];
if ($action == 'mains')
{
- $projects_url =
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojecthours.list_projects&pro_main='
- .
$pro[$i]['project_id'] . '&action=subs');
+ $projects_url =
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojecthours.list_projects',
+
'pro_main'=> $pro[$i]['project_id'],
+
'action'=>'subs'));
}
else
{
- $projects_url =
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojecthours.list_hours&project_id='
- .
$pro[$i]['project_id'] . '&action=hours' . '&pro_main=' . $pro_main);
+ $projects_url =
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojecthours.list_hours',
+
'project_id'=> $pro[$i]['project_id'],
+
'action'=>'hours',
+
'pro_main'=>$pro_main));
}
$GLOBALS['phpgw']->template->set_var(array
@@ -325,7 +327,9 @@
//$this->attached_files =
CreateObject('projects.attached_files');
$main =
$this->boprojects->read_single_project($this->boprojects->return_value('main',$this->project_id),'hours');
$GLOBALS['phpgw']->template->set_var('title_main',$main['title']);
-
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.view_project&action=mains&project_id='.$main['project_id']));
+
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.view_project',
+
'action'=>'mains',
+
'project_id'=>$main['project_id'])));
$GLOBALS['phpgw']->template->set_var('coordinator_main',$main['coordinatorout']);
$GLOBALS['phpgw']->template->set_var('number_main',$main['number']);
$GLOBALS['phpgw']->template->set_var('customer_main',$main['customerout']);
@@ -435,7 +439,7 @@
for ($i=0;$i<count($hours);$i++)
{
-
$this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template);
+
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
// ---------------- template declaration for list records
------------------------------
@@ -704,7 +708,7 @@
for($i=0;$i<count($track['hours']);$i++)
{
-
$this->nextmatchs->template_alternate_row_color($GLOBALS['phpgw']->template);
+
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
// ---------------- template declaration for list records
------------------------------
@@ -732,8 +736,8 @@
'end_time' =>
($track['hours'][$i]['status']!='apply'?($track['hours'][$i]['edate']>0?$track['hours'][$i]['edate_formatted']['time']:
''):$track['hours'][$i]['edate_formatted']['date']),
'wh' => $wh,
-
'delete_url' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojecthours.ttracker&delete=True&track_id='
. $track['hours'][$i]['track_id']),
-
'edit_url' =>
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojecthours.edit_ttracker&track_id='
. $track['hours'][$i]['track_id']),
+
'delete_url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojecthours.ttracker','delete'=>'True','track_id'=>
$track['hours'][$i]['track_id'])),
+
'edit_url' =>
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojecthours.edit_ttracker','track_id'=>
$track['hours'][$i]['track_id'])),
'delete_img' =>
$GLOBALS['phpgw']->common->image('phpgwapi','delete'),
'lang_delete' => lang('delete')));
@@ -992,7 +996,7 @@
default : $stat_sel[1]='
selected'; break;
}
- $status_list = '<option value="open"' . $stat_sel[0] .
'>' . lang('Open') . '</option>' . "\n"
+ $status_list = '<option value="open"' .
(isset($stat_sel[0])?$stat_sel[0]:'') . '>' . lang('Open') . '</option>' . "\n"
. '<option value="done"' .
$stat_sel[1] . '>' . lang('Done') . '</option>' . "\n";
return $status_list;
@@ -1064,7 +1068,7 @@
}
}
- if ($_POST['save'])
+ if (isset($_POST['save']) && $_POST['save'])
{
$values['t_journey'] =
intval($values['t_journey_h']*60 + $values['t_journey_m']);
$values['hours'] = abs($values['hours']);
@@ -1155,12 +1159,12 @@
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
}
}
- elseif($_POST['cancel'])
+ elseif(isset($_POST['cancel']) && $_POST['cancel'])
{
//$link_data['menuaction'] =
'projects.uiprojecthours.list_hours';
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
}
- elseif($_POST['delete'])
+ elseif(isset($_POST['delete']) && $_POST['delete'])
{
$link_data['menuaction'] =
'projects.uiprojecthours.delete_hours';
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
@@ -1189,8 +1193,9 @@
{
$main =
$this->boprojects->read_single_project($pro_main,'hours');
$GLOBALS['phpgw']->template->set_var('pro_main',$main['title']);
-
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.view_project&action=mains&project_id='
-
. $pro_main));
+
$GLOBALS['phpgw']->template->set_var('main_url',$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.view_project',
+
'action'=>'mains',
+
'project_id'=> $pro_main)));
$GLOBALS['phpgw']->template->set_var('number_main',$main['number']);
$GLOBALS['phpgw']->template->set_var('coordinator_main',$main['coordinatorout']);
$GLOBALS['phpgw']->template->set_var('customer_main',$main['customerout']);
@@ -1211,21 +1216,21 @@
//_debug_array($values);
}
- if($start_val)
+ if(isset($start_val) && $start_val)
{
$start = $start_val;
}
- elseif(!$start_val && $_REQUEST['day'])
+ elseif((!isset($start_val) || !$start_val) &&
isset($_REQUEST['day']) && $_REQUEST['day'])
{
$start = $_REQUEST['day'];
}
else
{
- $start =
($values['sdate']?mktime(0,0,0,date('m',$values['sdate']),date('d',$values['sdate']),date('Y',$values['sdate'])):mktime(0,0,0,date('m'),date('d'),date('Y')));
+ $start =
(isset($values['sdate'])?mktime(0,0,0,date('m',$values['sdate']),date('d',$values['sdate']),date('Y',$values['sdate'])):mktime(0,0,0,date('m'),date('d'),date('Y')));
}
- $shour =
$values['sdate']?date('H',$values['sdate']):'08';
- $smin =
$values['sdate']?date('i',$values['sdate']):'00';
+ $shour =
isset($values['sdate'])?date('H',$values['sdate']):'08';
+ $smin =
isset($values['sdate'])?date('i',$values['sdate']):'00';
$GLOBALS['phpgw']->template->set_var('start_date_select',$jscal->input('sdate[str]',$start));
@@ -1261,8 +1266,8 @@
$GLOBALS['phpgw']->template->set_var('shour',
sprintf("%02d", $shour));
$GLOBALS['phpgw']->template->set_var('smin',
sprintf("%02d", $smin));
- $end =
$end_val?$end_val:($values['edate']?mktime(0,0,0,date('m',$values['edate']),date('d',$values['edate']),date('Y',$values['edate'])):mktime(0,0,0,date('m'),date('d'),date('Y')));
- if(!intval(date('H',$values['edate'])) &&
!intval(date('i',$values['edate'])) && ($minutes > 0))
+ $end =
isset($end_val)?$end_val:(isset($values['edate'])?mktime(0,0,0,date('m',$values['edate']),date('d',$values['edate']),date('Y',$values['edate'])):mktime(0,0,0,date('m'),date('d'),date('Y')));
+ if((!isset($values['edate']) ||
(!intval(date('H',$values['edate'])) && !intval(date('i',$values['edate']))))
&& (isset($minutes) && $minutes > 0))
{
$s_minutes = $shour * 60 + $smin;
$e_minutes = $s_minutes + $minutes;
@@ -1271,8 +1276,8 @@
}
else
{
- $ehour =
$values['edate']?date('H',$values['edate']):'17';
- $emin =
$values['edate']?date('i',$values['edate']):'00';
+ $ehour =
isset($values['edate'])?date('H',$values['edate']):'17';
+ $emin =
isset($values['edate'])?date('i',$values['edate']):'00';
}
$GLOBALS['phpgw']->template->set_var('end_date_select',$jscal->input('edate[str]',$end));
@@ -1316,22 +1321,22 @@
$GLOBALS['phpgw']->template->fp('timehandle','booking_time',True);
}
-
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format($values['status']));
-
$GLOBALS['phpgw']->template->set_var('remark',$values['remark']);
-
$GLOBALS['phpgw']->template->set_var('hours_descr',$values['hours_descr']);
+
$GLOBALS['phpgw']->template->set_var('status_list',$this->status_format((isset($values['status'])?$values['status']:'')));
+
$GLOBALS['phpgw']->template->set_var('remark',(isset($values['remark'])?$values['remark']:''));
+
$GLOBALS['phpgw']->template->set_var('hours_descr',(isset($values['hours_descr'])?$values['hours_descr']:''));
- $GLOBALS['phpgw']->template->set_var('hours',
sprintf("%02d",$values['hours']));
- $GLOBALS['phpgw']->template->set_var('minutes',
sprintf("%02d",$values['minutes']));
+ $GLOBALS['phpgw']->template->set_var('hours',
sprintf("%02d",(isset($values['hours'])?$values['hours']:'')));
+ $GLOBALS['phpgw']->template->set_var('minutes',
sprintf("%02d",(isset($values['minutes'])?$values['minutes']:'')));
$GLOBALS['phpgw']->template->set_var('project_name',$GLOBALS['phpgw']->strip_html($this->boprojects->return_value('pro',$this->project_id)));
$GLOBALS['phpgw']->template->set_var('hours_billable_checked',($values['billable']=='N'?'
CHECKED':''));
-
$GLOBALS['phpgw']->template->set_var('km_distance',sprintf("%01.2f",$values['km_distance']));
+
$GLOBALS['phpgw']->template->set_var('km_distance',sprintf("%01.2f",(isset($values['km_distance'])?$values['km_distance']:'')));
- $GLOBALS['phpgw']->template->set_var('t_journey_h',
sprintf('%02d', floor($values['t_journey']/60)));
- $GLOBALS['phpgw']->template->set_var('t_journey_m',
sprintf('%02d', intval($values['t_journey']%60)));
+ $GLOBALS['phpgw']->template->set_var('t_journey_h',
sprintf('%02d',
(isset($values['t_journey'])?floor($values['t_journey']/60):'')));
+ $GLOBALS['phpgw']->template->set_var('t_journey_m',
sprintf('%02d',
(isset($values['t_journey'])?intval($values['t_journey']%60):'')));
-
$GLOBALS['phpgw']->template->set_var('surcharge_list',$this->boprojects->action_format($values['surcharge'],'charge'));
+
$GLOBALS['phpgw']->template->set_var('surcharge_list',$this->boprojects->action_format((isset($values['surcharge'])?$values['surcharge']:''),'charge'));
if($this->siteconfig['accounting'] == 'activity')
{
@@ -1349,9 +1354,9 @@
$GLOBALS['phpgw']->template->set_var('lang_pro_parent',lang('Main project:'));
}*/
- if ($this->bohours->edit_perms(array('adminonly' =>
True,'status' => $values['status'],'main_co' => $main['coordinator'])))
+ if ($this->bohours->edit_perms(array('adminonly' =>
True,'status' => (isset($values['status'])?$values['status']:''),'main_co' =>
$main['coordinator'])))
{
-
$GLOBALS['phpgw']->template->set_var('employee','<select
name="values[employee]">' . $this->ui_base->employee_format(array('selected' =>
($values['employee']?$values['employee']:$this->account),
+
$GLOBALS['phpgw']->template->set_var('employee','<select
name="values[employee]">' . $this->ui_base->employee_format(array('selected' =>
(isset($values['employee'])?$values['employee']:$this->account),
'admins_included' => True,
'project_id' => $values['project_id']))
. '</select>');
@@ -1568,7 +1573,7 @@
if(get_var('import', array('POST')))
{
-
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php',
'menuaction=projects.uiprojecthours.import_controlling_sheet'));
+
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'projects.uiprojecthours.import_controlling_sheet')));
}
$values = get_var('view', array('POST', 'GET'));
@@ -1613,7 +1618,7 @@
$GLOBALS['phpgw']->template->set_var('sdate_select',$jscal->input('datum[start]',
$start));
$GLOBALS['phpgw']->template->set_var('edate_select',$jscal->input('datum[end]',
$end));
- $GLOBALS['phpgw']->template->set_var('view_hours_link',
$GLOBALS['phpgw']->link('/index.php',
'menuaction=projects.uiprojecthours.edit_hours'));
+ $GLOBALS['phpgw']->template->set_var('view_hours_link',
$GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'projects.uiprojecthours.edit_hours')));
$calholidays =
CreateObject('phpgwapi.calendar_holidays');
$matrix =
$this->bohours->build_controlling_matrix($employee, $start, $end);
@@ -1671,7 +1676,7 @@
}
for($j = 0; $j < count($rowtitles);
$j++)
{
-
$GLOBALS['phpgw']->template->set_var('matrix_link',
$GLOBALS['phpgw']->link('/index.php',
'menuaction=projects.uiprojecthours.list_hours&project_id='.$matrix[$i]['id']));
+
$GLOBALS['phpgw']->template->set_var('matrix_link',
$GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'projects.uiprojecthours.list_hours','project_id'=>$matrix[$i]['id'])));
switch($rowtitles[$j])
{
@@ -1924,7 +1929,7 @@
$out .= lang('found no data for
import');
}
- $GLOBALS['phpgw']->template->set_var('action',
$GLOBALS['phpgw']->link('/index.php',
'menuaction=projects.uiprojecthours.controlling_sheet'));
+ $GLOBALS['phpgw']->template->set_var('action',
$GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'projects.uiprojecthours.controlling_sheet')));
$GLOBALS['phpgw']->template->set_var('import_result', $out);
$GLOBALS['phpgw']->template->pfp('out','controlling_import_result', True);
$GLOBALS['phpgw']->common->phpgw_exit();
@@ -1937,7 +1942,7 @@
.lang('It will NOT check if you already have uploaded hours for a certain day')
);
$GLOBALS['phpgw']->template->set_var('error', $error);
- $GLOBALS['phpgw']->template->set_var('action',
$GLOBALS['phpgw']->link('/index.php',
'menuaction=projects.uiprojecthours.import_controlling_sheet'));
+ $GLOBALS['phpgw']->template->set_var('action',
$GLOBALS['phpgw']->link('/index.php',
array('menuaction'=>'projects.uiprojecthours.import_controlling_sheet')));
$GLOBALS['phpgw']->template->pfp('out','controlling',
True);
$GLOBALS['phpgw']->common->phpgw_exit();
Index: class.uiprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -b -r1.165 -r1.166
--- class.uiprojects.inc.php 25 Nov 2006 23:12:10 -0000 1.165
+++ class.uiprojects.inc.php 26 Nov 2006 14:14:26 -0000 1.166
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.uiprojects.inc.php,v 1.165 2006/11/25 23:12:10
sigurdne Exp $
+ * @version $Id: class.uiprojects.inc.php,v 1.166 2006/11/26 14:14:26
sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.uiprojects.inc.php,v $
*/
@@ -485,7 +485,7 @@
}
else
{
- $sort_column =
$this->nextmatchs->show_sort_order($this->sort,($db?$db:$col),$this->order,'/index.php',$cname?$cname:lang($col),$link_data);
+ $sort_column =
$this->nextmatchs->show_sort_order($this->sort,(isset($db)?$db:$col),$this->order,'/index.php',$cname?$cname:lang($col),$link_data);
}
$GLOBALS['phpgw']->template->set_var('col_align',$col_align?$col_align:'left');
$GLOBALS['phpgw']->template->set_var('sort_column',$sort_column);
@@ -574,7 +574,7 @@
. '" border="0">'));
if
($this->boprojects->add_perms(array('action' => $action,'coordinator' =>
$p['coordinator'],
-
'main_co' => $main['coordinator'],'parent' =>
$p['parent'])))
+
'main_co' =>
(isset($main['coordinator'])?$main['coordinator']:''),'parent' =>
$p['parent'])))
{
$GLOBALS['phpgw']->template->set_var('add_job_url',$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.edit_project',
'action'=>'subs',
@@ -1027,7 +1027,10 @@
//$values =
$this->boprojects->read_single_project($project_id);
$edit_mstone =
get_var('edit_mstone',array('GET','POST'));
$delete_mstone =
get_var('delete_mstone',array('GET','POST'));
- if((($_POST['save'] || $_POST['apply']) &&
$error) || $_POST['mstone_save'] || $edit_mstone || $delete_mstone)
+ if((((isset($_POST['save']) && $_POST['save'])
|| (isset($_POST['apply']) && $_POST['apply'])) && $error)
+ || (isset($_POST['mstone_save']) &&
$_POST['mstone_save'])
+ || $edit_mstone
+ || $delete_mstone)
{
$values['coordinator'] =
$_POST['accountid'];
$values['employees'] =
$_POST['employees'];
@@ -1075,10 +1078,10 @@
$GLOBALS['phpgw']->template->set_var('help_img','');
$this->cat_id = $values['cat'];
- $start =
$start_val?$start_val:($values['sdate']?$values['sdate']:'');
- $end =
$end_val?$end_val:($values['edate']?$values['edate']:'');
- $pstart =
$pstart_val?$pstart_val:($values['psdate']?$values['psdate']:'');
- $pend =
$pend_val?$pend_val:($values['psdate']?$values['pedate']:'');
+ $start =
(isset($start_val)?$start_val:($values['sdate']?$values['sdate']:''));
+ $end =
(isset($end_val)?$end_val:($values['edate']?$values['edate']:''));
+ $pstart =
(isset($pstart_val)?$pstart_val:($values['psdate']?$values['psdate']:''));
+ $pend =
(isset($pend_val)?$pend_val:($values['psdate']?$values['pedate']:''));
$GLOBALS['phpgw']->template->set_var('edit_roles_events_button','<input
type="submit" name="roles" value="' . lang('edit roles and events') . '">');
@@ -1132,14 +1135,14 @@
}
}
-
$GLOBALS['phpgw']->template->set_var('mstone_old_edate',$single_mstone['edate']);
-
$GLOBALS['phpgw']->template->set_var('s_id',$single_mstone['s_id']);
+
$GLOBALS['phpgw']->template->set_var('mstone_old_edate',(isset($single_mstone['edate'])?$single_mstone['edate']:''));
+
$GLOBALS['phpgw']->template->set_var('s_id',(isset($single_mstone['s_id'])?$single_mstone['s_id']:''));
$GLOBALS['phpgw']->template->set_var('lang_new',lang('new milestone'));
$GLOBALS['phpgw']->template->set_var('lang_save_mstone',lang('save milestone'));
-
$GLOBALS['phpgw']->template->set_var('new_checked',$values['new']?'
checked':'');
-
$GLOBALS['phpgw']->template->set_var('mstone_title',$GLOBALS['phpgw']->strip_html($single_mstone['title']));
+
$GLOBALS['phpgw']->template->set_var('new_checked',(isset($values['new'])?'
checked':''));
+
$GLOBALS['phpgw']->template->set_var('mstone_title',$GLOBALS['phpgw']->strip_html((isset($single_mstone['title'])?$single_mstone['title']:'')));
- $msend =
$single_mstone['edate']?$single_mstone['edate']:($end?mktime(12,0,0,date('m',$end),date('d',$end),date('Y',$end)):mktime(12,0,0,date('m'),date('d'),date('Y')));
+ $msend =
(isset($single_mstone['edate'])?$single_mstone['edate']:($end?mktime(12,0,0,date('m',$end),date('d',$end),date('Y',$end)):mktime(12,0,0,date('m'),date('d'),date('Y'))));
$GLOBALS['phpgw']->template->set_var('mstone_end_date_select',$jscal->input('mstone_edate[str]',$msend));
@@ -1185,10 +1188,10 @@
case 'subs':
if(isset($parent) &&
is_array($parent))
{
- $start =
$start_val?$start_val:($parent['sdate']?mktime(12,0,0,date('m',$parent['sdate']),date('d',$parent['sdate']),date('Y',$parent['sdate'])):'');
//mktime(12,0,0,date('m'),date('d'),date('Y')));
- $end =
$end_val?$end_val:($parent['edate']?mktime(12,0,0,date('m',$parent['edate']),date('d',$parent['edate']),date('Y',$parent['edate'])):'');
- $pstart =
$pstart_val?$pstart_val:($parent['psdate']?mktime(12,0,0,date('m',$parent['psdate']),date('d',$parent['psdate']),date('Y',$parent['psdate'])):'');
- $pend =
$pend_val?$pend_val:($parent['pedate']?mktime(12,0,0,date('m',$parent['pedate']),date('d',$parent['pedate']),date('Y',$parent['pedate'])):'');
+ $start =
isset($start_val)?$start_val:($parent['sdate']?mktime(12,0,0,date('m',$parent['sdate']),date('d',$parent['sdate']),date('Y',$parent['sdate'])):'');
//mktime(12,0,0,date('m'),date('d'),date('Y')));
+ $end =
isset($end_val)?$end_val:($parent['edate']?mktime(12,0,0,date('m',$parent['edate']),date('d',$parent['edate']),date('Y',$parent['edate'])):'');
+ $pstart =
isset($pstart_val)?$pstart_val:($parent['psdate']?mktime(12,0,0,date('m',$parent['psdate']),date('d',$parent['psdate']),date('Y',$parent['psdate'])):'');
+ $pend =
isset($pend_val)?$pend_val:($parent['pedate']?mktime(12,0,0,date('m',$parent['pedate']),date('d',$parent['pedate']),date('Y',$parent['pedate'])):'');
$values['plan_bottom_up'] =
$parent['plan_bottom_up']?$parent['plan_bottom_up']:'N';
$values['direct_work']
= $parent['direct_work']?$parent['direct_work']:'Y';
}
@@ -1540,7 +1543,7 @@
if (isset($action) && ($action == 'mains' || $action ==
'amains'))
{
$GLOBALS['phpgw']->template->set_var('cat',$this->boprojects->cats->id2name($values['cat']));
-
$GLOBALS['phpgw']->template->set_var('pcosts',$values['pcosts']);
+
$GLOBALS['phpgw']->template->set_var('pcosts',(isset($values['pcosts'])?$values['pcosts']:''));
}
/*
else if($pro_main && $action == 'subs')
@@ -1580,8 +1583,8 @@
$GLOBALS['phpgw']->template->set_var('budget_jobs',sprintf("%01.2f",$values['pbudget_jobs']));
$GLOBALS['phpgw']->template->set_var('budget_sum',
sprintf("%01.2f",$values['budget']));
-
$GLOBALS['phpgw']->template->set_var('ebudget_item',sprintf("%01.2f",$values['e_budget']-$values['e_budget_chields']));
-
$GLOBALS['phpgw']->template->set_var('ebudget_jobs',sprintf("%01.2f",$values['e_budget_chields']));
+
$GLOBALS['phpgw']->template->set_var('ebudget_item',sprintf("%01.2f",$values['e_budget']-(isset($values['e_budget_chields'])?$values['e_budget_chields']:0)));
+
$GLOBALS['phpgw']->template->set_var('ebudget_jobs',sprintf("%01.2f",(isset($values['e_budget_chields'])?$values['e_budget_chields']:'')));
$GLOBALS['phpgw']->template->set_var('ebudget_sum',
sprintf("%01.2f",$values['e_budget']));
$GLOBALS['phpgw']->template->set_var('discount',$values['discount']);
@@ -1606,7 +1609,7 @@
$GLOBALS['phpgw']->template->set_var('ptime_jobs',intval($values['ptime_jobs']));
$GLOBALS['phpgw']->template->set_var('ptime_sum',
intval($values['ptime']));
-
$GLOBALS['phpgw']->template->set_var('uhours_jobs',$values['uhours_jobs_all']);
+
$GLOBALS['phpgw']->template->set_var('uhours_jobs',(isset($values['uhours_jobs_all'])?$values['uhours_jobs_all']:''));
$GLOBALS['phpgw']->template->set_var('sdate',$values['sdate_formatted']);
$GLOBALS['phpgw']->template->set_var('edate',$values['edate_formatted']);
Index: class.uiprojects_base.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojects_base.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- class.uiprojects_base.inc.php 25 Nov 2006 15:23:22 -0000 1.16
+++ class.uiprojects_base.inc.php 26 Nov 2006 14:14:26 -0000 1.17
@@ -7,7 +7,7 @@
* @copyright Copyright (C) 2004-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package projects
- * @version $Id: class.uiprojects_base.inc.php,v 1.16 2006/11/25
15:23:22 sigurdne Exp $
+ * @version $Id: class.uiprojects_base.inc.php,v 1.17 2006/11/26
14:14:26 sigurdne Exp $
* $Source:
/sources/phpgroupware/projects/inc/class.uiprojects_base.inc.php,v $
*/
@@ -397,11 +397,11 @@
$linkText = '';
}
- if($buttonInActive)
+ if(isset($buttonInActive) && $buttonInActive)
{
$buttonClass = 'menu_icon_inactive';
}
- elseif($buttonActive)
+ elseif(isset($buttonActive) && $buttonActive)
{
$buttonClass = 'menu_icon_active';
}
@@ -410,7 +410,7 @@
$buttonClass = 'menu_icon';
}
- if($buttonInActive)
+ if(isset($buttonInActive) && $buttonInActive)
{
$link = '<div class="'.$buttonClass.'"><a
class="'.$buttonClass.'" title="'.$linkToolTip.'"><img
src="'.$GLOBALS['phpgw']->common->image('projects', $guiId).'"
class="'.$buttonClass.'" title="'.$linkToolTip.'">'.$linkText.'</a></div>';
}