phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.soconfig.inc.php class.uipro...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] projects/inc class.soconfig.inc.php class.uipro...
Date: Tue, 28 Nov 2006 11:55:11 +0000

CVSROOT:        /sources/phpgroupware
Module name:    projects
Changes by:     Sigurd Nes <sigurdne>   06/11/28 11:55:11

Modified files:
        inc            : class.soconfig.inc.php 
                         class.uiprojecthours.inc.php 

Log message:
        Notices and fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soconfig.inc.php?cvsroot=phpgroupware&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojecthours.inc.php?cvsroot=phpgroupware&r1=1.91&r2=1.92

Patches:
Index: class.soconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- class.soconfig.inc.php      27 Nov 2006 21:43:55 -0000      1.26
+++ class.soconfig.inc.php      28 Nov 2006 11:55:10 -0000      1.27
@@ -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.26 2006/11/27 21:43:55 
sigurdne Exp $
+       * @version $Id: class.soconfig.inc.php,v 1.27 2006/11/28 11:55:10 
sigurdne Exp $
        * $Source: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v $
        */
 
@@ -114,6 +114,8 @@
                        while ($this->db->next_record())
                        {
                                $activities_list .= '<option value="' . 
$this->db->f('id') . '"';
+                               if(isset($selected) && is_array($selected))
+                               {
                                for ($i=0;$i<count($selected);$i++)
                                {
                                        if($selected[$i]['activity_id'] == 
$this->db->f('id'))
@@ -121,6 +123,7 @@
                                                $activities_list .= ' selected';
                                        }
                                }
+                               }
                                $activities_list .= '>' . 
$GLOBALS['phpgw']->strip_html($this->db->f('descr')) . ' ['
                                                                                
. $GLOBALS['phpgw']->strip_html($this->db->f('a_number')) . ']';
                                if($billable)

Index: class.uiprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- class.uiprojecthours.inc.php        27 Nov 2006 21:36:26 -0000      1.91
+++ class.uiprojecthours.inc.php        28 Nov 2006 11:55:11 -0000      1.92
@@ -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.91 2006/11/27 21:36:26 
sigurdne Exp $
+       * @version $Id: class.uiprojecthours.inc.php,v 1.92 2006/11/28 11:55:11 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v $
        */
 
@@ -322,7 +322,7 @@
                                'action'                => 'hours'
                        );
 
-                       if($this->project_id)
+                       if($this->project_id > 0)
                        {
                                //$this->attached_files = 
CreateObject('projects.attached_files');
                                $main = 
$this->boprojects->read_single_project($this->boprojects->return_value('main',$this->project_id),'hours');
@@ -350,7 +350,7 @@
 
                        
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
 
-                       if ( ($main['coordinator'] == 
$GLOBALS['phpgw_info']['user']['account_id'])
+                       if ( (isset($main['coordinator']) && 
$main['coordinator'] == $GLOBALS['phpgw_info']['user']['account_id'])
                          || 
($this->boprojects->return_value('coordinator',$this->project_id) == 
$GLOBALS['phpgw_info']['user']['account_id'])
                          || ($this->boprojects->isprojectadmin('pad'))
                          || ($this->boprojects->isprojectadmin('pmanager'))
@@ -437,6 +437,8 @@
 
 // -------------- end header declaration 
---------------------------------------
 
+                       if(isset($hours) && is_array($hours))
+                       {
                        for ($i=0;$i<count($hours);$i++)
                        {
                                
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
@@ -510,10 +512,12 @@
 // --------------------------- end record declaration 
-----------------------------------
 
                        }
+                       }
 
+                       if($this->project_id > 0)
+                       {
                        $ptime_pro = 
$this->boprojects->return_value('ptime',$this->project_id);
                        $acc = $this->boprojects->get_budget(array('project_id' 
=> $this->project_id,'ptime' => $ptime_pro));
-
                        
$GLOBALS['phpgw']->template->set_var('uhours_pro',$this->boprojects->colored($acc['uhours_pro'],$ptime_pro,$acc['uhours_pro_wminutes'],'hours'));
                        
$GLOBALS['phpgw']->template->set_var('uhours_jobs',$this->boprojects->colored($acc['uhours_jobs'],$ptime_pro,$acc['uhours_jobs_wminutes'],'hours'));
                        
$GLOBALS['phpgw']->template->set_var('ahours_jobs',str_replace(".", ":", 
sprintf("%1.02f",$acc['ahours_jobs'])));
@@ -528,6 +532,8 @@
                        }
 
                        unset($link_data);
+                       }
+
                        $link_data['menuaction'] = 
'projects.uiprojecthours.controlling_sheet';
                        
$GLOBALS['phpgw']->template->set_var('view_controlling_sheet','<form 
method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',$link_data)
                                                                                
                                        . '"><input type="hidden" 
name="datum[start]" value="'.$start.'"><input type="hidden" name="datum[end]" 
value="'.$end.'"><input type="submit" name="view" value="' . lang('View 
controlling sheet') . '"></form>');




reply via email to

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