phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.uilocation.inc.php
Date: Wed, 11 Oct 2006 10:14:53 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/10/11 10:14:53

Modified files:
        inc            : class.uilocation.inc.php 

Log message:
        check for mandatory values

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uilocation.inc.php?cvsroot=phpgroupware&r1=1.37&r2=1.38

Patches:
Index: class.uilocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- class.uilocation.inc.php    6 Oct 2006 12:23:22 -0000       1.37
+++ class.uilocation.inc.php    11 Oct 2006 10:14:53 -0000      1.38
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage location
-       * @version $Id: class.uilocation.inc.php,v 1.37 2006/10/06 12:23:22 
sigurdne Exp $
+       * @version $Id: class.uilocation.inc.php,v 1.38 2006/10/11 10:14:53 
sigurdne Exp $
        */
 
        /**
@@ -512,7 +512,6 @@
                        $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
                        
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp,'');
 
-
                        $values = false;
                        if(isset($_POST['save']))
                        {
@@ -554,6 +553,24 @@
                                        }
                                }
 
+                               if(!$values['cat_id'])
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('Please select a category'));
+                               }
+
+                               if 
(array_search('street_id',$insert_record['extra']) && 
(!isset($values['street_id']) || !$values['street_id']))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('Please select a street'));
+                               }
+                               if 
(array_search('part_of_town_id',$insert_record['extra']) && 
(!isset($values['part_of_town_id']) || !$values['part_of_town_id']))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('Please select a part of town'));
+                               }
+                               if 
(array_search('owner_id',$insert_record['extra']) && 
(!isset($values['owner_id']) || !$values['owner_id']))
+                               {
+                                       
$receipt['error'][]=array('msg'=>lang('Please select an owner'));
+                               }
+
                                $values['location_code']=implode("-", 
$values['location_code']);
 
                                if($values['location_code'] && !$location_code)




reply via email to

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