From 76660f9ecd53c1a6f41433c0e68ba73b507a6d39 Mon Sep 17 00:00:00 2001 From: ulrich <undisclosed> Date: Sat, 05 Aug 2017 17:09:20 +0000 Subject: [PATCH] Fancybox ein- und ausschalten --- src/java/de/uhilger/filecms/pub/Catalog.java | 29 +++++++---------------------- 1 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/java/de/uhilger/filecms/pub/Catalog.java b/src/java/de/uhilger/filecms/pub/Catalog.java index c7db6c4..1bc050f 100644 --- a/src/java/de/uhilger/filecms/pub/Catalog.java +++ b/src/java/de/uhilger/filecms/pub/Catalog.java @@ -47,26 +47,7 @@ * @return Liste der Dateien und Ordner am Ort relPath */ public List<FileRef> list(String relPath) { - Bild bild = new Bild(); - List<FileRef> files = new ArrayList(); - StringBuffer path = new StringBuffer(PUB_DIR_PATH); // www/ - path.append(relPath); - File dir = new File(getBase().getAbsolutePath(), path.toString()); - if(dir.exists()) { - File[] fileArray = dir.listFiles(); - for(int i = 0; i < fileArray.length; i++) { - logger.fine(fileArray[i].toURI().toString()); - String fname = fileArray[i].toURI().toString().replace("file:/", ""); - if(fileArray[i].isDirectory()) { - fname = fname.substring(0, fname.length() - 1); - } - logger.fine(fname); - FileRef ref = new FileRef(fname, fileArray[i].isDirectory()); - ref.setMimetype(bild.getMimeType(fileArray[i])); - files.add(ref); - } - } - return files; + return listInt(relPath, null, null); } /** @@ -80,7 +61,11 @@ * @return Liste der Dateien und Ordner am Ort relPath */ public List<FileRef> listOrdered(String relPath, String orderBy, String order) { - Bild bild = new Bild(); + return listInt(relPath, orderBy, order); + } + + private List<FileRef> listInt(String relPath, String orderBy, String order) { + Bild bild = new Bild(); List<FileRef> files = new ArrayList(); StringBuffer path = new StringBuffer(PUB_DIR_PATH); // www/ path.append(relPath); @@ -103,6 +88,6 @@ } } return files; - } + } } -- Gitblit v1.9.3