forked from extern/egroupware
Fix in vfs_sql2 bugs when running in pgsql.
This commit is contained in:
parent
412c57df47
commit
762995c5b4
@ -37,8 +37,8 @@
|
||||
|
||||
$sql = "SELECT cf.customfield_name as name,
|
||||
cfd.data as data
|
||||
FROM phpgw_vfs2_customfields cf,
|
||||
phpgw_vfs2_customfields_data cfd
|
||||
FROM phpgw_vfs2_customfields as cf,
|
||||
phpgw_vfs2_customfields_data as cfd
|
||||
WHERE cf.customfield_id = cfd.customfield_id
|
||||
AND cf.customfield_active = 'Y'
|
||||
AND cfd.file_id = $file_id";
|
||||
|
@ -215,8 +215,8 @@
|
||||
sh.acl_rights as acl_rights,
|
||||
fls.directory as directory,
|
||||
fls.name as name
|
||||
FROM phpgw_vfs2_shares sh,
|
||||
phpgw_vfs2_files fls
|
||||
FROM phpgw_vfs2_shares as sh,
|
||||
phpgw_vfs2_files as fls
|
||||
WHERE sh.file_id = fls.file_id
|
||||
AND fls.shared = 'Y'
|
||||
AND fls.owner_id = $account_id";
|
||||
@ -237,8 +237,8 @@
|
||||
sh.acl_rights as acl_rights,
|
||||
fls.directory as directory,
|
||||
fls.name as name
|
||||
FROM phpgw_vfs2_shares sh,
|
||||
phpgw_vfs2_files fls
|
||||
FROM phpgw_vfs2_shares as sh,
|
||||
phpgw_vfs2_files as fls
|
||||
WHERE sh.file_id = fls.file_id
|
||||
AND sh.account_id IN (".implode(',',$accounts).")
|
||||
AND fls.shared = 'Y'
|
||||
@ -288,8 +288,8 @@
|
||||
sh.acl_rights as acl_rights,
|
||||
fls.directory as directory,
|
||||
fls.name as name
|
||||
FROM phpgw_vfs2_shares sh,
|
||||
phpgw_vfs2_files fls
|
||||
FROM phpgw_vfs2_shares as sh,
|
||||
phpgw_vfs2_files as fls
|
||||
WHERE sh.file_id = fls.file_id
|
||||
AND sh.account_id IN (".implode(',',$accounts).")
|
||||
AND ( fls.directory LIKE '%$keyword%'
|
||||
@ -375,8 +375,8 @@
|
||||
fls.directory as directory,
|
||||
fls.name as name,
|
||||
fls.owner_id as owner_id
|
||||
FROM phpgw_vfs2_shares sh,
|
||||
phpgw_vfs2_files fls
|
||||
FROM phpgw_vfs2_shares as sh,
|
||||
phpgw_vfs2_files as fls
|
||||
WHERE sh.file_id = fls.file_id
|
||||
AND (sh.account_id IN ($accounts)
|
||||
OR fls.owner_id = $account_id)
|
||||
|
@ -3201,7 +3201,7 @@
|
||||
|
||||
if($mime_type)
|
||||
{
|
||||
$GLOBALS['phpgw']->db->query ("UPDATE phpgw_vfs2_files file, phpgw_vfs2_mimetypes mime SET mime.mime_id=file.mime_id WHERE mime.mime='".$mime_type."' AND file.directory='".
|
||||
$GLOBALS['phpgw']->db->query ("UPDATE phpgw_vfs2_files as file, phpgw_vfs2_mimetypes as mime SET mime.mime_id=file.mime_id WHERE mime.mime='".$mime_type."' AND file.directory='".
|
||||
$GLOBALS['phpgw']->db->db_addslashes($p->fake_leading_dirs_clean)."' AND file.name='".
|
||||
$GLOBALS['phpgw']->db->db_addslashes($p->fake_name_clean)."'" .
|
||||
$this->extra_sql (array ('query_type' => VFS_SQL_SELECT)), __LINE__, __FILE__);
|
||||
|
@ -340,8 +340,8 @@
|
||||
vers.backup_file_id as backup_file_id,
|
||||
files.directory as directory,
|
||||
files.name as name
|
||||
FROM phpgw_vfs2_versioning vers,
|
||||
phpgw_vfs2_files files
|
||||
FROM phpgw_vfs2_versioning as vers,
|
||||
phpgw_vfs2_files as files
|
||||
WHERE vers.file_id=$file_id
|
||||
AND vers.backup_file_id = files.file_id
|
||||
ORDER BY vers.modified";
|
||||
|
Loading…
Reference in New Issue
Block a user