Changeset 7310
- Timestamp:
- Mar 20, 2017, 9:17:26 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/util/FileUtil.java
r6880 r7310 57 57 import java.util.ArrayList; 58 58 import java.util.Arrays; 59 import java.util.Collection; 59 60 import java.util.Collections; 60 61 import java.util.HashMap; … … 355 356 return tree; 356 357 } 357 358 358 /** 359 359 Load a minimal directory tree that includes at least all the specified directories … … 371 371 throws InvalidDataException, BaseException 372 372 { 373 return loadMinimalDirectoryTree(dc, Include.ALL, directories); 374 } 375 376 /** 377 Load a minimal directory tree that includes at least all the specified directories 378 and their parent directories all the way up to the root or as far as the logged in user 379 has read permission. 380 @param dc A DbControl for accessing the database 381 @param include Include settings for loading sub directories 382 @param directories An array of directories 383 @return A <code>Map</code> which maps a directory to a 384 list of it's sub-directories. The map is guaranteed to contain an entry for each of 385 the given directories, but the list may be empty if there are no subdirectories 386 @throws BaseException If there is an error 387 @since 3.11 388 */ 389 public static Map<Directory, List<Directory>> loadMinimalDirectoryTree(DbControl dc, Collection<Include> include, Directory... directories) 390 throws InvalidDataException, BaseException 391 { 373 392 Map<Directory, List<Directory>> tree = new HashMap<Directory, List<Directory>>(); 374 393 … … 414 433 ); 415 434 query.order(Orders.asc(Hql.property("name"))); 416 query.include(Include.MINE, Include.SHARED, Include.OTHERS, Include.NOT_REMOVED, Include.REMOVED); 435 if (include != null && include.size() > 0) 436 { 437 query.setIncludes(include); 438 } 417 439 query.setParameter("parents", all, Type.INT); 418 440 -
trunk/www/filemanager/files/list_files.jsp
r7269 r7310 115 115 // Create directory query 116 116 final ItemQuery<Directory> directoryQuery = Directory.getQuery(); 117 directoryQuery. include(cc.getInclude());117 directoryQuery.setIncludes(cc.getInclude()); 118 118 if (!isSearch) 119 119 {
Note: See TracChangeset
for help on using the changeset viewer.