Changeset 1928


Ignore:
Timestamp:
01/08/10 16:22:07 (14 years ago)
Author:
amuller
Message:

Ticket #597 - Melhoria de performance, para testar posteriorente

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.vfs_sql.inc.php

    r1919 r1928  
    27662766 
    27672767                        $dir_clean = $this->clean_string (array ('string' => $dir)); 
    2768                         $sql .= " FROM phpgw_vfs WHERE ".$query_type." directory LIKE '".$GLOBALS['phpgw']->db->db_addslashes($dir_clean)."%'"; 
     2768                        $sql .= " FROM phpgw_vfs WHERE ".$query_type." directory = '".$GLOBALS['phpgw']->db->db_addslashes($dir_clean)."'"; 
    27692769                        $sql .= $this->extra_sql (array ('query_type' => VFS_SQL_SELECT)); 
    27702770 
     
    27812781                        { 
    27822782                                $record = $GLOBALS['phpgw']->db->Record; 
    2783  
    2784                                 /* Further checking on the directory.  This makes sure /home/user/test won't match /home/user/test22 */ 
    2785                                 if (@!ereg ("^$dir(/|$)", $record['directory'])) 
    2786                                 { 
    2787                                         continue; 
    2788                                 } 
    2789  
    2790                                 /* If they want only this directory, then $dir should end without a trailing / */ 
    2791                                 if (!$data['checksubdirs'] && ereg ("^$dir/", $record['directory'])) 
    2792                                 { 
    2793                                         continue; 
    2794                                 } 
    2795  
    27962783                                foreach($this->attributes as $attribute) 
    27972784                                { 
Note: See TracChangeset for help on using the changeset viewer.