propfind: fix regarding the retrieval of sqlfs_props, if key of array with a single entry is the vfspath for the file in question

This commit is contained in:
Klaus Leithoff 2009-06-10 10:33:38 +00:00
parent f9b3805dc8
commit ce593cac12

View File

@ -1632,9 +1632,9 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
$id = $stat['ino'];
}
}
if (count($ids) > 1) array_map(create_function('&$v','$v = (int)$v;'),$ids);
if (count($ids) >= 1) array_map(create_function('&$v','$v = (int)$v;'),$ids);
$query = 'SELECT * FROM '.self::PROPS_TABLE.' WHERE (fs_id'.
(count($ids) == 1 ? '='.(int)$ids[0] : ' IN ('.implode(',',$ids).')').')'.
(count($ids) == 1 ? '='.(int)implode('',$ids) : ' IN ('.implode(',',$ids).')').')'.
(!is_null($ns) ? ' AND prop_namespace=?' : '');
$stmt = self::$pdo->prepare($query);