add option to unlink file in drop folder once uploaded

This commit is contained in:
Uwe Steinmann 2016-05-23 13:15:50 +02:00
parent 563dd3d224
commit 6ba8013d40
27 changed files with 62 additions and 2 deletions

View File

@ -85,6 +85,8 @@ class Settings { /* {{{ */
var $_luceneDir = null;
// Where the drop folders are located
var $_dropFolderDir = null;
// enable removal of file from dropfolder after success import
var $_removeFromDropFolder = false;
// Where the stop word file is located
var $_stopWordsFile = null;
// enable/disable lucene fulltext search
@ -529,6 +531,7 @@ class Settings { /* {{{ */
$this->_enableVersionModification = Settings::boolval($tab["enableVersionModification"]);
$this->_enableDuplicateDocNames = Settings::boolval($tab["enableDuplicateDocNames"]);
$this->_overrideMimeType = Settings::boolval($tab["overrideMimeType"]);
$this->_removeFromDropFolder = Settings::boolval($tab["removeFromDropFolder"]);
// XML Path: /configuration/advanced/notification
$node = $xml->xpath('/configuration/advanced/notification');
@ -795,6 +798,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "enableVersionModification", $this->_enableVersionModification);
$this->setXMLAttributValue($node, "enableDuplicateDocNames", $this->_enableDuplicateDocNames);
$this->setXMLAttributValue($node, "overrideMimeType", $this->_overrideMimeType);
$this->setXMLAttributValue($node, "removeFromDropFolder", $this->_removeFromDropFolder);
// XML Path: /configuration/advanced/notification
$node = $this->getXMLNode($xml, '/configuration/advanced', 'notification');

View File

@ -1144,6 +1144,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => '',
'settings_quota' => '',
'settings_quota_desc' => '',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => '',
'settings_restricted_desc' => '',
'settings_rootDir' => '',

View File

@ -1009,6 +1009,8 @@ $text = array(
'settings_printDisclaimer_desc' => 'Ако е включено, то дисклаймер из lang.inc ще се показва под всяка страница',
'settings_quota' => 'Квота за потребител',
'settings_quota_desc' => 'Максималният брой байтове, които всеки потребител може да заема на диска. 0 за неограничено използване на диска. Тази стойност може да бъде презаписана за всяко използване на профила.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Ограничен достъп',
'settings_restricted_desc' => 'Разреши вход за потребители, само ако имат съотв. запис в БД (независимо от успешния вход чрез LDAP)',
'settings_rootDir' => 'Корнева папка',

View File

@ -1014,6 +1014,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => '',
'settings_quota' => '',
'settings_quota_desc' => '',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => '',
'settings_restricted_desc' => '',
'settings_rootDir' => '',

View File

@ -1153,6 +1153,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => '',
'settings_quota' => 'Kvóta uživatele',
'settings_quota_desc' => 'Maximální počet bytů na disku, který může uživatel použít. Nula znamená neomezený prostor. Tato hodnota může být přepsána pro každé použití jeho profilu.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Restricted access',
'settings_restricted_desc' => '',
'settings_rootDir' => 'Root directory',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (2234), dgrutsch (21)
// Translators: Admin (2236), dgrutsch (21)
$text = array(
'accept' => 'Übernehmen',
@ -1190,6 +1190,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Anwählen, um die rechtlichen Hinweise am Ende jeder Seite anzuzeigen.',
'settings_quota' => 'User\'s quota',
'settings_quota_desc' => 'Die maximale Anzahl Bytes, die ein Benutzer belegen darf. Setzen Sie diesen Wert auf 0 für unbeschränkten Plattenplatz. Dieser Wert kann individuell in den Benutzereinstellungen überschrieben werden.',
'settings_removeFromDropFolder' => 'Datei aus Ablageordner nach erfolgreichem Hochladen löschen',
'settings_removeFromDropFolder_desc' => 'Schalten Sie dies ein, wenn eine Datei aus dem Ablageordner nach erfolgreichem Hochladen gelöscht werden soll.',
'settings_restricted' => 'Beschränkter Zugriff',
'settings_restricted_desc' => 'Nur Benutzer, die einen Eintrag in der Benutzerdatenbank haben dürfen sich anmelden (unabhängig von einer erfolgreichen Authentifizierung über LDAP)',
'settings_rootDir' => 'Wurzelverzeichnis',

View File

@ -19,7 +19,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// Translators: Admin (1380), dgrutsch (7), netixw (14)
// Translators: Admin (1383), dgrutsch (7), netixw (14)
$text = array(
'accept' => 'Accept',
@ -1191,6 +1191,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'If enabled, the disclaimer message will be printed on the bottom of every page',
'settings_quota' => 'User\'s quota',
'settings_quota_desc' => 'The maximum number of bytes a user may use on disk. Set this to 0 for unlimited disk space. This value can be overridden for each user in his profile.',
'settings_removeFromDropFolder' => 'Remove file from drop folder after successful upload',
'settings_removeFromDropFolder_desc' => 'Enable this, if a file taken from the drop folder shall be deleted after successful upload.',
'settings_restricted' => 'Restricted access',
'settings_restricted_desc' => 'Only allow users to log in if they have an entry in the local database (irrespective of successful authentication with LDAP)',
'settings_rootDir' => 'Root directory',

View File

@ -1159,6 +1159,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Si es Verdadero el mensaje de renuncia de los ficheros lang.inc se mostratá al final de la página',
'settings_quota' => 'Cuota de usuario',
'settings_quota_desc' => 'El número máximo de bytes que el usuario puede ocupar en disco. Asignar 0 para no limitar el espacio de disco. Este valor puede ser sobreescrito por cada uso en su perfil.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Acceso restringido',
'settings_restricted_desc' => 'Solo permitir conectar a usuarios si tienen alguna entrada en la base de datos local (independientemente de la autenticación correcta con LDAP)',
'settings_rootDir' => 'Carpeta raíz',

View File

@ -1135,6 +1135,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'If true the disclaimer message the lang.inc files will be print on the bottom of the page',
'settings_quota' => 'Quota de l\'utilisateur',
'settings_quota_desc' => 'Le maximum de bytes qu\'un utilisateur peut utiliser sur le disque. Définir à 0 pour un espace illimité. Cette valeur peut être outrepasser pour chaque utilisation dans son profile.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Accès restreint',
'settings_restricted_desc' => 'Autoriser les utilisateurs à se connecter seulement s\'ils ont une entrée dans la BD locale (independamment d\'une authentification réussie avec LDAP)',
'settings_rootDir' => 'Répertoire racine',

View File

@ -1180,6 +1180,8 @@ Internet poveznica: [url]',
'settings_printDisclaimer_desc' => 'Ako je omogućeno, poruka odricanja od odgovornosti će se ispisati na dnu svake stranice',
'settings_quota' => 'Korisnička kvota',
'settings_quota_desc' => 'Maksimalni broj bajtova na disku koji korisnik može koristiti. Postavite na 0 za neograničeni prostor na disku. Ova vrijednost može biti postavljena svakom korisniku u njegovom profilu.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Ograničeni pristup',
'settings_restricted_desc' => 'Omogući prijavu korisnicima samo ako imaju pristup u lokalnu bazu podataka (bez obzira na uspješnu autentifikaciju s LDAP-om)',
'settings_rootDir' => 'Root mapa',

View File

@ -1158,6 +1158,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Ha igaz a nyilatkozat üzenet a lang.inc állományok lesznek kiíratva a lap alján',
'settings_quota' => 'Felhasználói kvóta',
'settings_quota_desc' => 'A felhasználó által a lemezen használható bájtok legnagyobb száma. Állítsa 0-ra a korlátlan lemezterülethez. Ez az érték felülírható valamennyi felhasználó saját profiljában.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Korlátozott hozzáférés',
'settings_restricted_desc' => 'Kizárólag azok a felhasználók jelentkezhetnek be, akik a helyi adatbázisban vannak (függetlenül a sikeres LDAP azonosítástól)',
'settings_rootDir' => 'Gyökérkönyvtár',

View File

@ -1182,6 +1182,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Se abilitato il messaggio circa i termini e le condizioni d\'uso verrà mostrato nel pié di pagina.',
'settings_quota' => 'Quota utente',
'settings_quota_desc' => 'La quantità Max di spazio su disco che può essere occupata da ciascun utente. Impostare il valore 0 offre spazio illimitato.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Accesso limitato',
'settings_restricted_desc' => 'Permette agli utenti di entrare nel sistema soltanto se hanno un record nel database locale (ignora l\'autenticazione positiva attraverso LDAP)',
'settings_rootDir' => 'Cartella principale',

View File

@ -1173,6 +1173,8 @@ URL : [url]',
'settings_printDisclaimer_desc' => '활성인 경우 메시지 내역이 모든 페이지의 하단에 출력됩니다',
'settings_quota' => '사용자의 할당량',
'settings_quota_desc' => '사용자가 디스크를 사용할 수 있습니다 최대 바이트 수. 무제한 디스크 공간 사용시 0으로 설정합니다. 각각 자신의 프로필에 사용을 위해이 값은 변경 할 수 있습니다.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => '제한된 액세스',
'settings_restricted_desc' => '로컬 데이터베이스에 항목이있는 경우만 사용자가 로그인 할 수 있습니다. (LDAP 인증에 관계없이 )',
'settings_rootDir' => '루트 디렉토리',

View File

@ -1186,6 +1186,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Indien ingeschakeld zal het vrijwarings bericht in de lang.inc bestanden worden getoond onderop de pagina',
'settings_quota' => 'Gebruikersquotum',
'settings_quota_desc' => 'Het maximum aantal bytes een gebruiker op de schijf mag schrijven. Stel deze in op 0 voor een onbeperkte schijfruimte. Deze waarde kan worden overschreven voor elk gebruik in zijn profiel.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Beperkte toegang',
'settings_restricted_desc' => 'Sta alleen gebruiker toe om in te loggen die in de database zijn opgenomen (ongeacht succesvolle authenticatie met LDAP)',
'settings_rootDir' => 'Basismap',

View File

@ -1138,6 +1138,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Zaznaczenie tej opcji spowoduje, że na dole strony będzie wyświetlany komunikat zrzeczenia się zawarty w pliku lang.inc.',
'settings_quota' => 'Przydział dysku użytkownika',
'settings_quota_desc' => 'Maksymalna liczba bajtów jaką użytkownik może wykorzystać na dysku. Ustaw na 0 dla nieograniczonej przestrzeni dyskowej. Wartość ta może być zastąpiona dla każdego zastosowania w swoim profilu.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Ograniczony dostęp',
'settings_restricted_desc' => 'Mogą zalogować się tylko ci użytkownicy, którzy mają swoje wpisy w lokalnej bazie danych (niezależnie od pomyślnego uwierzytelnienia w LDAP)',
'settings_rootDir' => 'Katalog główny',

View File

@ -1156,6 +1156,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Se for verdade a mensagem de aviso de isenção os arquivos lang.inc será impresso na parte inferior da página',
'settings_quota' => 'Quota do Usuário',
'settings_quota_desc' => 'O número máximo de bytes que um utilizador pode usar no disco. Defina para 0 para o espaço em disco ilimitado. Este valor pode ser substituído para cada uso em seu perfil.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'acesso restrito',
'settings_restricted_desc' => 'Só permitir que os usuários façam login se eles têm uma entrada no banco de dados local (independentemente de autenticação bem-sucedida com LDAP)',
'settings_rootDir' => 'Diretório raiz',

View File

@ -1181,6 +1181,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Dacă este setat, mesajul de Disclaimer din fișierele lang.inc va fi printat în partea de jos a paginii',
'settings_quota' => 'Spatiu alocat utilizator',
'settings_quota_desc' => 'Numărul maxim de bytes pe care un utilizator îi poate folosi pe disc. Setați această opțiune pe 0 pentru spatiu pe disc nelimitat. Această valoare poate fi suprascrisă în profilul fiecărui utilizăr.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Acces restricționat',
'settings_restricted_desc' => 'Permite utilizatorilor să se autentifice doar dacă au o intrare în baza de date locală (indiferent de autentificarea cu succes folosind LDAP)',
'settings_rootDir' => 'Director rădăcină',

View File

@ -1188,6 +1188,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Если включено, то предупреждение из lang.inc будет выводится внизу каждой страницы.',
'settings_quota' => 'Квота пользователя',
'settings_quota_desc' => 'Максимально количество байт, которые пользователь может использовать на дисковом пространстве. Значение 0 снимает ограничение на используемое дисковое пространство. Это значение может быть указано отдельно для каждого пользователя в его профиле.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Ограниченный доступ',
'settings_restricted_desc' => 'Разрешать вход пользователям, только если у них есть соответствующая учётная запись в БД (независимо от успешного входа через LDAP).',
'settings_rootDir' => 'Корневой каталог',

View File

@ -1013,6 +1013,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => '',
'settings_quota' => '',
'settings_quota_desc' => '',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => '',
'settings_restricted_desc' => '',
'settings_rootDir' => '',

View File

@ -1144,6 +1144,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Om denna inställning sätts till ja, används meddelande som finns i lang.inc-filen och skrivs ut på slutet av sidan',
'settings_quota' => 'Användarens kvot',
'settings_quota_desc' => 'Maximala storlek av minnet i bytes som en användare har tillgång till. Storlek 0 bytes betyder obegränsad minne. Detta värde kan sättas individuellt för varje användare i dess profil.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Begränsad behörighet',
'settings_restricted_desc' => 'Tillåt användare att logga in bara om det finns en inloggning för användaren i den lokala databasen (irrespective of successful authentication with LDAP)',
'settings_rootDir' => 'Root-mapp',

View File

@ -1160,6 +1160,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Seçildiğinde sayfanın en altında lang.inc dosyasındaki gizlilik notu yazılacak',
'settings_quota' => 'Kullanıcı kotası',
'settings_quota_desc' => 'Kullanıcının yükleyebileceği maksimum dosya boyutu (byte cinsinden). Sınırsız kota için 0 girilir.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Kısıtlı erişim',
'settings_restricted_desc' => '(LDAP kullanıcısı olarak giriş yapılmış olunsa da) Sadece yerel veritabanında kullanıcı hesabı olanların girişine izin verilir.',
'settings_rootDir' => 'Kök dizin',

View File

@ -1181,6 +1181,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => 'Якщо увімкнено, то попередження з lang.inc буде виводитися внизу кожної сторінки.',
'settings_quota' => 'Квота користувача',
'settings_quota_desc' => 'Максимальна кількість байт, Які користувач може використовувати на дисковому просторі. Значення 0 знімає обмеження на дисковий простір. Це значення може бути вказано окремо для кожного користувача в його профілі.',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => 'Обмежений доступ',
'settings_restricted_desc' => 'Дозволити вхід користувачам, тільки якщо в них є відповідний обліковий запис в БД (незалежно від успішного входу через LDAP).',
'settings_rootDir' => 'Кореневий каталог',

View File

@ -1015,6 +1015,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => '如果开启,这个免责声明信息将在每个页面的底部显示',
'settings_quota' => '',
'settings_quota_desc' => '',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => '',
'settings_restricted_desc' => '',
'settings_rootDir' => '',

View File

@ -1013,6 +1013,8 @@ URL: [url]',
'settings_printDisclaimer_desc' => '',
'settings_quota' => '',
'settings_quota_desc' => '',
'settings_removeFromDropFolder' => '',
'settings_removeFromDropFolder_desc' => '',
'settings_restricted' => '',
'settings_restricted_desc' => '',
'settings_rootDir' => '',

View File

@ -426,6 +426,11 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
}
}
}
if($settings->_removeFromDropFolder) {
if(file_exists($userfiletmp)) {
unlink($userfiletmp);
}
}
}
add_log_line("?name=".$name."&folderid=".$folderid);

View File

@ -154,6 +154,7 @@ if ($action == "saveSettings")
$settings->_enableVersionModification = getBoolValue("enableVersionModification");
$settings->_enableDuplicateDocNames = getBoolValue("enableDuplicateDocNames");
$settings->_overrideMimeType = getBoolValue("overrideMimeType");
$settings->_removeFromDropFolder = getBoolValue("removeFromDropFolder");
// SETTINGS - ADVANCED - NOTIFICATION
$settings->_enableOwnerNotification = getBoolValue("enableOwnerNotification");

View File

@ -562,6 +562,10 @@ if(!is_writeable($settings->_configFilePath)) {
<td><?php printMLText("settings_overrideMimeType");?>:</td>
<td><input name="overrideMimeType" type="checkbox" <?php if ($settings->_overrideMimeType) echo "checked" ?> /></td>
</tr>
<tr title="<?php printMLText("settings_removeFromDropFolder_desc");?>">
<td><?php printMLText("settings_removeFromDropFolder");?>:</td>
<td><input name="removeFromDropFolder" type="checkbox" <?php if ($settings->_removeFromDropFolder) echo "checked" ?> /></td>
</tr>
<!--
-- SETTINGS - ADVANCED - NOTIFICATION