fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15832] custom fields, add support for json


From: sigurdne
Subject: [Fmsystem-commits] [15832] custom fields, add support for json
Date: Sun, 16 Oct 2016 15:27:39 +0000 (UTC)

Revision: 15832
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15832
Author:   sigurdne
Date:     2016-10-16 15:27:39 +0000 (Sun, 16 Oct 2016)
Log Message:
-----------
custom fields, add support for json

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.custom_fields.inc.php

Modified: trunk/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.custom_fields.inc.php      2016-10-16 15:26:32 UTC 
(rev 15831)
+++ trunk/phpgwapi/inc/class.custom_fields.inc.php      2016-10-16 15:27:39 UTC 
(rev 15832)
@@ -931,7 +931,7 @@
                        
                        if(isset($attrib['new_choice']) && 
$attrib['new_choice'] && !$doubled )
                        {
-                               $this->add_choice($location_id, $attrib_id, 
$attrib['new_choice'], $attrib['new_choice_id']);
+                               $this->add_choice($location_id, $attrib_id, 
$attrib['new_choice'], $attrib['new_choice_id'], $attrib['new_title_choice']);
                        }
 
                        if ( count($attrib['edit_choice'])  && !$doubled )
@@ -992,7 +992,7 @@
                 * @param integer $choice_id
 
                 */
-               public function add_choice($location_id,$attrib_id,$value, 
$choice_id = 0)
+               public function add_choice($location_id,$attrib_id,$value, 
$choice_id = 0, $title = '')
                {
                        if(!$choice_id)
                        {
@@ -1008,12 +1008,13 @@
                                $attrib_id,
                                $choice_id,
                                $choice_sort,
-                               $value
+                               $value,
+                               $title
                                );
 
                        $values = $this->_db->validate_insert($values);
 
-                       $this->_db->query("INSERT INTO phpgw_cust_choice 
(location_id, attrib_id, id,choice_sort, value) "
+                       $this->_db->query("INSERT INTO phpgw_cust_choice 
(location_id, attrib_id, id,choice_sort, value, title) "
                        . "VALUES ({$values})",__LINE__,__FILE__);
                }
 




reply via email to

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