[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16393] searc json object in database
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16393] searc json object in database |
Date: |
Tue, 28 Feb 2017 13:35:00 -0500 (EST) |
Revision: 16393
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16393
Author: sigurdne
Date: 2017-02-28 13:35:00 -0500 (Tue, 28 Feb 2017)
Log Message:
-----------
searc json object in database
Modified Paths:
--------------
trunk/property/inc/class.sogeneric_document.inc.php
Modified: trunk/property/inc/class.sogeneric_document.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric_document.inc.php 2017-02-28 17:46:25 UTC
(rev 16392)
+++ trunk/property/inc/class.sogeneric_document.inc.php 2017-02-28 18:35:00 UTC
(rev 16393)
@@ -82,10 +82,10 @@
}
$filtermethod = "WHERE a.mime_type != 'Directory' AND
a.mime_type != 'journal' AND a.mime_type != 'journal-deleted'";
+ $joinmethod .= " {$this->left_join} phpgw_vfs_filedata
b ON ( a.file_id = b.file_id )";
if ($cat_id)
{
- $joinmethod .= " {$this->join}
phpgw_vfs_filedata b ON ( a.file_id = b.file_id )";
$filtermethod .= " AND b.metadata @>
'{\"cat_id\":\"{$cat_id}\"}'";
}
@@ -127,7 +127,8 @@
if ($query)
{
$query = $this->db->db_addslashes($query);
- $querymethod = " AND a.name $this->like
'%$query%'";
+ $querymethod = " AND (a.name $this->like
'%{$query}%'";
+ $querymethod .= " OR metadata->>'descr' ilike
'%{$query}%')";
}
$sql = "SELECT DISTINCT a.file_id, a.* FROM phpgw_vfs a
" ." {$joinmethod} "." {$filtermethod} "." {$querymethod} ";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16393] searc json object in database,
sigurdne <=