fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17536]


From: nelson . guerra
Subject: [Fmsystem-commits] [17536]
Date: Wed, 10 Jan 2018 20:22:23 -0500 (EST)

Revision: 17536
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17536
Author:   nelson224
Date:     2018-01-10 20:22:23 -0500 (Wed, 10 Jan 2018)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/property/inc/class.soproject.inc.php

Modified: branches/dev-syncromind/property/inc/class.soproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soproject.inc.php        
2018-01-11 00:55:51 UTC (rev 17535)
+++ branches/dev-syncromind/property/inc/class.soproject.inc.php        
2018-01-11 01:22:23 UTC (rev 17536)
@@ -1220,22 +1220,28 @@
                        $receipt = array();
                        $historylog = CreateObject('property.historylog', 
'project');
 
-                       while (is_array($project['location']) && 
list($input_name, $value) = each($project['location']))
-                       {
+                        if (is_array($project['location']))
+                        {
+                            foreach($project['location'] as $input_name => 
$value)
+                            {
                                if ($value)
                                {
                                        $cols[] = $input_name;
                                        $vals[] = $value;
                                }
+                            }
                        }
 
-                       while (is_array($project['extra']) && list($input_name, 
$value) = each($project['extra']))
-                       {
+                        if (is_array($project['extra']))
+                        {
+                            foreach($project['extra'] as $input_name => $value)
+                            {
                                if ($value)
                                {
                                        $cols[] = $input_name;
                                        $vals[] = $value;
                                }
+                            }
                        }
 
                        $data_attribute = 
$this->custom->prepare_for_db('fm_project', $values_attribute);
@@ -1506,16 +1512,22 @@
                                $value_set = array_merge($value_set, 
$data_attribute['value_set']);
                        }
 
-                       while (is_array($project['location']) && 
list($input_name, $value) = each($project['location']))
-                       {
-                               $value_set[$input_name] = $value;
-                       }
+                       if (is_array($project['location']))
+                        {
+                            foreach($project['location'] as $input_name => 
$value)
+                            {
+                                    $value_set[$input_name] = $value;
+                            }
+                        }
+                       
+                        if (is_array($project['extra']))
+                        {
+                            foreach($project['extra'] as $input_name => $value)
+                            {
+                                    $value_set[$input_name] = $value;
+                            }
+                        }
 
-                       while (is_array($project['extra']) && list($input_name, 
$value) = each($project['extra']))
-                       {
-                               $value_set[$input_name] = $value;
-                       }
-
                        $value_set = $this->db->validate_update($value_set);
 
                        $this->db->transaction_begin();




reply via email to

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