phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.soentity.inc.php class.soact...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.soentity.inc.php class.soact...
Date: Mon, 30 Oct 2006 10:46:48 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/10/30 10:46:48

Modified files:
        inc            : class.soentity.inc.php class.soactor.inc.php 

Log message:
        Fix for query for datatype int in custom attributes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soentity.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soactor.inc.php?cvsroot=phpgroupware&r1=1.16&r2=1.17

Patches:
Index: class.soentity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- class.soentity.inc.php      20 Oct 2006 11:50:40 -0000      1.27
+++ class.soentity.inc.php      30 Oct 2006 10:46:48 -0000      1.28
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage entity
-       * @version $Id: class.soentity.inc.php,v 1.27 2006/10/20 11:50:40 
sigurdne Exp $
+       * @version $Id: class.soentity.inc.php,v 1.28 2006/10/30 10:46:48 
sigurdne Exp $
        */
 
        /**
@@ -292,14 +292,22 @@
 
                                        while ($this->db->next_record())
                                        {
-                                               
if($this->db->f('datatype')=='V' || $this->db->f('datatype')=='email' || 
$this->db->f('datatype')=='CH')
+                                               
if($this->db->f('datatype')=='V' || $this->db->f('datatype')=='email' || 
$this->db->f('datatype')=='CH'):
                                                {
                                                        $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " $this->like '%$query%'";
                                                }
-                                               else
+                                               
elseif($this->db->f('datatype')=='I'):
+                                               {
+                                                       if(ctype_digit($query))
+                                                       {
+                                                               $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " = " . intval($query);
+                                                       }
+                                               }
+                                               else:
                                                {
                                                        $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " = '$query'";
                                                }
+                                               endif;
                                        }
 
                                        if (isset($querymethod) AND 
is_array($querymethod))

Index: class.soactor.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soactor.inc.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- class.soactor.inc.php       18 Sep 2006 08:22:32 -0000      1.16
+++ class.soactor.inc.php       30 Oct 2006 10:46:48 -0000      1.17
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.soactor.inc.php,v 1.16 2006/09/18 08:22:32 
sigurdne Exp $
+       * @version $Id: class.soactor.inc.php,v 1.17 2006/10/30 10:46:48 
sigurdne Exp $
        */
 
        /**
@@ -211,14 +211,22 @@
 
                                while ($this->db->next_record())
                                {
-                                       if($this->db->f('datatype')=='V' || 
$this->db->f('datatype')=='email' || $this->db->f('datatype')=='CH')
+                                       if($this->db->f('datatype')=='V' || 
$this->db->f('datatype')=='email' || $this->db->f('datatype')=='CH'):
                                        {
                                                $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " $this->like '%$query%'";
                                        }
-                                       else
+                                       elseif($this->db->f('datatype')=='I'):
+                                       {
+                                               if(ctype_digit($query))
+                                               {
+                                                       $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " = " . intval($query);
+                                               }
+                                       }
+                                       else:
                                        {
                                                $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " = '$query'";
                                        }
+                                       endif;
                                }
 
                                if (isset($querymethod) AND 
is_array($querymethod))




reply via email to

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