phpgroupware-cvs
[Top][All Lists]
Advanced

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

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


From: nomail
Subject: [Phpgroupware-cvs] property/inc/class.soadmin_entity.inc.php, 1.2.2.5
Date: Tue, 7 Dec 2004 10:04:28 +0100

Update of /property/inc
Modified Files:
        Branch: proposed-0_9_18-branch
          class.soadmin_entity.inc.php

date: 2004/12/07 09:04:28;  author: sigurdne;  state: Exp;  lines: +8 -7

Log Message:
Using ilike if pgsql
=====================================================================
Index: property/inc/class.soadmin_entity.inc.php
diff -u property/inc/class.soadmin_entity.inc.php:1.2.2.4 
property/inc/class.soadmin_entity.inc.php:1.2.2.5
--- property/inc/class.soadmin_entity.inc.php:1.2.2.4   Mon Dec  6 15:01:22 2004
+++ property/inc/class.soadmin_entity.inc.php   Tue Dec  7 09:04:28 2004
@@ -38,6 +38,7 @@
                        $this->bocommon         = 
CreateObject($this->currentapp.'.bocommon');
 
                        $this->join                     = $this->bocommon->join;
+                       $this->like                     = $this->bocommon->like;
 
                        if($entity_id && $cat_id)
                        {
@@ -85,7 +86,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " where name LIKE '%$query%' or 
descr LIKE '%$query%'";
+                               $querymethod = " where name $this->like 
'%$query%' or descr $this->like '%$query%'";
                        }
 
                        $sql = "SELECT * FROM $table $querymethod";
@@ -151,7 +152,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " AND name LIKE '%$query%' or 
descr LIKE '%$query%'";
+                               $querymethod = " AND name $this->like 
'%$query%' or descr $this->like '%$query%'";
                        }
 
                        $sql = "SELECT * FROM $table WHERE entity_id=$entity_id 
$querymethod";
@@ -218,7 +219,7 @@
                                $query = ereg_replace("'",'',$query);
                                $query = ereg_replace('"','',$query);
 
-                               $querymethod = " AND name LIKE '%$query%' or 
descr LIKE '%$query%'";
+                               $querymethod = " AND name $this->like 
'%$query%' or descr $this->like '%$query%'";
                        }
 
                        $sql = "SELECT * FROM $table $querymethod";
@@ -657,8 +658,8 @@
                        $this->db->query("DELETE FROM fm_entity WHERE 
id=$id",__LINE__,__FILE__);
                        $this->db->query("DELETE FROM fm_entity_category WHERE 
entity_id=$id",__LINE__,__FILE__);
                        $this->db->query("DELETE FROM fm_entity_attribute WHERE 
entity_id=$id",__LINE__,__FILE__);
-                       $this->db->query("DELETE FROM fm_acl_location WHERE id 
LIKE '.entity." . $id ."%'",__LINE__,__FILE__);
-                       $this->db->query("DELETE FROM fm_acl2 WHERE 
acl_location LIKE '.entity." . $id ."%'",__LINE__,__FILE__);
+                       $this->db->query("DELETE FROM fm_acl_location WHERE id 
$this->like '.entity." . $id ."%'",__LINE__,__FILE__);
+                       $this->db->query("DELETE FROM fm_acl2 WHERE 
acl_location $this->like '.entity." . $id ."%'",__LINE__,__FILE__);
                        if (isset($category_list) AND is_array($category_list))
                        {
                                $this->init_process();
@@ -755,7 +756,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.name 
$this->like '%$query%' or fm_entity_attribute.descr $this->like '%$query%')";
                        }
 
                        $sql = "SELECT * FROM fm_entity_attribute WHERE 
entity_id=$entity_id AND cat_id = $cat_id $filtermethod $querymethod";




reply via email to

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