phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.soactor.inc.php, 1.6 class.soentit


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.soactor.inc.php, 1.6 class.soentity.inc.php, 1.4 class.uiadmin_entity.inc.php, 1.6 class.soadmin_entity.inc.php, 1.4
Date: Thu, 24 Feb 2005 15:09:17 -0000

Update of property/inc

Modified Files:
     Branch: MAIN
            class.soactor.inc.php lines: +13 -6
            class.soentity.inc.php lines: +24 -3
            class.uiadmin_entity.inc.php lines: +9 -3
            class.soadmin_entity.inc.php lines: +20 -7

Log Message:
no message

====================================================
Index: property/inc/class.soactor.inc.php
diff -u property/inc/class.soactor.inc.php:1.5 
property/inc/class.soactor.inc.php:1.6
--- property/inc/class.soactor.inc.php:1.5      Thu Jan 13 16:52:48 2005
+++ property/inc/class.soactor.inc.php  Tue Feb  1 11:35:09 2005
@@ -733,16 +733,23 @@

                        $this->db->transaction_begin();

+                       $value_set=array(
+                               'input_text'            => 
$attrib['input_text'],
+                               'statustext'            => 
$attrib['statustext'],
+                               'lookup_form'           => 
$attrib['lookup_form'],
+                               'search'                        => 
$attrib['search'],
+                               'list'                          => 
$attrib['list'],
+                               );
+
+                       $value_set      = 
$this->bocommon->validate_db_update($value_set);
+
+                       $this->db->query("UPDATE $attribute_table set 
$value_set WHERE id=" . $attrib['id']);
+
                        $attrib_type=$attrib['column_info']['type'];
                        if(($OldColumnName !=$attrib['column_name']) || 
($attrib['column_info']['type'] != $this->db->f('datatype')))
                        {
                                $value_set=array(
                                        'column_name'           => 
$attrib['column_name'],
-                                       'input_text'            => 
$attrib['input_text'],
-                                       'statustext'            => 
$attrib['statustext'],
-                                       'lookup_form'           => 
$attrib['lookup_form'],
-                                       'search'                        => 
$attrib['search'],
-                                       'list'                          => 
$attrib['list'],
                                        'datatype'                      => 
$attrib['column_info']['type'],
                                        'precision_'            => 
$attrib['column_info']['precision'],
                                        'scale'                         => 
$attrib['column_info']['scale'],

====================================================
Index: property/inc/class.soentity.inc.php
diff -u property/inc/class.soentity.inc.php:1.3 
property/inc/class.soentity.inc.php:1.4
--- property/inc/class.soentity.inc.php:1.3     Thu Jan 13 16:52:48 2005
+++ property/inc/class.soentity.inc.php Tue Feb  1 11:35:09 2005
@@ -259,8 +259,29 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);

-                               $querymethod = " $where ( 
$entity_table.location_code $this->like '%$query%' OR $entity_table.num 
$this->like '%$query%'  OR loc1_name $this->like '%$query%' OR address 
$this->like '%$query%')";
-                               $where = 'AND';
+                               $filtermethod .= " $where ( 
$entity_table.location_code $this->like '%$query%' OR $entity_table.num 
$this->like '%$query%'  OR loc1_name $this->like '%$query%' OR address 
$this->like '%$query%')";
+                               $where= 'OR';
+
+                               $this->db->query("SELECT * FROM 
fm_entity_attribute where search='1'");
+
+                               while ($this->db->next_record())
+                               {
+                                       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
+                                       {
+                                               $querymethod[]= 
"$entity_table." . $this->db->f('column_name') . " = '$query'";
+                                       }
+                               }
+
+                               if (isset($querymethod) AND 
is_array($querymethod))
+                               {
+                                       $querymethod = " $where (" . implode (' 
OR ',$querymethod) . ')';
+                                       $where = 'AND';
+                               }
+
                        }

                        $sql .= " $filtermethod $querymethod";

====================================================
Index: property/inc/class.uiadmin_entity.inc.php
diff -u property/inc/class.uiadmin_entity.inc.php:1.5 
property/inc/class.uiadmin_entity.inc.php:1.6
--- property/inc/class.uiadmin_entity.inc.php:1.5       Thu Jan 13 16:52:48 2005
+++ property/inc/class.uiadmin_entity.inc.php   Tue Feb  1 11:35:09 2005
@@ -903,6 +903,7 @@
                                                'column_name'                   
        => $entry['column_name'],
                                                'input_text'                    
        => $entry['input_text'],
                                                'sorting'                       
                => $entry['attrib_sort'],
+                                               'search'                        
                => $entry['search'],
                                                'link_up'                       
                => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_attribute&resort=up&entity_id='
 . $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id'] . '&allrows=' . 
$this->allrows),
                                                'link_down'                     
                => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.list_attribute&resort=down&entity_id='
 . $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id'] . '&allrows=' . 
$this->allrows),
                                                'link_edit'                     
                => 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiadmin_entity.edit_attrib&entity_id='
 . $entity_id . '&cat_id=' . $cat_id . '&id=' . $entry['id']),
@@ -927,6 +928,7 @@
                                'lang_descr'            => lang('Descr'),
                                'lang_datatype'         => lang('Datatype'),
                                'lang_sorting'          => lang('sorting'),
+                               'lang_search'           => lang('search'),
                                'lang_edit'                     => lang('edit'),
                                'lang_delete'           => lang('delete'),
                                'sort_name'     => 
$this->nextmatchs->show_sort_order(array
@@ -1199,9 +1201,13 @@
                                'lang_lookup_form_statustext'                   
=> lang('check to show this attribue in lookup forms'),
                                'value_list'                    => 
$values['list'],
                                'lang_list'                             => 
lang('show in list'),
-                               'lang_list_statustext'                  => 
lang('check to show this attribute in entity list')
+                               'lang_list_statustext'                  => 
lang('check to show this attribute in entity list'),
+                               'value_search'                          => 
$values['search'],
+                               'lang_include_search'           => 
lang('Include in search'),
+                               'lang_include_search_statustext'=> lang('check 
to show this attribute in location list'),
+
                        );
-//_debug_array($data);
+//_debug_array($values);

                        $appname                                                
= lang('entity');


====================================================
Index: property/inc/class.soadmin_entity.inc.php
diff -u property/inc/class.soadmin_entity.inc.php:1.3 
property/inc/class.soadmin_entity.inc.php:1.4
--- property/inc/class.soadmin_entity.inc.php:1.3       Thu Jan 13 16:52:48 2005
+++ property/inc/class.soadmin_entity.inc.php   Tue Feb  1 11:35:09 2005
@@ -792,8 +792,9 @@
                                        'statustext'    => 
$this->db->f('statustext'),
                                        'input_text'    => 
$this->db->f('input_text'),
                                        'type_name'             => 
$this->db->f('type'),
-                                       'datatype'              => 
$this->db->f('datatype')
-                               );
+                                       'datatype'              => 
$this->db->f('datatype'),
+                                       'search'                => 
$this->db->f('search')
+                       );
                        }
                        return $attrib;
                }
@@ -820,6 +821,7 @@
                                $attrib['type_name']                            
= $this->db->f('type_name');
                                $attrib['lookup_form']                          
= $this->db->f('lookup_form');
                                $attrib['list']                                 
        = $this->db->f('list');
+                               $attrib['search']                               
        = $this->db->f('search');
                                if($this->db->f('datatype')=='R' || 
$this->db->f('datatype')=='CH' || $this->db->f('datatype')=='LB')
                                {
                                        $attrib['choice'] = 
$this->read_attrib_choice($entity_id,$cat_id,$id);
@@ -867,6 +869,7 @@
                                $attrib['column_name'],
                                $attrib['input_text'],
                                $attrib['statustext'],
+                               $attrib['search'],
                                $attrib['list'],
                                $attrib_sort,
                                $attrib['column_info']['type'],
@@ -880,7 +883,7 @@

                        $this->db->transaction_begin();

-                       $this->db->query("INSERT INTO fm_entity_attribute 
(entity_id,cat_id,id,column_name, input_text, statustext,list,attrib_sort, 
datatype,precision_,scale,default_value,nullable) "
+                       $this->db->query("INSERT INTO fm_entity_attribute 
(entity_id,cat_id,id,column_name, input_text, 
statustext,search,list,attrib_sort, 
datatype,precision_,scale,default_value,nullable) "
                                . "VALUES ($values)",__LINE__,__FILE__);

                        $receipt['id']= $attrib['id'];
@@ -938,6 +941,8 @@
                function edit_attrib($attrib)
                {

+                       $choice_table = 'fm_entity_choice';
+
                        $attrib['column_name'] = 
$this->db->db_addslashes($attrib['column_name']);
                        $attrib['input_text'] = 
$this->db->db_addslashes($attrib['input_text']);
                        $attrib['statustext'] = 
$this->db->db_addslashes($attrib['statustext']);
@@ -949,14 +954,22 @@

                        $this->db->transaction_begin();

+                               $value_set=array(
+                                       'input_text'    => 
$attrib['input_text'],
+                                       'statustext'    => 
$attrib['statustext'],
+                                       'search'                => 
$attrib['search'],
+                                       'list'                  => 
$attrib['list'],
+                                       );
+
+                               $value_set      = 
$this->bocommon->validate_db_update($value_set);
+
+                               $this->db->query("UPDATE fm_entity_attribute 
set $value_set WHERE entity_id=" . $attrib['entity_id']. " AND cat_id=" . 
$attrib['cat_id']. " AND id=" . $attrib['id'],__LINE__,__FILE__);
+
                        if($OldColumnName !=$attrib['column_name'])
                        {

                                $value_set=array(
                                        'column_name'   => 
$attrib['column_name'],
-                                       'input_text'    => 
$attrib['input_text'],
-                                       'statustext'    => 
$attrib['statustext'],
-                                       'list'                  => 
$attrib['list'],
                                        'datatype'              => 
$attrib['column_info']['type'],
                                        'precision_'    => 
$attrib['column_info']['precision'],
                                        'scale'                 => 
$attrib['column_info']['scale'],






reply via email to

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