fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15255]


From: nelson . guerra
Subject: [Fmsystem-commits] [15255]
Date: Sat, 4 Jun 2016 00:32:35 +0000 (UTC)

Revision: 15255
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15255
Author:   nelson224
Date:     2016-06-04 00:32:35 +0000 (Sat, 04 Jun 2016)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php

Modified: 
branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php     
2016-06-04 00:32:20 UTC (rev 15254)
+++ branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php     
2016-06-04 00:32:35 UTC (rev 15255)
@@ -47,6 +47,7 @@
                        $start = isset($data['start']) && $data['start'] ? 
$data['start'] : 0;
                        $sort = isset($data['sort']) && $data['sort'] ? 
$data['sort'] : 'ASC';
                        $order = isset($data['order']) ? $data['order'] : '';
+                       $query = isset($data['query']) ? $data['query'] : '';
                        $allrows = isset($data['allrows']) ? $data['allrows'] : 
'';
                        $dry_run = isset($data['dry_run']) ? $data['dry_run'] : 
'';
                        $user_id = isset($data['user_id']) && $data['user_id'] 
? (int)$data['user_id'] : 0;
@@ -116,8 +117,15 @@
                                $filtermethod .= " AND a.directory 
{$this->like} '%{$location}%'";
                        }
 
-                       $sql = "SELECT DISTINCT a.file_id, a.* FROM phpgw_vfs a 
" ." {$joinmethod} "." {$filtermethod} ";
-               
+                       $querymethod = '';
+                       if ($query)
+                       {
+                               $query = $this->db->db_addslashes($query);
+                               $querymethod = " AND a.name $this->like 
'%$query%'";
+                       }
+                       
+                       $sql = "SELECT DISTINCT a.file_id, a.* FROM phpgw_vfs a 
" ." {$joinmethod} "." {$filtermethod} "." {$querymethod} ";
+       
                        $this->db->query($sql, __LINE__, __FILE__);
                        $this->total_records = $this->db->num_rows();
 




reply via email to

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