phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.custom_fields.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.custom_fields.inc.php
Date: Mon, 09 Oct 2006 07:01:59 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/10/09 07:01:59

Modified files:
        inc            : class.custom_fields.inc.php 

Log message:
        dump the rest of my mods in before sigurd fixes it

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.custom_fields.inc.php?cvsroot=phpgwapi&r1=1.5&r2=1.6

Patches:
Index: class.custom_fields.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.custom_fields.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- class.custom_fields.inc.php 30 Sep 2006 11:54:40 -0000      1.5
+++ class.custom_fields.inc.php 9 Oct 2006 07:01:59 -0000       1.6
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package phpgwapi
-       * @version $Id: class.custom_fields.inc.php,v 1.5 2006/09/30 11:54:40 
skwashd Exp $
+       * @version $Id: class.custom_fields.inc.php,v 1.6 2006/10/09 07:01:59 
skwashd Exp $
        */
 
        /**
@@ -479,6 +479,7 @@
                        $attribs = array();
                        while ($this->db->next_record())
                        {
+                               echo '<br>found: ' . 
$this->db->f('column_name');
                                $attribs[] = array
                                (
                                        'id'                            => 
$this->db->f('id'),
@@ -506,6 +507,19 @@
                                $this->total_records = $this->db->f('cnt_rec');;
                        }               
 
+                       if ( count($attribs) && $inc_choices )
+                       {
+                               foreach ( $attribs as $aid => $attrib )
+                               {
+                                       if ( $attrib['datatype'] == 'R'
+                                               || $attrib['datatype'] == 'CH'
+                                               || $attrib['datatype'] =='LB')
+                                       {
+                                               $attribs[$aid]['choice'] = 
$this->read_attrib_choice($appname, $location, $attrib['id']);
+                                       }
+                               }
+                       }
+
                        return $attribs;
                }
 
@@ -522,8 +536,8 @@
                        {
                                $attrib['id']                           = 
$this->db->f('id');
                                $attrib['column_name']                  = 
$this->db->f('column_name');
-                               $attrib['input_text']                   = 
$this->db->f('input_text');
-                               $attrib['statustext']                   = 
$this->db->f('statustext');
+                               $attrib['input_text']                           
= $this->db->f('input_text', true);
+                               $attrib['statustext']                           
= $this->db->f('statustext', true);
                                $attrib['column_info']['precision']     = 
$this->db->f('precision_');
                                $attrib['column_info']['scale']         = 
$this->db->f('scale');
                                $attrib['column_info']['default']       = 
$this->db->f('default_value');
@@ -536,11 +550,13 @@
                                $attrib['search']                       = 
$this->db->f('search');
                                $attrib['history']                      = 
$this->db->f('history');
                                
-                               if($this->db->f('datatype')=='R' || 
$this->db->f('datatype')=='CH' || $this->db->f('datatype')=='LB')
+                               if ( $inc_choices 
+                                       && ( $this->db->f('datatype') == 'R' 
+                                               || $this->db->f('datatype') == 
'CH' 
+                                               || $this->db->f('datatype') == 
'LB' ) )
                                {
-                                       $attrib['choice'] = 
$this->read_attrib_choice($appname,$location,$id);
+                                       $attrib['choice'] = 
$this->read_attrib_choice($appname, $location, $id);
                                }
-
                                return $attrib;
                        }
                }




reply via email to

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