From cc44885bbbc0d744970e728afb67786f8c4ae10b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 28 Oct 2014 18:54:03 +0000 Subject: [PATCH] * Add some new filter options to show all sub-directories and files from links --- filemanager/inc/class.filemanager_ui.inc.php | 10 ++++++++-- filemanager/lang/egw_de.lang | 1 + filemanager/lang/egw_en.lang | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index 67cab35678..616883ed24 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -462,6 +462,8 @@ class filemanager_ui '' => 'Current directory', '2' => 'Directories sorted in', '3' => 'Show hidden files', + '4' => 'All subdirectories', + '5' => 'Files from links', '0' => 'Files from subdirectories', ); @@ -784,16 +786,20 @@ class filemanager_ui // Re-map so 'No filters' favorite ('') is depth 1 $filter = $query['filter'] === '' ? 1 : $query['filter']; + + $maxdepth = $filter && $filter != 4 ? (int)(boolean)$filter : null; + if($filter == 5) $maxdepth = 2; foreach(egw_vfs::find(!empty($query['col_filter']['dir']) ? $query['col_filter']['dir'] : $query['path'],array( 'mindepth' => 1, - 'maxdepth' => $filter ? (int)(boolean)$filter : null, + 'maxdepth' => $maxdepth, 'dirsontop' => $filter <= 1, - 'type' => $filter ? null : 'f', + 'type' => $filter && $filter != 5 ? ($filter == 4 ? 'd' : null) : ($filter == 5 ? 'F':'f'), 'order' => $query['order'], 'sort' => $query['sort'], 'limit' => (int)$query['num_rows'].','.(int)$query['start'], 'need_mime' => true, 'name_preg' => $namefilter, 'hidden' => $filter == 3, + 'follow' => $filter == 5, ),true) as $path => $row) { //echo $path; _debug_array($row); diff --git a/filemanager/lang/egw_de.lang b/filemanager/lang/egw_de.lang index 115c95f17b..40ba16e58d 100644 --- a/filemanager/lang/egw_de.lang +++ b/filemanager/lang/egw_de.lang @@ -129,6 +129,7 @@ filemanager configuration admin de Konfiguration Dateimanager filemanager fields: filemanager de Dateimanager Felder: filename must not be empty! filemanager de Dateinamen darf nicht leer sein! files common de Dateien +files from links filemanager de Zeige Dateien aus verknüpften Einträgen files from subdirectories filemanager de Dateien aus Unterverzeichnissen files in this directory filemanager de Dateien in diesem Verzeichnis filesystem check reported no problems. filemanager de Überprüfung des Dateisystem ergab keine Probleme. diff --git a/filemanager/lang/egw_en.lang b/filemanager/lang/egw_en.lang index 3035012ced..4bf3e3d594 100644 --- a/filemanager/lang/egw_en.lang +++ b/filemanager/lang/egw_en.lang @@ -129,6 +129,7 @@ filemanager configuration admin en File Manager configuration filemanager fields: filemanager en Filemanager fields: filename must not be empty! filemanager en File name must not be empty! files common en Files +files from links filemanager en Files from links files from subdirectories filemanager en Files from sub directories files in this directory filemanager en Files in this directory filesystem check reported no problems. filemanager en Filesystem check reported no problems.