phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] projects/inc class.boconfig.inc.php class.bopro...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] projects/inc class.boconfig.inc.php class.bopro...
Date: Mon, 27 Nov 2006 15:00:08 +0000

CVSROOT:        /sources/phpgroupware
Module name:    projects
Changes by:     Sigurd Nes <sigurdne>   06/11/27 15:00:08

Modified files:
        inc            : class.boconfig.inc.php 
                         class.boprojecthours.inc.php 
                         class.boprojects.inc.php class.soconfig.inc.php 
                         class.soprojecthours.inc.php 
                         class.uiconfig.inc.php 
                         class.uiprojecthours.inc.php 
                         class.uiprojects.inc.php 
                         hook_preferences.inc.php 

Log message:
        notice and links

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boconfig.inc.php?cvsroot=phpgroupware&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojecthours.inc.php?cvsroot=phpgroupware&r1=1.40&r2=1.41
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.boprojects.inc.php?cvsroot=phpgroupware&r1=1.164&r2=1.165
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soconfig.inc.php?cvsroot=phpgroupware&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soprojecthours.inc.php?cvsroot=phpgroupware&r1=1.42&r2=1.43
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiconfig.inc.php?cvsroot=phpgroupware&r1=1.33&r2=1.34
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojecthours.inc.php?cvsroot=phpgroupware&r1=1.89&r2=1.90
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.uiprojects.inc.php?cvsroot=phpgroupware&r1=1.166&r2=1.167
http://cvs.savannah.gnu.org/viewcvs/projects/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.29&r2=1.30

Patches:
Index: class.boconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boconfig.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- class.boconfig.inc.php      8 Apr 2005 15:52:57 -0000       1.23
+++ class.boconfig.inc.php      27 Nov 2006 15:00:08 -0000      1.24
@@ -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.boconfig.inc.php,v 1.23 2005/04/08 15:52:57 ceb 
Exp $
+       * @version $Id: class.boconfig.inc.php,v 1.24 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: /sources/phpgroupware/projects/inc/class.boconfig.inc.php,v $
        */
 
@@ -190,6 +190,7 @@
 
                        $this->total_records = 
$this->boprojects->soconfig->total_records;
 
+                       $admin_data = false;
                        if(is_array($admins))
                        {
                                foreach($admins as $key => $ad)
@@ -228,8 +229,9 @@
 
                        $alladmins = 
$type=='user'?$aclusers['users']:$aclusers['groups'];
 
-                       if (is_array($alladmins))
+                       if (isset($alladmins) && is_array($alladmins))
                        {
+                               $selected_admins = '';
                                for($i=0;$i<count($alladmins);++$i)
                                {
                                        $selected_admins .= '<option value="' . 
$alladmins[$i] . '"';
@@ -667,7 +669,14 @@
                                                $workdays = $book_type;
                                                
                                                // time of booking in this month
-                                               
$holidays->add_number_of_workdays(1,$now_m,$now_y,$workdays,$country,$federal_state,$religion,&$new_d,&$new_m,&$new_y);
+                                               $new_days = 
$holidays->add_number_of_workdays(1,$now_m,$now_y,$workdays,$country,$federal_state,$religion);
+
+                                               $new_d = $new_days['newday'];
+                                               $new_m = $new_days['newmonth'];
+                                               $new_y = $new_days['newyear'];
+                                               
+                                               unset($new_days);
+
                                                $ts_book = 
mktime(0,0,0,$new_m,$new_d,$new_y)-1;
 
                                                if($ts_book < $ts_now)
@@ -684,7 +693,13 @@
                                                                $next_m = 
$now_m + 1;
                                                        }
                                                        
-                                                       
$holidays->add_number_of_workdays(1,$next_m,$next_y,$workdays,$country,$federal_state,$religion,&$new_d,&$new_m,&$new_y);
+                                                       $new_days = 
$holidays->add_number_of_workdays(1,$next_m,$next_y,$workdays,$country,$federal_state,$religion);
+                                                       $new_d = 
$new_days['newday'];
+                                                       $new_m = 
$new_days['newmonth'];
+                                                       $new_y = 
$new_days['newyear'];
+                                               
+                                                       unset($new_days);
+
                                                        $ts_book = 
mktime(0,0,0,$new_m,$new_d,$new_y)-1;
                                                }
 

Index: class.boprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -b -r1.40 -r1.41
--- class.boprojecthours.inc.php        26 Nov 2006 22:21:13 -0000      1.40
+++ class.boprojecthours.inc.php        27 Nov 2006 15:00:08 -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.boprojecthours.inc.php,v 1.40 2006/11/26 22:21:13 
sigurdne Exp $
+       * @version $Id: class.boprojecthours.inc.php,v 1.41 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.boprojecthours.inc.php,v $
        */
 
@@ -738,6 +738,8 @@
                
                function build_controlling_matrix($account_id, $start_date, 
$end_date)
                {
+                       
+                       $matrix = array();
                        if($account_id != 
$GLOBALS['phpgw_info']['user']['account_id'])
                        { // read projects for account_id
                                $this->boprojects->soprojects->account = 
$account_id;
@@ -773,7 +775,7 @@
                                {
                                        if($matrix[$i]['id'] == 
$hoursResult->f(1))
                                        {
-                                               
$matrix[$i]['days'][$hoursResult->f(0)] = $hoursResult->f(2);
+                                               
$matrix[$i]['days'][date("Ymd",$hoursResult->f(0))] = $hoursResult->f(2);
                                                break;
                                        }
                                }

Index: class.boprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.boprojects.inc.php,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -b -r1.164 -r1.165
--- class.boprojects.inc.php    26 Nov 2006 22:21:13 -0000      1.164
+++ class.boprojects.inc.php    27 Nov 2006 15:00:08 -0000      1.165
@@ -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.164 2006/11/26 22:21:13 
sigurdne Exp $
+       * @version $Id: class.boprojects.inc.php,v 1.165 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.boprojects.inc.php,v $
        */
 
@@ -2462,6 +2462,7 @@
 
                function check_prefs()
                {
+                       $error = false;
                        $prefs = $this->read_prefs(False);
 
                        if (! isset($prefs['currency']))
@@ -2923,7 +2924,12 @@
                        }
 
                        $workdays = $book_type;
-                       
$holidays->add_number_of_workdays(1,$next_m,$next_y,$workdays,$country,$federal_state,$religion,$new_d,$new_m,$new_y);
+                       $new_days = 
$holidays->add_number_of_workdays(1,$next_m,$next_y,$workdays,$country,$federal_state,$religion);
+                       $new_d = $new_days['newday'];
+                       $new_m = $new_days['newmonth'];
+                       $new_y = $new_days['newyear'];
+                       unset($new_days);
+                       
                        $ts_book = mktime(0,0,0,$new_m,$new_d,$new_y)-1;
 
                        // calc book month
@@ -3383,7 +3389,14 @@
 
                        // calculate day for warnmail sending by add number of 
workdays to first day of month
 
-                       
$holidays->add_number_of_workdays(1,$warnmail_month,$warnmail_year,$num_work_days,$country,$federal_state,$religion,&$warnmail_day,&$warnmail_month,&$warnmail_year);
+                       $new_days = 
$holidays->add_number_of_workdays(1,$warnmail_month,$warnmail_year,$num_work_days,$country,$federal_state,$religion);
+
+                       $warnmail_day = $new_days['newday'];
+                       $warnmail_month = $new_days['newmonth'];
+                       $warnmail_year = $new_days['newyear'];
+
+                       unset($new_days);
+
                        */
 
                        // use first day of next month for send mail

Index: class.soconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- class.soconfig.inc.php      26 Nov 2006 14:14:26 -0000      1.23
+++ class.soconfig.inc.php      27 Nov 2006 15:00:08 -0000      1.24
@@ -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.23 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.soconfig.inc.php,v 1.24 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v $
        */
 
@@ -109,6 +109,8 @@
                        }
 
                        $this->db->query('SELECT id,a_number,descr,billperae 
FROM phpgw_p_activities ORDER BY descr asc');
+                       
+                       $activities_list = '';
                        while ($this->db->next_record())
                        {
                                $activities_list .= '<option value="' . 
$this->db->f('id') . '"';

Index: class.soprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soprojecthours.inc.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- class.soprojecthours.inc.php        26 Nov 2006 22:21:13 -0000      1.42
+++ class.soprojecthours.inc.php        27 Nov 2006 15:00:08 -0000      1.43
@@ -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.42 2006/11/26 22:21:13 
sigurdne Exp $
+       * @version $Id: class.soprojecthours.inc.php,v 1.43 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.soprojecthours.inc.php,v $
        */
 
@@ -717,7 +717,8 @@
                function get_dayhours($employee, $start_date, $end_date)
                {
                        // Nice SQL-Statement Kai
-                       $sql  = 'SELECT 
UNIX_TIMESTAMP(FROM_UNIXTIME(start_date,"%Y%m%d")) as day, project_id, 
sum(minutes) + sum(t_journey) ';
+//                     $sql  = 'SELECT 
UNIX_TIMESTAMP(FROM_UNIXTIME(start_date,"%Y%m%d")) as day, project_id, 
sum(minutes) + sum(t_journey) '; // Mysql only
+                       $sql  = 'SELECT start_date as day, project_id, 
sum(minutes) + sum(t_journey) ';
                        $sql .= 'FROM phpgw_p_hours ';
                        $sql .= 'WHERE employee='.(int)$employee.' AND 
start_date >= '.(int)$start_date.' AND start_date <= '.((int)$end_date + 
86400).' ';
                        $sql .= 'GROUP BY project_id, day ';

Index: class.uiconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiconfig.inc.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- class.uiconfig.inc.php      8 Apr 2005 15:52:58 -0000       1.33
+++ class.uiconfig.inc.php      27 Nov 2006 15:00:08 -0000      1.34
@@ -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.uiconfig.inc.php,v 1.33 2005/04/08 15:52:58 ceb 
Exp $
+       * @version $Id: class.uiconfig.inc.php,v 1.34 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: /sources/phpgroupware/projects/inc/class.uiconfig.inc.php,v $
        */
 
@@ -79,9 +79,9 @@
 
                function set_app_langs()
                {
-                       
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
-                       
$GLOBALS['phpgw']->template->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
-                       
$GLOBALS['phpgw']->template->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
+                       
$GLOBALS['phpgw']->template->set_var('th_bg',(isset($GLOBALS['phpgw_info']['theme']['th_bg'])?$GLOBALS['phpgw_info']['theme']['th_bg']:''));
+                       
$GLOBALS['phpgw']->template->set_var('row_on',(isset($GLOBALS['phpgw_info']['theme']['row_on'])?$GLOBALS['phpgw_info']['theme']['row_on']:''));
+                       
$GLOBALS['phpgw']->template->set_var('row_off',(isset($GLOBALS['phpgw_info']['theme']['row_off'])?$GLOBALS['phpgw_info']['theme']['row_off']:''));
 
                        
$GLOBALS['phpgw']->template->set_var('lang_category',lang('Category'));
                        
$GLOBALS['phpgw']->template->set_var('lang_select',lang('Select'));
@@ -334,7 +334,7 @@
                        {
                                for ($i=0;$i<count($emps);$i++)
                                {
-                                       
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                                       
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
 
                                        
$GLOBALS['phpgw']->template->set_var(array
                                        (
@@ -559,7 +559,7 @@
 
             for ($i=0;$i<count($act);$i++)
             {
-                               
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                               
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
                                $descr = 
$GLOBALS['phpgw']->strip_html($act[$i]['descr']);
                                if (! $descr)
                                {
@@ -714,12 +714,12 @@
                                'action'                => $action
                        );
 
-                       if ($_POST['add'])
+                       if (isset($_POST['add']) && $_POST['add'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }
 
-                       if ($_POST['done'])
+                       if (isset($_POST['done']) && $_POST['done'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
                        }
@@ -736,6 +736,9 @@
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('projects') . ': ' . $header_info;
                        $GLOBALS['phpgw']->common->phpgw_header(True);
+                       unset($GLOBALS['phpgw']->template->file);
+                       unset($GLOBALS['phpgw']->template->varkeys);
+                       unset($GLOBALS['phpgw']->template->varvals);
 
                        $this->set_app_langs();
 
@@ -747,8 +750,8 @@
                        
$GLOBALS['phpgw']->template->set_var('search_list',$this->nextmatchs->search(array('query'
 => $this->query)));
                        $link_data['menuaction'] = 
'projects.uiconfig.list_admins';
                        
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
-                       
$GLOBALS['phpgw']->template->set_var('selected_admin',$selected_admin);
-                       
$GLOBALS['phpgw']->template->set_var('selected_salesman',$selected_salesman);
+                       
$GLOBALS['phpgw']->template->set_var('selected_admin',(isset($selected_admin)?$selected_admin:''));
+                       
$GLOBALS['phpgw']->template->set_var('selected_salesman',(isset($selected_salesman)?$selected_salesman:''));
 
                        $admins = $this->boconfig->list_admins($action);
 
@@ -775,7 +778,7 @@
 
                        for ($i=0;$i<count($admins);++$i)
                        {
-                               
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                               
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
 
                                if ($admins[$i]['type']=='user')
                                {
@@ -795,7 +798,7 @@
                                }
                        }
 
-                       if($group_th)
+                       if(isset($group_th) && $group_th)
                        {
                                
$GLOBALS['phpgw']->template->fp('gth','group_th',True);
                        }
@@ -817,13 +820,13 @@
                                'action'                => $action
                        );
 
-                       if ($_POST['save'])
+                       if (isset($_POST['save']) && $_POST['save'])
                        {
                                
$this->boconfig->edit_admins($action,$users,$groups);
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }
 
-                       if ($_POST['cancel'])
+                       if (isset($_POST['cancel']) && $_POST['cancel'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
                        }
@@ -864,7 +867,7 @@
                                'action'                => 'role'
                        );
 
-                       if ($_POST['save'])
+                       if (isset($_POST['save']) && $_POST['save'])
                        {
                                $error = 
$this->boconfig->check_pa_values(array('role_name' => $role_name),'role');
                                if(is_array($error))
@@ -878,13 +881,13 @@
                                }
                        }
 
-                       if ($_GET['delete'])
+                       if (isset($_GET['delete']) && $_GET['delete'])
                        {
                                $this->boconfig->delete_pa('role',$role_id);
                                
$GLOBALS['phpgw']->template->set_var('message',lang('role has been deleted'));
                        }
 
-                       if ($_POST['done'])
+                       if (isset($_POST['done']) && $_POST['done'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/preferences/index.php');
                        }
@@ -920,11 +923,11 @@
 
 // -------------------------- end header declaration 
--------------------------------------
 
-                       if(is_array($roles))
+                       if(isset($roles) && is_array($roles))
                        {
                                for($i=0;$i<count($roles);++$i)
                                {
-                                       
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                                       
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
                                        
$GLOBALS['phpgw']->template->set_var(array
                                        (
                                                'role_name'             => 
$roles[$i]['role_name'],
@@ -950,13 +953,13 @@
                                'menuaction'    => 
'projects.uiconfig.list_events'
                        );
 
-                       if ($_POST['save'])
+                       if (isset($_POST['save']) && $_POST['save'])
                        {
                                $this->boconfig->save_event($values);
                                
$GLOBALS['phpgw']->template->set_var('message',lang('event extra has been 
saved'));
                        }
 
-                       if ($_POST['done'])
+                       if (isset($_POST['done']) && $_POST['done'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/preferences/index.php');
                        }
@@ -975,7 +978,7 @@
 
                        for ($i=0;$i<count($events);$i++)
                        {
-                               
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                               
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
 
                                if($events[$i]['event_type'] == 'limits')
                                {
@@ -1014,7 +1017,7 @@
 
                        //_debug_array($values);
 
-                       if ($_POST['save'])
+                       if (isset($_POST['save']) && $_POST['save'])
                        {
                                if(strlen(trim($values['charge_name'])) == 0)
                                {
@@ -1022,7 +1025,7 @@
                                }
                                else
                                {
-                                       if($_POST['new_charge'])
+                                       if(isset($_POST['new_charge']) && 
$_POST['new_charge'])
                                        {
                                                $values['charge_id'] = 0;
                                        }
@@ -1031,17 +1034,17 @@
                                }
                        }
 
-                       if ($_POST['done'])
+                       if (isset($_POST['done']) && $_POST['done'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/preferences/index.php');
                        }
 
-                       if($_GET['edit'])
+                       if(isset($_GET['edit']) && $_GET['edit'])
                        {
                                list($values) = 
$this->boconfig->boprojects->list_surcharges($charge_id);
                        }
 
-                       if($_GET['delete'])
+                       if(isset($_GET['delete']) && $_GET['delete'])
                        {
                                $this->boconfig->delete_pa('charge',$charge_id);
                                
$GLOBALS['phpgw']->template->set_var('message',lang('surcharge has been 
deleted'));
@@ -1064,11 +1067,11 @@
 
                        $charges = 
$this->boconfig->boprojects->list_surcharges();
 
-                       if(is_array($charges))
+                       if(isset($charges) && is_array($charges))
                        {
                                foreach($charges as $charge)
                                {
-                                       
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                                       
$this->nextmatchs->template_alternate_row_class($GLOBALS['phpgw']->template);
 
                                        
$GLOBALS['phpgw']->template->set_var(array
                                        (
@@ -1097,12 +1100,12 @@
 
                function config_proid_help_msg()
                {
-                       if($_POST['save'])
+                       if(isset($_POST['save']) && $_POST['save'])
                        {
                                
$this->boconfig->config_proid_help_msg(array('action' => 
'save','proid_help_msg' => $_POST['proid_help_msg']));
                        }
 
-                       if($_POST['cancel'])
+                       if(isset($_POST['cancel']) && $_POST['cancel'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
                        }
@@ -1209,7 +1212,7 @@
 
                        for ($i=0;$i<count($entries);$i++)
                        {
-                               
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color($tr_color));
+                               
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_class($tr_color));
                                $firstname = $entries[$i]['per_first_name'];
                                if (!$firstname) { $firstname = '&nbsp;'; }
                                $lastname = $entries[$i]['per_last_name'];
@@ -1237,13 +1240,13 @@
                {
                        //_debug_array($_POST['prefs']);
                        
//_debug_array($GLOBALS['phpgw_info']['user']['preferences']);
-                       if ($_POST['save'])
+                       if (isset($_POST['save']) && $_POST['save'])
                        {
                                $this->boconfig->save_prefs($_POST['prefs']);
                                
$GLOBALS['phpgw']->redirect_link('/preferences/index.php');
                        }
 
-                       if ($_POST['done'])
+                       if (isset($_POST['done']) && $_POST['done'])
                        {
                                
$GLOBALS['phpgw']->redirect_link('/preferences/index.php');
                        }
@@ -1602,7 +1605,5 @@
 
                        $GLOBALS['phpgw']->template->pfp('out','config');
                }
-
-
        }
 ?>

Index: class.uiprojecthours.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- class.uiprojecthours.inc.php        26 Nov 2006 22:21:13 -0000      1.89
+++ class.uiprojecthours.inc.php        27 Nov 2006 15:00:08 -0000      1.90
@@ -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.89 2006/11/26 22:21:13 
sigurdne Exp $
+       * @version $Id: class.uiprojecthours.inc.php,v 1.90 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.uiprojecthours.inc.php,v $
        */
 
@@ -1661,8 +1661,10 @@
 /************************* Body **********************/
                                
                                
$GLOBALS['phpgw']->template->set_block('controlling', 'body_row', 
'body_rows_i');
-                               
$GLOBALS['phpgw']->template->set_block('controlling', 'row_title', 
'row_titles_i');
-                               
$GLOBALS['phpgw']->template->set_block('controlling', 'content_cell', 
'content_cells_i');
+
+//Fix this two next items in template
+                       //      
$GLOBALS['phpgw']->template->set_block('controlling', 'row_title', 
'row_titles_i');
+                       //      
$GLOBALS['phpgw']->template->set_block('controlling', 'content_cell', 
'content_cells_i');
 
                                for($i = 0; $i < count($matrix); $i++)
                                {

Index: class.uiprojects.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.uiprojects.inc.php,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -b -r1.166 -r1.167
--- class.uiprojects.inc.php    26 Nov 2006 14:14:26 -0000      1.166
+++ class.uiprojects.inc.php    27 Nov 2006 15:00:08 -0000      1.167
@@ -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.166 2006/11/26 14:14:26 
sigurdne Exp $
+       * @version $Id: class.uiprojects.inc.php,v 1.167 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/class.uiprojects.inc.php,v $
        */
 
@@ -122,8 +122,9 @@
                        {
                                $main = 
$this->boprojects->read_single_project($pro_main);
                                
$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']);
@@ -693,13 +694,16 @@
 
                                if ($action == 'mains')
                                {
-                                       $projects_url = 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_projects_home&pro_main='
-                                                                               
                                . $pro[$i]['project_id'] . '&action=subs');
+                                       $projects_url = 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.list_projects_home',
+                                                                               
                                                                        
'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));
                                }
 
                                $this->t->set_var(array
@@ -838,12 +842,12 @@
                                        default : $values['budgetradio'] = 'm'; 
break;
                                }
                                
-                               if($values['radio_acc_factor'] == 'day')
+                               if(isset($values['radio_acc_factor']) && 
$values['radio_acc_factor'] == 'day')
                                {
                                        $values['project_accounting_factor'] = 
$values['project_accounting_factor'] / $this->boprojects->siteconfig['hwday'];
                                }
 
-                               if ($values['accounting'] == 'project')
+                               if (isset($values['accounting']) && 
$values['accounting'] == 'project')
                                {
                                        $values['ptime']  = 
intval($values['ptime']);
                                        $values['budget'] = 
round($values['budget'], 2);
@@ -1170,7 +1174,7 @@
                                else
                                {
                                        
$GLOBALS['phpgw']->template->set_var('help_img','<a href="#"><img src="' . 
$GLOBALS['phpgw']->common->image('projects','help') . '" onclick="open_popup(\''
-                                                                               
                        . 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects_base.proid_help_popup')
 . '\');" title="'
+                                                                               
                        . 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects_base.proid_help_popup'))
 . '\');" title="'
                                                                                
                        . lang('help project nr') . '" alt="Project-Nr." 
/></a>');
                                }
 
@@ -1234,8 +1238,7 @@
                        {
 /*
                                
$GLOBALS['phpgw']->template->set_var('pro_main',$main['title'] . ' [' . 
$main['number'] . ']');
-                               
$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('lang_sum_jobs',lang('sum jobs'));
                                
$GLOBALS['phpgw']->template->set_var('lang_available',lang('available'));
 
@@ -1859,8 +1862,7 @@
                        {
                                $main = 
$this->boprojects->read_single_project($pro_main,'budget','mains');
                                
$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']);
@@ -1939,12 +1941,14 @@
                                $link_data['project_id'] = 
$pro[$i]['project_id'];
                                if ($action == 'mains')
                                {
-                                       $projects_url = 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.list_budget&action=subs&pro_main='
 . $pro[$i]['project_id']);
+                                       $projects_url = 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.list_budget','action'=>'subs','pro_main'=>
 $pro[$i]['project_id']));
                                }
                                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
@@ -2083,8 +2087,9 @@
 
                        $pro = 
$this->boprojects->read_single_project($project_id);
                        
$GLOBALS['phpgw']->template->set_var('title_pro',$pro['title']);
-                       
$GLOBALS['phpgw']->template->set_var('pro_url',$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiprojects.view_project&action='
-                                                                               
                                . ($pro['level']==0?'mains':'subs') . 
'&project_id=' . $project_id));
+                       
$GLOBALS['phpgw']->template->set_var('pro_url',$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiprojects.view_project',
+                                                                               
                                                                                
                                'action'=> ($pro['level']==0?'mains':'subs'),
+                                                                               
                                                                                
                                'project_id'=> $project_id)));
                        
$GLOBALS['phpgw']->template->set_var('coordinator_pro',$pro['coordinatorout']);
                        
$GLOBALS['phpgw']->template->set_var('number_pro',$pro['number']);
                        
$GLOBALS['phpgw']->template->set_var('customer_pro',$pro['customerout']);

Index: hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/hook_preferences.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- hook_preferences.inc.php    24 Nov 2006 20:59:44 -0000      1.29
+++ hook_preferences.inc.php    27 Nov 2006 15:00:08 -0000      1.30
@@ -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: hook_preferences.inc.php,v 1.29 2006/11/24 20:59:44 
sigurdne Exp $
+       * @version $Id: hook_preferences.inc.php,v 1.30 2006/11/27 15:00:08 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/hook_preferences.inc.php,v $
        */
 
@@ -14,7 +14,7 @@
                $title = $appname;
                $file = Array
                (
-       //              'Preferences'           => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiconfig.preferences')),
+                       'Preferences'           => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiconfig.preferences')),
                        'Grant Access'          => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'preferences.uiadmin_acl.aclprefs', 'acl_app'=> $appname)),
                        'Edit categories'       => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'admin.uicategories.index','cats_app'=>'projects','cats_level'=>'True','global_cats'=>'True'))
                );




reply via email to

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