phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.uiproject.inc.php


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.uiproject.inc.php
Date: Wed, 27 Sep 2006 18:21:52 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/09/27 18:21:52

Modified files:
        inc            : class.uiproject.inc.php 

Log message:
        notice

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiproject.inc.php?cvsroot=phpgroupware&r1=1.35&r2=1.36

Patches:
Index: class.uiproject.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiproject.inc.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- class.uiproject.inc.php     27 Sep 2006 11:20:52 -0000      1.35
+++ class.uiproject.inc.php     27 Sep 2006 18:21:52 -0000      1.36
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.uiproject.inc.php,v 1.35 2006/09/27 11:20:52 
sigurdne Exp $
+       * @version $Id: class.uiproject.inc.php,v 1.36 2006/09/27 18:21:52 
sigurdne Exp $
        */
 
        /**
@@ -502,10 +502,13 @@
                        $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
                        $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession('insert_record_entity',$this->currentapp);
 
+                       if(isset($insert_record_entity) && 
is_array($insert_record_entity))
+                       {
                        for ($j=0;$j<count($insert_record_entity);$j++)
                        {
                                
$insert_record['extra'][$insert_record_entity[$j]]      = 
$insert_record_entity[$j];
                        }
+                       }
 
                        $GLOBALS['phpgw']->xslttpl->add_file(array('project'));
 
@@ -520,7 +523,7 @@
                        {
                                for ($i=0; 
$i<count($insert_record['location']); $i++)
                                {
-                                       
if($_POST[$insert_record['location'][$i]])
+                                       
if(isset($_POST[$insert_record['location'][$i]]) && 
$_POST[$insert_record['location'][$i]])
                                        {
                                                
$values['location'][$insert_record['location'][$i]]= 
$_POST[$insert_record['location'][$i]];
                                        }
@@ -528,16 +531,15 @@
 
                                while (is_array($insert_record['extra']) && 
list($key,$column) = each($insert_record['extra']))
                                {
-                                       if($_POST[$key])
+                                       if(isset($_POST[$key]) && $_POST[$key])
                                        {
                                                $values['extra'][$column]       
= $_POST[$key];
                                        }
                                }
 
-                               $values['street_name']          = 
$_POST['street_name'];
-                               $values['street_number']        = 
$_POST['street_number'];
-                               $values['location_name']        = $_POST['loc' 
. (count($values['location'])).'_name']; // if not address - get the parent 
name as address
-
+                               $values['street_name']          = 
(isset($_POST['street_name'])?$_POST['street_name']:'');
+                               $values['street_number']        = 
(isset($_POST['street_number'])?$_POST['street_number']:'');
+                               $values['location_name']        = 
(isset($values['location'])?$_POST['loc' . 
(count($values['location'])).'_name']:''); // if no address - get the parent 
name as address
                        }
                        else
                        {
@@ -572,14 +574,10 @@
 
                        }
 
-                       if($values['origin'])
+                       if(isset($values['origin']))
                        {
                                $origin         = $values['origin'];
                                $origin_id      = $values['origin_id'];
-                       }
-
-                       if($origin)
-                       {
                                unset($values['origin']);
                                unset($values['origin_id']);
                                $values['origin'][0]['type']= $origin;
@@ -595,7 +593,7 @@
 
                        $config->read_repository();
 
-                       if ($values['save'])
+                       if (isset($values['save']))
                        {
                                $save=true;
 
@@ -749,8 +747,7 @@
                                        }
                                }
 
-
-                               if($receipt['error'] && !$bypass_error)
+                               if($receipt['error'] && !isset($bypass_error))
                                {
                                        if($values['location'])
                                        {
@@ -768,7 +765,7 @@
                                }
                        }
 
-                       if($bypass_error || ((!$receipt['error'] || 
$add_request) && !$bypass) && $id)
+                       if(isset($bypass_error) || ((!isset($receipt['error']) 
|| $add_request) && !$bypass) && $id)
                        {
                                $values = $this->bo->read_single($id);
 
@@ -815,7 +812,7 @@
                                $function_msg = lang('Add Project');
                        }
 
-                       if ($values['cat_id'])
+                       if (isset($values['cat_id']))
                        {
                                $this->cat_id = $values['cat_id'];
                        }
@@ -824,16 +821,16 @@
 
 //_debug_array($values);
                        $location_data=$bolocation->initiate_ui_location(array(
-                                               'values'        => 
$values['location_data'],
+                                               'values'        => 
(isset($values['location_data'])?$values['location_data']:''),
                                                'type_id'       => -1, // 
calculated from location_types
                                                'no_link'       => False, // 
disable lookup links for location type less than type_id
                                                'tenant'        => True,
                                                'lookup_type'   => $lookup_type,
                                                'lookup_entity' => 
$this->bocommon->get_lookup_entity('project'),
-                                               'entity_data'   => $values['p']
+                                               'entity_data'   => 
(isset($values['p'])?$values['p']:'')
                                                ));
 
-                       if($values['contact_phone'])
+                       if(isset($values['contact_phone']))
                        {
                                for 
($i=0;$i<count($location_data['location']);$i++)
                                {
@@ -853,11 +850,10 @@
                        $link_request_data = array
                        (
                                'menuaction'    => 
$this->currentapp.'.uirequest.index',
-                               'query'                 => 
$values['location_data']['loc1'],
-                               'project_id'    => $values['project_id']
+                               'query'         => 
(isset($values['location_data']['loc1'])?$values['location_data']['loc1']:''),
+                               'project_id'    => 
(isset($values['project_id'])?$values['project_id']:'')
                        );
 
-
                        
$supervisor_id=$GLOBALS['phpgw_info']['user']['preferences'][$this->currentapp]['approval_from'];
                        $need_approval = 
$config->config_data['workorder_approval'];
 




reply via email to

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