phpgroupware-cvs
[Top][All Lists]
Advanced

[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 22:21:13 +0000

CVSROOT:        /sources/phpgroupware
Module name:    projects
Changes by:     Sigurd Nes <sigurdne>   06/11/26 22:21:13

Modified files:
        inc            : class.boprojecthours.inc.php 
                         class.boprojects.inc.php 
                         class.bostatistics.inc.php 
                         class.soprojecthours.inc.php 
                         class.soprojects.inc.php 
                         class.uiprojecthours.inc.php 
                         class.uistatistics.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.39&r2=1.40
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojects.inc.php?cvsroot=phpgroupware&r1=1.163&r2=1.164
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.bostatistics.inc.php?cvsroot=phpgroupware&r1=1.28&r2=1.29
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soprojecthours.inc.php?cvsroot=phpgroupware&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soprojects.inc.php?cvsroot=phpgroupware&r1=1.115&r2=1.116
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojecthours.inc.php?cvsroot=phpgroupware&r1=1.88&r2=1.89
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uistatistics.inc.php?cvsroot=phpgroupware&r1=1.63&r2=1.64

Patches:
Index: class.boprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- class.boprojecthours.inc.php        26 Nov 2006 14:14:26 -0000      1.39
+++ class.boprojecthours.inc.php        26 Nov 2006 22:21:13 -0000      1.40
@@ -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.39 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.boprojecthours.inc.php,v 1.40 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v $
        */
 
@@ -89,6 +89,7 @@
                {
                        $pro['action'] = 
(isset($pro['action'])?$pro['action']:'edit');
                        $pro['booked'] = 
(isset($pro['booked'])?$pro['booked']:'');
+                       $pro['adminonly']       = 
(isset($pro['adminonly'])?$pro['adminonly']:'');
 
                        switch($pro['action'])
                        {
@@ -137,7 +138,7 @@
                                $hour = date('H',$hdate);
                                $min = date('i',$hdate);
 
-                               $hdate = $hdate + (60*60) * 
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'];
+                               $hdate = $hdate + (60*60) * 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])?$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']:0);
                                $htime['date'] = 
$GLOBALS['phpgw']->common->show_date($hdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                $htime['time'] = 
$GLOBALS['phpgw']->common->formattime($hour,$min);
                        }
@@ -185,6 +186,7 @@
                function list_hours($start = 0, $end = 0)
                {
                        $filter = $this->filter;
+                       $hours = false;
                        $hours_list = $this->sohours->read_hours(array('start' 
=> $this->start,
                                                                       'limit' 
=> $this->limit,
                                                                       'query' 
=> $this->query,
@@ -208,9 +210,9 @@
                                        'activity_title'        => 
$this->siteconfig['accounting']=='activity'?$this->boprojects->return_value('act',$hour['activity_id']):'',
                                        'status'                        => 
$hour['status'],
                                        'statusout'                     => 
lang($hour['status']),
-                                       'sdate'                         => 
$hour['start_date'],
-                                       'edate'                         => 
$hour['end_date'],
-                                       'minutes'                       => 
$hour['minutes'],
+                                       'sdate'                         => 
(isset($hour['start_date'])?$hour['start_date']:''),
+                                       'edate'                         => 
(isset($hour['end_date'])?$hour['end_date']:''),
+                                       'minutes'                       => 
(isset($hour['minutes'])?$hour['minutes']:''),
                                        'wh'                            => 
$this->sohours->format_wh($hour['minutes']),
                                        't_journey'                     => 
$this->sohours->min2time($hour['t_journey']),
                                        'wh_all'                        => 
$this->sohours->format_wh($hour['minutes']+$hour['t_journey']),

Index: class.boprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -b -r1.163 -r1.164
--- class.boprojects.inc.php    26 Nov 2006 14:14:26 -0000      1.163
+++ class.boprojects.inc.php    26 Nov 2006 22:21:13 -0000      1.164
@@ -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.163 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.boprojects.inc.php,v 1.164 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.boprojects.inc.php,v $
        */
 
@@ -699,7 +699,7 @@
                                        $acc['is_leaf'] = ($i==1);
                                }
 
-                               if($params['page'] == 'planned')
+                               if(isset($params['page']) && $params['page'] == 
'planned')
                                {
                                        $acc['pbudget_jobs']    = $sum_budget;
                                        $ptimejobs                              
= $this->sohours->format_wh($sum_ptime);
@@ -826,7 +826,7 @@
                                $acc['nb_budget'] = 0;
                                $acc['u_budget'] = 0;
 
-                               if($params['page'] == 'budget')
+                               if(isset($params['page']) && $params['page'] == 
'budget')
                                {
                                        switch($params['accounting'])
                                        {

Index: class.bostatistics.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.bostatistics.inc.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- class.bostatistics.inc.php  25 Nov 2006 17:02:36 -0000      1.28
+++ class.bostatistics.inc.php  26 Nov 2006 22:21:13 -0000      1.29
@@ -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.bostatistics.inc.php,v 1.28 2006/11/25 17:02:36 
sigurdne Exp $
+       * @version $Id: class.bostatistics.inc.php,v 1.29 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.bostatistics.inc.php,v $
        */
 
@@ -298,19 +298,19 @@
                                $k = 0;
                                for($i=0;$i<$num_legend;++$i)
                                {
-                                       if(is_array($color_legend[$i]))
+                                       if(isset($color_legend[$i]) && 
is_array($color_legend[$i]))
                                        {
                                                $color[$k] = $color_legend[$i];
                                                $k++;
                                        }
                                }
-                               if(is_array($color_legend['previous']))
+                               if(isset($color_legend['previous']) && 
is_array($color_legend['previous']))
                                {
                                        $num = count($color);
                                        $color[$num] = 
$color_legend['previous'];
                                }
 
-                               if(is_array($color_legend['milestone']))
+                               if(isset($color_legend['milestone']) && 
is_array($color_legend['milestone']))
                                {
                                        $num = count($color);
                                        $color[$num] = 
$color_legend['milestone'];
@@ -323,10 +323,10 @@
                                //set_x_text
                                $this->graph->format_data($sdate,$edate);
 
-                               $sdate = $sdate + (60*60) * 
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'];
+                               $sdate = $sdate + (60*60) * 
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'])?$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset']:0);
                                $sdateout = 
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
 
-                               $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']);
 
                                $this->graph->title = lang('Gantt chart from %1 
to %2',$sdateout,$edateout);

Index: class.soprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soprojecthours.inc.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- class.soprojecthours.inc.php        26 Nov 2006 14:14:26 -0000      1.41
+++ class.soprojecthours.inc.php        26 Nov 2006 22:21:13 -0000      1.42
@@ -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.41 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.soprojecthours.inc.php,v 1.42 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.soprojecthours.inc.php,v $
        */
 
@@ -155,10 +155,13 @@
                function read_single_hours($hours_id)
                {
                        $this->db->query('SELECT * from phpgw_p_hours WHERE 
id=' . intval($hours_id),__LINE__,__FILE__);
-                       list($hours) = $this->db2hours();
-
+                       $p_hours = $this->db2hours();
+                       if(isset($p_hours) && count($p_hours)>0)
+                       {                       
+                               list($hours) = $p_hours;
                        return $hours;
                }
+               }
 
                function add_hours($values)
                {

Index: class.soprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soprojects.inc.php,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -b -r1.115 -r1.116
--- class.soprojects.inc.php    26 Nov 2006 14:14:26 -0000      1.115
+++ class.soprojects.inc.php    26 Nov 2006 22:21:13 -0000      1.116
@@ -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.115 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.soprojects.inc.php,v 1.116 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.soprojects.inc.php,v $
        */
 
@@ -327,6 +327,7 @@
                                        }
                                }
                        }
+                       $this->total_records = $num_pro;
                        return $pro;
                }
 
@@ -813,9 +814,10 @@
                function exists($params)
                {
                        $project_id     = intval($params['project_id']);
-                       $column_val     = 
$params['column_val']?$params['column_val']:$project_id;
-                       $check          = 
$params['check']?$params['check']:'project_id';
+                       $column_val     = 
isset($params['column_val'])?$params['column_val']:$project_id;
+                       $check          = 
isset($params['check'])?$params['check']:'project_id';
 
+                       $editexists = '';
                        switch($check)
                        {
                                case 'number':

Index: class.uiprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -b -r1.88 -r1.89
--- class.uiprojecthours.inc.php        26 Nov 2006 14:14:26 -0000      1.88
+++ class.uiprojecthours.inc.php        26 Nov 2006 22:21:13 -0000      1.89
@@ -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.88 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.uiprojecthours.inc.php,v 1.89 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v $
        */
 
@@ -403,10 +403,10 @@
                                default: $state_sel[0]=' selected'; 
$this->state = 'all';
                        }
 
-                       $state_list = '<option value="all"' . $state_sel[0] . 
'>' . lang('Show all') . '</option>' . "\n"
-                                   . '<option value="open"' . $state_sel[1] . 
'>' . lang('Open') . '</option>' . "\n"
-                                   . '<option value="done"' . $state_sel[2] . 
'>' . lang('Done') . '</option>' . "\n"
-                                   . '<option value="billed"' . $state_sel[3] 
. '>' . lang('Billed') . '</option>' . "\n";
+                       $state_list = '<option value="all"' . 
(isset($state_sel[0])?$state_sel[0]:'') . '>' . lang('Show all') . '</option>' 
. "\n"
+                                   . '<option value="open"' . 
(isset($state_sel[1])?$state_sel[1]:'') . '>' . lang('Open') . '</option>' . 
"\n"
+                                   . '<option value="done"' . 
(isset($state_sel[2])?$state_sel[2]:'') . '>' . lang('Done') . '</option>' . 
"\n"
+                                   . '<option value="billed"' . 
(isset($state_sel[3])?$state_sel[3]:'') . '>' . lang('Billed') . '</option>' . 
"\n";
 
                        
$GLOBALS['phpgw']->template->set_var('state_list',$state_list);
                        $this->bohours->state = $this->state;
@@ -997,7 +997,7 @@
                        }
 
                        $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";
+                                               . '<option value="done"' . 
(isset($stat_sel[1])?$stat_sel[1]:'') . '>' . lang('Done') . '</option>' . "\n";
 
                        return $status_list;
                }
@@ -1206,7 +1206,7 @@
                                
$GLOBALS['phpgw']->template->fp('mainhandle','main',True);
                        }
 
-                       if ($hours_id && !$_POST['save'])
+                       if ($hours_id && (!isset($_POST['save']) || 
!$_POST['save']))
                        {
                                $values                         = 
$this->bohours->read_single_hours($hours_id);
                                $activity_id            = 
$values['activity_id'];

Index: class.uistatistics.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uistatistics.inc.php,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- class.uistatistics.inc.php  25 Nov 2006 23:12:10 -0000      1.63
+++ class.uistatistics.inc.php  26 Nov 2006 22:21:13 -0000      1.64
@@ -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.uistatistics.inc.php,v 1.63 2006/11/25 23:12:10 
sigurdne Exp $
+       * @version $Id: class.uistatistics.inc.php,v 1.64 2006/11/26 22:21:13 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.uistatistics.inc.php,v $
        */
 
@@ -603,7 +603,7 @@
 
                        if (! $account_id)
                        {
-                               
$phpgw->redirect_link('/index.php','menuaction=projects.uistatistics.list_users&action=ustat');
+                               
$phpgw->redirect_link('/index.php',array('menuaction'=>'projects.uistatistics.list_users','action'=>'ustat'));
                        }
 
                        //$GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . lang('User statistics')
@@ -787,7 +787,7 @@
 
                        if (! $project_id)
                        {
-                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=projects.uistatistics.list_projects&action=mains');
+                               
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=>'projects.uistatistics.list_projects','action'=>'mains'));
                        }
                        else
                        {
@@ -859,8 +859,8 @@
                                $end_val = $end;
                        }
 
-                       $start  = 
$start_val?$start_val:mktime(12,0,0,date('m'),date('d'),date('Y'));
-                       $end    = 
$end_val?$end_val:mktime(12,0,0,date('m'),date('d')+30,date('Y'));
+                       $start  = 
isset($start_val)?$start_val:mktime(12,0,0,date('m'),date('d'),date('Y'));
+                       $end    = 
isset($end_val)?$end_val:mktime(12,0,0,date('m'),date('d')+30,date('Y'));
 
                        $GLOBALS['phpgw']->template->set_var('start',$start);
                        $GLOBALS['phpgw']->template->set_var('end',$end);




reply via email to

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