phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.soadmin_entity.php, 1.1.1.10


From: nomail
Subject: [Phpgroupware-cvs] property/class.soadmin_entity.php, 1.1.1.10
Date: Tue, 18 May 2004 08:19:43 +0200

Update of /property
Modified Files:
        Branch: 
          class.soadmin_entity.php

date: 2004/05/18 06:19:43;  author: sigurdne;  state: Exp;  lines: +8 -2

Log Message:
no message
=====================================================================
Index: property/class.soadmin_entity.php
diff -u property/class.soadmin_entity.php:1.1.1.9 
property/class.soadmin_entity.php:1.1.1.10
--- property/class.soadmin_entity.php:1.1.1.9   Tue May  4 08:42:06 2004
+++ property/class.soadmin_entity.php   Tue May 18 06:19:43 2004
@@ -766,7 +766,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " AND (fm_entity_attribute.name 
LIKE '%$query%' or fm_entity_attribute.descr LIKE '%$query%')";
+                               $querymethod = " AND 
(fm_entity_attribute.input_text LIKE '%$query%' or 
fm_entity_attribute.column_name LIKE '%$query%')";
                        }
 
                        $sql = "SELECT * FROM fm_entity_attribute WHERE 
entity_id=$entity_id AND cat_id = $cat_id $filtermethod $querymethod";
@@ -956,6 +956,7 @@
 
                        $GLOBALS['phpgw']->db->begintrans();
 
+                       $attrib_type=$attrib['column_info']['type'];
                        if(($OldColumnName !=$attrib['column_name']) || 
($attrib['column_info']['type'] != $dbresult->fields['datatype']))
                        {
 
@@ -1026,6 +1027,11 @@
                                }
                        }
 
+                       if($attrib_type!='R' && $attrib_type!='CH' && 
$attrib_type!='LB')
+                       {
+                               $GLOBALS['phpgw']->db->Execute("DELETE FROM 
$choice_table WHERE entity_id=" . $attrib['entity_id']. " AND cat_id=" . 
$attrib['cat_id']. " AND attrib_id=" . $attrib['id']);
+                       }
+
                        $GLOBALS['phpgw']->db->committrans();
 
                        $receipt['message'][] = array('msg'     => 
lang('Attribute has been edited'));
@@ -1045,7 +1051,7 @@
                        $sql = "SELECT attrib_sort FROM fm_entity_attribute 
where entity_id=$entity_id AND cat_id=$cat_id AND id=$id";
                        $dbresult = $GLOBALS['phpgw']->db->Execute($sql);
                        $attrib_sort    = $dbresult->fields['attrib_sort'];
-                       $sql2 = "SELECT max(attrib_sort) as max_sort FROM 
fm_entity_attribute where entity_id=$entity_id AND cat_id=$cat_id";
+                       $sql = "SELECT max(attrib_sort) as max_sort FROM 
fm_entity_attribute where entity_id=$entity_id AND cat_id=$cat_id";
                        $dbresult = $GLOBALS['phpgw']->db->Execute($sql);
                        $max_sort       = $dbresult->fields['max_sort'];
 




reply via email to

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