mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
6fbc6043eb
|
@ -224,6 +224,8 @@
|
|||
in list of notifiers
|
||||
- improve fulltext search
|
||||
- improve validation of change password form
|
||||
- better error checking if uploading or adding a document failed due to
|
||||
size limits
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.23
|
||||
|
|
|
@ -93,7 +93,7 @@ class SeedDMS_Lucene_Search {
|
|||
if($querystr)
|
||||
$querystr .= ' && ';
|
||||
$querystr .= '(category:"';
|
||||
$querystr .= implode('" || category:"', $fields['category']);
|
||||
$querystr .= implode('" && category:"', $fields['category']);
|
||||
$querystr .= '")';
|
||||
}
|
||||
if(!empty($fields['status'])) {
|
||||
|
|
|
@ -99,9 +99,9 @@ class SeedDMS_SQliteFTS_Search {
|
|||
if(!empty($fields['category'])) {
|
||||
if($querystr)
|
||||
$querystr .= ' AND ';
|
||||
$querystr .= '(category:';
|
||||
$querystr .= implode(' OR category:', $fields['category']);
|
||||
$querystr .= ')';
|
||||
$querystr .= '(category:"';
|
||||
$querystr .= implode('" AND category:"', $fields['category']);
|
||||
$querystr .= '")';
|
||||
}
|
||||
if(!empty($fields['mimetype'])) {
|
||||
if($querystr)
|
||||
|
|
|
@ -9,6 +9,8 @@ application/csv
|
|||
application/pdf
|
||||
pdftotext -nopgbrk %s - | sed -e 's/ [a-zA-Z0-9.]\{1\} / /g' -e 's/[0-9.]//g'
|
||||
|
||||
mutool draw -F txt -q -N -o - %s
|
||||
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document
|
||||
docx2txt '%s' -
|
||||
|
||||
|
@ -85,6 +87,10 @@ image/png
|
|||
application/pdf
|
||||
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q '%f' | convert -resize %wx png:- '%o'
|
||||
|
||||
convert -density 100 -resize %wx '%f[0]' 'png:%o'
|
||||
|
||||
mutool draw -F png -w %w -q -N -o %o %f 1
|
||||
|
||||
text/plain
|
||||
a2ps -1 -a1 -R -B -o - '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- 'png:%o'
|
||||
|
||||
|
|
|
@ -2015,6 +2015,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'تم الرفع بواسطة',
|
||||
'uploading_failed' => 'عملية رفع واحد من ملفاتك فشلت . من فضلك قم بالتأكد من اقصى ملف يمكن تحميله',
|
||||
'uploading_maxsize' => 'الملف المرفوع يتخطى حجم الملف القياسي المسموح',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'تحميل ملف فارغ. عملية التحميل الغيت',
|
||||
'used_discspace' => 'المساحة المستخدمة',
|
||||
'user' => 'مستخدم',
|
||||
|
|
|
@ -1869,6 +1869,7 @@ $text = array(
|
|||
'uploaded_by' => 'Качен от',
|
||||
'uploading_failed' => 'Качването не стана. Свържете се с админа',
|
||||
'uploading_maxsize' => '',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Качване на празен файл/размер=0. Качването прекратено.',
|
||||
'used_discspace' => 'Използвано дисково пространство',
|
||||
'user' => 'Потребител',
|
||||
|
|
|
@ -1874,6 +1874,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Enviat per',
|
||||
'uploading_failed' => 'Enviament (Upload) fallat. Si us plau, contacteu amb l\'administrador.',
|
||||
'uploading_maxsize' => '',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => '',
|
||||
'used_discspace' => 'Espai utilitzat',
|
||||
'user' => 'Usuari',
|
||||
|
|
|
@ -2087,6 +2087,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Nahrál',
|
||||
'uploading_failed' => 'Nahrání selhalo. Prosím, kontaktujte správce.',
|
||||
'uploading_maxsize' => 'Nahrávaný soubor je větší než maximální velikost pro upload.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Nahrávání prázdného souboru. Nahrání zrušeno.',
|
||||
'used_discspace' => 'Použité místo na disku',
|
||||
'user' => 'Uživatel',
|
||||
|
|
|
@ -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 (3089), dgrutsch (22)
|
||||
// Translators: Admin (3091), dgrutsch (22)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '2-Faktor Authentifizierung',
|
||||
|
@ -293,7 +293,7 @@ URL: [url]</p>',
|
|||
'categories_loading' => 'Bitte warten, bis die Liste der Kategorien geladen ist …',
|
||||
'category' => 'Kategorie',
|
||||
'category_exists' => 'Kategorie existiert bereits.',
|
||||
'category_filter' => 'Nur Kategorien',
|
||||
'category_filter' => 'Kategorien',
|
||||
'category_info' => 'Information',
|
||||
'category_in_use' => 'Diese Kategorie wird zur Zeit von Dokumenten verwendet.',
|
||||
'category_noname' => 'Kein Kategoriename eingetragen.',
|
||||
|
@ -2430,6 +2430,7 @@ URL: [url]</p>',
|
|||
'uploaded_by' => 'Hochgeladen durch',
|
||||
'uploading_failed' => 'Das Hochladen einer Datei ist fehlgeschlagen. Bitte überprüfen Sie die maximale Dateigröße für Uploads.',
|
||||
'uploading_maxsize' => 'Die Datei überschreitet die maximale Dateigröße für Uploads.',
|
||||
'uploading_postmaxsize' => 'Der Post-Request überschreitet die maximal Größe.',
|
||||
'uploading_zerosize' => 'Versuch eine leere Datei hochzuladen. Vorgang wird abgebrochen.',
|
||||
'used_discspace' => 'Verbrauchter Speicherplatz',
|
||||
'user' => 'Benutzer',
|
||||
|
|
|
@ -1880,6 +1880,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'ανέβηκε από',
|
||||
'uploading_failed' => '',
|
||||
'uploading_maxsize' => '',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => '',
|
||||
'used_discspace' => 'Χώρος',
|
||||
'user' => 'Χρήστης',
|
||||
|
|
|
@ -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 (2185), archonwang (3), dgrutsch (9), netixw (14)
|
||||
// Translators: Admin (2187), archonwang (3), dgrutsch (9), netixw (14)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '2-factor authentication',
|
||||
|
@ -293,7 +293,7 @@ URL: [url]</p>',
|
|||
'categories_loading' => 'Please wait, until the list of categories is loaded …',
|
||||
'category' => 'Category',
|
||||
'category_exists' => 'Category already exists.',
|
||||
'category_filter' => 'Only categories',
|
||||
'category_filter' => 'Categories',
|
||||
'category_info' => 'Information',
|
||||
'category_in_use' => 'This category is currently used by documents.',
|
||||
'category_noname' => 'No category name given.',
|
||||
|
@ -2433,6 +2433,7 @@ URL: [url]</p>',
|
|||
'uploaded_by' => 'Uploaded by',
|
||||
'uploading_failed' => 'Uploading one of your files failed. Please check your maximum upload file size.',
|
||||
'uploading_maxsize' => 'The uploaded file exceeds the maximum upload file size.',
|
||||
'uploading_postmaxsize' => 'The post request exceeds the maximum size.',
|
||||
'uploading_zerosize' => 'Uploading an empty file. Upload is canceled.',
|
||||
'used_discspace' => 'Used disk space',
|
||||
'user' => 'User',
|
||||
|
|
|
@ -2030,6 +2030,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Enviado por',
|
||||
'uploading_failed' => 'Envío (Upload) fallido. Por favor contacte con el Administrador.',
|
||||
'uploading_maxsize' => 'El archivo subido supera el tamaño máximo de upload',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Subiendo un fichero vacío. -Subida cancelada.',
|
||||
'used_discspace' => 'Espacio de disco utilizado',
|
||||
'user' => 'Usuario',
|
||||
|
|
|
@ -2416,6 +2416,7 @@ URL : [url]</p>',
|
|||
'uploaded_by' => 'Déposé par',
|
||||
'uploading_failed' => 'Dépôt d\'un des documents échoué. Veuillez vérifier la taille d\'envoi maximale autorisée.',
|
||||
'uploading_maxsize' => 'La taille du fichier dépasse la limite maximale autorisée.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Chargement d\'un fichier vide. Chargement annulé.',
|
||||
'used_discspace' => 'Espace disque utilisé',
|
||||
'user' => 'Utilisateur',
|
||||
|
|
|
@ -2051,6 +2051,7 @@ Internet poveznica: [url]',
|
|||
'uploaded_by' => 'Učitao',
|
||||
'uploading_failed' => 'Neuspješno učitavanje jedne od vaših datoteka. Molimo provjerite maksimalnu veličinu datoteke za učitavanje.',
|
||||
'uploading_maxsize' => 'Učitana datoteke premašuje maksimalnu veličinu datoteke za učitavanje.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Datoteka koja se učitava je prazna. Učitavanje je otkazano.',
|
||||
'used_discspace' => 'Iskorišteni prostor na disku',
|
||||
'user' => 'Korisnik',
|
||||
|
|
|
@ -2029,6 +2029,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Feltöltötte',
|
||||
'uploading_failed' => 'Állományai egyikének feltöltése sikertelen. Kérjük ellenőrizze a legnagyobb feltölthető állomány méretet.',
|
||||
'uploading_maxsize' => 'A feltöltött fájl nagyobb, mint a megengedezz maximális méret',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Üres állomány feltöltése. Feltöltés megszakítva.',
|
||||
'used_discspace' => 'Felhasznált lemezterület',
|
||||
'user' => 'Felhasználó',
|
||||
|
|
|
@ -2078,6 +2078,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Caricato da',
|
||||
'uploading_failed' => 'Upload fallito. Controllare la dimensione massima caricabile consentita.',
|
||||
'uploading_maxsize' => 'Il file caricato supera la dimensione massima consentita.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Si sta caricando un file vuoto. Operazione abortita.',
|
||||
'used_discspace' => 'Spazio su disco occupato',
|
||||
'user' => 'Utente',
|
||||
|
|
|
@ -2045,6 +2045,7 @@ URL : [url]',
|
|||
'uploaded_by' => '업로드',
|
||||
'uploading_failed' => '파일 업로드중 실패 최대. 업로드 파일 크기를 확인하시기 바랍니다.',
|
||||
'uploading_maxsize' => '최대 업로드 파일 크기를 초과하였습니다.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => '빈 파일을 업로드 합니다. 업로드가 취소 됩니다.',
|
||||
'used_discspace' => '사용된 디스크 공간',
|
||||
'user' => '사용자',
|
||||
|
|
|
@ -2071,6 +2071,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'ອັບໂຫລດໂດຍ',
|
||||
'uploading_failed' => 'ການອັບໂຫລດໜື່ງໄຟລຂອງທ່ານລົ້ມເຫຼວ ກະລຸນາກວດສອບຂະໜາດໄຟລສູງສຸດສຳລັບການອັບໂຫລດ',
|
||||
'uploading_maxsize' => 'ໄຟລທີອັບໂຫລດມີຂະໜາດໃຫ່ຍກວ່າໄຟລທີມີຂະໜາດອັບໂຫລດສູງສຸດ',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'ການອັບໂຫລດໄຟລເປົ່າ, ການອັບໂຫຼດຖຶກຍົກເລີກ',
|
||||
'used_discspace' => 'ໄຊ້ເນື້ອທີດິສ',
|
||||
'user' => 'ຜູ້ໄຊ້ງານ',
|
||||
|
|
|
@ -2084,6 +2084,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Lastet opp av',
|
||||
'uploading_failed' => 'Opplasting av en av filene dine mislyktes. Kontroller den maksimale filstørrelsen for opplastning.',
|
||||
'uploading_maxsize' => 'Den opplastede filen overskrider den maksimale opplastede filstørrelsen.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Laster opp en tom fil. Opplastingen er kansellert.',
|
||||
'used_discspace' => 'Brukt diskplass',
|
||||
'user' => 'Bruker',
|
||||
|
|
|
@ -2083,6 +2083,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Geüpload door',
|
||||
'uploading_failed' => 'Upload mislukt. Neem contact op met de [Beheerder].',
|
||||
'uploading_maxsize' => 'Het geüploade bestand overschrijdt de maximum grootte.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Uploaden van een leeg bestand. Upload wordt geannuleerd.',
|
||||
'used_discspace' => 'Gebruike schijf ruimte',
|
||||
'user' => 'Gebruiker',
|
||||
|
|
|
@ -2014,6 +2014,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Przesłane przez',
|
||||
'uploading_failed' => 'Przesyłanie nie powiodło się. Skontaktuj się z administratorem.',
|
||||
'uploading_maxsize' => 'Rozmiar pliku większy niż dopuszczalny',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Próba przesłania pustego pliku. Przesyłanie zostało przerwane.',
|
||||
'used_discspace' => 'Użyta przestrzeń dyskowa',
|
||||
'user' => 'Użytkownik',
|
||||
|
|
|
@ -2090,6 +2090,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Inserido por',
|
||||
'uploading_failed' => 'Inserção falhou. Por favor contacte o administrador',
|
||||
'uploading_maxsize' => 'O arquivo excede o tamanho máximo permitido para envio.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Envio de um arquivo vazio. Envio cancelado.',
|
||||
'used_discspace' => 'Espaço em disco usado',
|
||||
'user' => 'Usuário',
|
||||
|
|
|
@ -2052,6 +2052,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Adaugate de',
|
||||
'uploading_failed' => 'Încărcarea unuia dintre fișierele a eșuat. Vă rugăm să verificați dimensiunea maximă de încărcare fișiere.',
|
||||
'uploading_maxsize' => 'Fișierul încărcat depășește dimensiunea maximă de încărcare fișiere.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Se încarcă un fișier gol. Încărcarea este anulată.',
|
||||
'used_discspace' => 'Spatiu pe disc folosit',
|
||||
'user' => 'Utilizator',
|
||||
|
|
|
@ -2059,6 +2059,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Загрузил(а)',
|
||||
'uploading_failed' => 'Загрузка не удалась. Свяжитесь с администратором.',
|
||||
'uploading_maxsize' => 'Размер загруженного файла превышает максимально возможный',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Отменена загрузка пустого файла.',
|
||||
'used_discspace' => 'Занятое дисковое пространство',
|
||||
'user' => 'Пользователь',
|
||||
|
|
|
@ -2092,6 +2092,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Nahral/a',
|
||||
'uploading_failed' => 'Nahranie niektorého súboru zlyhalo. Preverte maximálnu povolenú veľkosť.',
|
||||
'uploading_maxsize' => 'Nahrávaný súbor prekročil maximálnu povolenú velkosť.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Nahrávate prázdny súbor. Nahrávanie je zrušené.',
|
||||
'used_discspace' => 'Využitý priestor na disku',
|
||||
'user' => 'Používateľ',
|
||||
|
|
|
@ -2065,6 +2065,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Uppladdat av',
|
||||
'uploading_failed' => 'Fel vid uppladdningen. Kontakta administratören.',
|
||||
'uploading_maxsize' => 'Den uppladdade filen översteg maxgränsen för filstorlek.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Uppladdning av tom fil. Uppladdningen avbryts.',
|
||||
'used_discspace' => 'Använt lagringsutrymme',
|
||||
'user' => 'Användare',
|
||||
|
|
|
@ -2031,6 +2031,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Yükleyen',
|
||||
'uploading_failed' => 'Dosyalardan biri yüklenirken başarısız oldu. Maksimum yükleme boyutunuzu kontrol ediniz.',
|
||||
'uploading_maxsize' => 'Yüklenen dosya maksimum yükleme boyutundan fazla.',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Boş bir dosya yükleniyor. Yükleme iptal edildi.',
|
||||
'used_discspace' => 'Kullanılan disk alanı',
|
||||
'user' => 'Kullanıcı',
|
||||
|
|
|
@ -2052,6 +2052,7 @@ URL: [url]',
|
|||
'uploaded_by' => 'Завантажив(ла)',
|
||||
'uploading_failed' => 'Завантаження не успішне. Зв\'яжіться з адміністратором.',
|
||||
'uploading_maxsize' => 'Розмір завантаженого файлу перевищує максимально допустимий',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => 'Відміна завантаження порожнього файлу.',
|
||||
'used_discspace' => 'Зайнятий дисковий простір',
|
||||
'user' => 'Користувач',
|
||||
|
|
|
@ -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 (1231), archonwang (469), fengjohn (5), yang86 (1)
|
||||
// Translators: Admin (1233), archonwang (469), fengjohn (5), yang86 (1)
|
||||
|
||||
$text = array(
|
||||
'2_factor_auth' => '双重认证',
|
||||
|
@ -509,7 +509,7 @@ URL: [url]',
|
|||
'dropfolder_metadata' => '',
|
||||
'dropupload' => '快速上传',
|
||||
'drop_files_here' => '拖入这里',
|
||||
'drop_files_here_or_click' => '',
|
||||
'drop_files_here_or_click' => '拖拽文件至此或点击',
|
||||
'dump_creation' => '转储数据',
|
||||
'dump_creation_warning' => '通过此操作,您可以创建一个您数据库的转储文件,之后可以将转储数据保存到您服务器所在的数据文件夹中',
|
||||
'dump_list' => '存在转储文件',
|
||||
|
@ -2030,6 +2030,7 @@ URL: [url]',
|
|||
'uploaded_by' => '上传者',
|
||||
'uploading_failed' => '文件太大无法上传!请处理后重新上传。',
|
||||
'uploading_maxsize' => '最大上传限制',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => '上传失败!请检查是否没有选择上传的文件。',
|
||||
'used_discspace' => '使用磁盘空间',
|
||||
'user' => '用户',
|
||||
|
@ -2068,7 +2069,7 @@ URL: [url]',
|
|||
'version_deleted_email_subject' => '[sitename]: [name] - 版本已删除',
|
||||
'version_info' => '版本信息',
|
||||
'view' => '查看',
|
||||
'view_document' => '',
|
||||
'view_document' => '查看',
|
||||
'view_folder' => '',
|
||||
'view_online' => '在线浏览',
|
||||
'warning' => '警告',
|
||||
|
|
|
@ -2090,6 +2090,7 @@ URL: [url]',
|
|||
'uploaded_by' => '上傳者',
|
||||
'uploading_failed' => '文件太大無法上傳!請處理後重新上傳。',
|
||||
'uploading_maxsize' => '最大上傳限制',
|
||||
'uploading_postmaxsize' => '',
|
||||
'uploading_zerosize' => '上傳失敗!請檢查是否沒有選擇上傳的檔。',
|
||||
'used_discspace' => '使用磁碟空間',
|
||||
'user' => '使用者',
|
||||
|
|
|
@ -33,6 +33,13 @@ include("../inc/inc.ClassController.php");
|
|||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||
|
||||
/* if post_max_size is to small, then $_POST will not be set and the content
|
||||
* lenght will exceed post_max_size
|
||||
*/
|
||||
if(empty($_POST) && $_SERVER['CONTENT_LENGTH'] > SeedDMS_Core_File::parse_filesize(ini_get('post_max_size'))) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => '')),getMLText("uploading_postmaxsize"));
|
||||
}
|
||||
|
||||
/* Check if the form data comes from a trusted request */
|
||||
if(!checkFormKey('adddocument')) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => getMLText("invalid_request_token"))),getMLText("invalid_request_token"));
|
||||
|
@ -404,15 +411,18 @@ if(!empty($_POST['notification_groups'])) {
|
|||
/* Check files for Errors first */
|
||||
$maxuploadsize = SeedDMS_Core_File::parse_filesize($settings->_maxUploadSize);
|
||||
foreach($file_ary as $file) {
|
||||
if($file['error']==1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_maxsize"));
|
||||
}
|
||||
if($file['error']!=0) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed"));
|
||||
}
|
||||
if ($file["size"]==0) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_zerosize"));
|
||||
}
|
||||
if ($maxuploadsize && $file["size"] > $maxuploadsize) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_maxsize"));
|
||||
}
|
||||
if($file['error']!=0) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed"));
|
||||
}
|
||||
}
|
||||
|
||||
foreach($file_ary as $file) {
|
||||
|
|
|
@ -27,6 +27,13 @@ include("../inc/inc.DBInit.php");
|
|||
include("../inc/inc.ClassUI.php");
|
||||
include("../inc/inc.Authentication.php");
|
||||
|
||||
/* if post_max_size is to small, then $_POST will not be set and the content
|
||||
* lenght will exceed post_max_size
|
||||
*/
|
||||
if(empty($_POST) && $_SERVER['CONTENT_LENGTH'] > SeedDMS_Core_File::parse_filesize(ini_get('post_max_size'))) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => '')),getMLText("uploading_postmaxsize"));
|
||||
}
|
||||
|
||||
if (!isset($_POST["documentid"]) || !is_numeric($_POST["documentid"]) || intval($_POST["documentid"])<1) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("invalid_doc_id"));
|
||||
}
|
||||
|
|
|
@ -35,6 +35,13 @@ if (!$accessop->check_controller_access($controller, $_POST)) {
|
|||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_doc_id"))),getMLText("access_denied"));
|
||||
}
|
||||
|
||||
/* if post_max_size is to small, then $_POST will not be set and the content
|
||||
* lenght will exceed post_max_size
|
||||
*/
|
||||
if(empty($_POST) && $_SERVER['CONTENT_LENGTH'] > SeedDMS_Core_File::parse_filesize(ini_get('post_max_size'))) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => '')),getMLText("uploading_postmaxsize"));
|
||||
}
|
||||
|
||||
/* Check if the form data comes from a trusted request */
|
||||
if(!checkFormKey('updatedocument')) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => getMLText("invalid_request_token"))),getMLText("invalid_request_token"));
|
||||
|
@ -133,6 +140,12 @@ if(!$file_ary) {
|
|||
|
||||
$file = $file_ary[0];
|
||||
if ($file['error'] == 0) {
|
||||
if($file['error']==1) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_maxsize"));
|
||||
}
|
||||
if($file['error']!=0) {
|
||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),getMLText("uploading_failed"));
|
||||
}
|
||||
if ($file["size"]==0) {
|
||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("uploading_zerosize"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user