From dee934e1f59048a4461fb7a53b4d5407d9b3deac Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 3 Mar 2016 13:43:42 +0000 Subject: [PATCH] setting defaults of 100 days and directory / and enhanced efficient delete method to be used even if number of days is specified --- filemanager/inc/class.filemanager_admin.inc.php | 16 +++++++++++----- filemanager/lang/egw_de.lang | 3 ++- filemanager/lang/egw_en.lang | 3 ++- filemanager/templates/default/admin.xet | 4 ++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/filemanager/inc/class.filemanager_admin.inc.php b/filemanager/inc/class.filemanager_admin.inc.php index 865126f92a..6859dc1d96 100644 --- a/filemanager/inc/class.filemanager_admin.inc.php +++ b/filemanager/inc/class.filemanager_admin.inc.php @@ -183,9 +183,9 @@ class filemanager_admin extends filemanager_ui $deleted = $errors = 0; // shortcut to efficently delete every old version and deleted file - if ($content['versionedpath'] == '/' && !$content['ctime']) + if ($content['versionedpath'] == '/') { - $deleted = Versioning\StreamWrapper::purge_all_versioning(); + $deleted = Versioning\StreamWrapper::purge_all_versioning($content['mtime']); } else { @@ -194,8 +194,8 @@ class filemanager_admin extends filemanager_ui 'hidden' => true, 'depth' => true, 'path_preg' => '#/\.(attic|versions)/#', - )+(!(int)$content['ctime'] ? array() : array( - 'ctime' => ($content['ctime']<0?'-':'+').(int)$content['ctime'], + )+(!(int)$content['mtime'] ? array() : array( + 'mtime' => ($content['mtime']<0?'-':'+').(int)$content['mtime'], )), function($path) use (&$deleted, &$errors) { if (($is_dir = Vfs::is_dir($path)) && Vfs::rmdir($path) || @@ -218,9 +218,15 @@ class filemanager_admin extends filemanager_ui } } } + else + { + // defaults for deleting of older versions + $content['versionedpath'] = '/'; + $content['mtime'] = 100; + } if (true) $content = array( 'versionedpath' => $content['versionedpath'], - 'ctime' => $content['ctime'], + 'mtime' => $content['mtime'], ); if ($this->versioning) { diff --git a/filemanager/lang/egw_de.lang b/filemanager/lang/egw_de.lang index 13379295f9..bdcab5c949 100644 --- a/filemanager/lang/egw_de.lang +++ b/filemanager/lang/egw_de.lang @@ -26,6 +26,7 @@ %d erros while moving, %d files successfully moved. filemanager de %d Fehler beim Verschieben (%d Dateien erfolgreich verschoben)! %d files successfully copied. filemanager de %d Dateien erfolgreich kopiert %d files successfully moved. filemanager de %d Dateien erfolgreich verschoben +/ = everywhere filemanager de / = überall 0 means all, -n newer then n days filemanager de 0 für alle, -N für neuer als N Tage accessrights filemanager de Zugangsberechtigungen acl added. filemanager de Zugriffsrecht hinzugefügt. @@ -264,6 +265,7 @@ there's already a file with that name! filemanager de Es gibt bereits eine Datei tile view filemanager de Kachelansicht to overwrite the existing file store again. filemanager de Zum Überschreiben der Datei nochmal speichern. total files filemanager de Gesamtanzahl Dateien +under directory filemanager de unter dem Verzeichnis unmount filemanager de Unmount unused space filemanager de Nicht benutzter Platz up filemanager de Nach oben @@ -273,7 +275,6 @@ upload files filemanager de Dateien hochladen use this tag for addresslabels. put the content, you want to repeat, between two tags. filemanager de Benutzen Sie dieses Symbol für Adressetiketten. Stellen Sie den Inhalt der wiederholt werden soll zwischen 2 Symbole. used space filemanager de Benutzter Platz users and groups filemanager de Benutzer und Gruppen -versioned directory filemanager de Versioniertes Verzeichnis versioning filemanager de Versionierung vfs mounts and versioning common de VFS einhängen und versionieren who should be allowed to finally delete deleted files or old versions of a file: filemanager de Wer soll gelöschte Dateien oder ältere Versionen endgültig löschen dürfen: diff --git a/filemanager/lang/egw_en.lang b/filemanager/lang/egw_en.lang index 3d19a7ae40..1680ae8072 100644 --- a/filemanager/lang/egw_en.lang +++ b/filemanager/lang/egw_en.lang @@ -26,6 +26,7 @@ %d erros while moving, %d files successfully moved. filemanager en %d errors while moving, %d files successfully moved. %d files successfully copied. filemanager en %d files successfully copied. %d files successfully moved. filemanager en %d files successfully moved. +/ = everywhere filemanager en / = everywhere 0 means all, -n newer then n days filemanager en 0 means all, -N newer then N days accessrights filemanager en Access rights acl added. filemanager en ACL added. @@ -264,6 +265,7 @@ there's already a file with that name! filemanager en There's already a file wit tile view filemanager en Tile view to overwrite the existing file store again. filemanager en To overwrite the existing filestore again total files filemanager en Total files +under directory filemanager en under directory unmount filemanager en Unmount unused space filemanager en Unused space up filemanager en Up @@ -273,7 +275,6 @@ upload files filemanager en Upload files use this tag for addresslabels. put the content, you want to repeat, between two tags. filemanager en Use this tag for addresslabels. Put the content, you want to repeat, between two tags. used space filemanager en Used space users and groups filemanager en Users and groups -versioned directory filemanager en Versioned directory versioning filemanager en Versioning vfs mounts and versioning common en VFS mounts and versioning who should be allowed to finally delete deleted files or old versions of a file: filemanager en Who should be allowed to finally delete deleted files or old versions of a file: diff --git a/filemanager/templates/default/admin.xet b/filemanager/templates/default/admin.xet index f13bfc6edc..98e918068b 100644 --- a/filemanager/templates/default/admin.xet +++ b/filemanager/templates/default/admin.xet @@ -69,8 +69,8 @@ - - + +