fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7483] property: fix add new item at sogeneric


From: Sigurd Nes
Subject: [Fmsystem-commits] [7483] property: fix add new item at sogeneric
Date: Mon, 08 Aug 2011 12:38:33 +0000

Revision: 7483
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7483
Author:   sigurdne
Date:     2011-08-08 12:38:33 +0000 (Mon, 08 Aug 2011)
Log Message:
-----------
property: fix add new item at sogeneric

Modified Paths:
--------------
    trunk/property/inc/class.sogeneric.inc.php

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2011-08-01 13:37:07 UTC (rev 
7482)
+++ trunk/property/inc/class.sogeneric.inc.php  2011-08-08 12:38:33 UTC (rev 
7483)
@@ -2258,14 +2258,14 @@
 
                        if($this->location_info['id']['type']!='auto')
                        {
-                               $this->_db->query("SELECT id FROM {$table} 
WHERE {$this->location_info['id']['name']} = 
'{$data['id']}'",__LINE__,__FILE__);
+                               $this->_db->query("SELECT 
{$this->location_info['id']['name']} AS id FROM {$table} WHERE 
{$this->location_info['id']['name']} = 
'{$data[$this->location_info['id']['name']]}'",__LINE__,__FILE__);
                                if($this->_db->next_record())
                                {
                                        
$receipt['error'][]=array('msg'=>lang('duplicate key value'));
                                        
$receipt['error'][]=array('msg'=>lang('record has not been saved'));
                                        return $receipt;
                                }
-                               $id = $data['id'];
+                               $id = $data[$this->location_info['id']['name']];
                        }
                        else
                        {




reply via email to

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