diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-10 00:54:20 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-10 00:54:20 -0500 |
commit | c6985d6cd4da69715773b3d4eb65cf17977c8cc4 (patch) | |
tree | 8ff7bf1ccbc711f3c3058411dcce0dbd43ef2785 /apps | |
parent | 71affd528c74410a53ae923da9750e1dcdb83d2f (diff) | |
parent | 0222c589ac7c006c09dca6cea09cae9a1006a0b4 (diff) | |
download | nextcloud-server-c6985d6cd4da69715773b3d4eb65cf17977c8cc4.tar.gz nextcloud-server-c6985d6cd4da69715773b3d4eb65cf17977c8cc4.zip |
Merge branch 'master' into fix-shared-links
Diffstat (limited to 'apps')
142 files changed, 1197 insertions, 1027 deletions
diff --git a/apps/files/ajax/move.php b/apps/files/ajax/move.php index 78ed218c136..93063e52eb0 100644 --- a/apps/files/ajax/move.php +++ b/apps/files/ajax/move.php @@ -11,8 +11,10 @@ $dir = stripslashes($_POST["dir"]); $file = stripslashes($_POST["file"]); $target = stripslashes(rawurldecode($_POST["target"])); +$l = OC_L10N::get('files'); + if(\OC\Files\Filesystem::file_exists($target . '/' . $file)) { - OCP\JSON::error(array("data" => array( "message" => "Could not move $file - File with this name already exists" ))); + OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s - File with this name already exists", array($file)) ))); exit; } @@ -22,8 +24,8 @@ if ($dir != '' || $file != 'Shared') { if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) { OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $file ))); } else { - OCP\JSON::error(array("data" => array( "message" => "Could not move $file" ))); + OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s", array($file)) ))); } }else{ - OCP\JSON::error(array("data" => array( "message" => "Could not move $file" ))); + OCP\JSON::error(array("data" => array( "message" => $l->t("Could not move %s", array($file)) ))); } diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index 970aaa638da..9fd2ce3ad4b 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -11,14 +11,16 @@ $dir = stripslashes($_GET["dir"]); $file = stripslashes($_GET["file"]); $newname = stripslashes($_GET["newname"]); +$l = OC_L10N::get('files'); + if ( $newname !== '.' and ($dir != '' || $file != 'Shared') and $newname !== '.') { $targetFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $newname); $sourceFile = \OC\Files\Filesystem::normalizePath($dir . '/' . $file); if(\OC\Files\Filesystem::rename($sourceFile, $targetFile)) { OCP\JSON::success(array("data" => array( "dir" => $dir, "file" => $file, "newname" => $newname ))); } else { - OCP\JSON::error(array("data" => array( "message" => "Unable to rename file" ))); + OCP\JSON::error(array("data" => array( "message" => $l->t("Unable to rename file") ))); } }else{ - OCP\JSON::error(array("data" => array( "message" => "Unable to rename file" ))); + OCP\JSON::error(array("data" => array( "message" => $l->t("Unable to rename file") ))); } diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 676612c0e42..07977f5ddf1 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -49,7 +49,7 @@ foreach ($files['size'] as $size) { $totalSize += $size; } if ($totalSize > \OC\Files\Filesystem::free_space($dir)) { - OCP\JSON::error(array('data' => array('message' => $l->t('Not enough space available'), + OCP\JSON::error(array('data' => array('message' => $l->t('Not enough storage available'), 'uploadMaxFilesize' => $maxUploadFilesize, 'maxHumanFilesize' => $maxHumanFilesize))); exit(); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index f37ac4c262a..67bd569ceef 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -3,7 +3,7 @@ See the COPYING-README file. */ /* FILE MENU */ -.actions { padding:.3em; float:left; height:2em; width: 100%; } +.actions { padding:.3em; height:2em; width: 100%; } .actions input, .actions button, .actions .button { margin:0; float:left; } #new { diff --git a/apps/files/index.php b/apps/files/index.php index 104cf1a55d3..434e98c6ea8 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -92,7 +92,7 @@ foreach (explode('/', $dir) as $i) { $list = new OCP\Template('files', 'part.list', ''); $list->assign('files', $files, false); $list->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false); -$list->assign('downloadURL', OCP\Util::linkTo('files', 'download.php') . '?file=', false); +$list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/')), false); $list->assign('disableSharing', false); $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index c30f1bcddd8..e1d8b60d315 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -112,9 +112,8 @@ var FileActions = { if (img.call) { img = img(file); } - // NOTE: Temporary fix to allow unsharing of files in root of Shared folder - if ($('#dir').val() == '/Shared') { - var html = '<a href="#" original-title="' + t('files', 'Unshare') + '" class="action delete" />'; + if (typeof trashBinApp !== 'undefined' && trashBinApp) { + var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete" />'; } else { var html = '<a href="#" original-title="' + t('files', 'Delete') + '" class="action delete" />'; } diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 72b353b48c2..cc107656da8 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -3,35 +3,92 @@ var FileList={ update:function(fileListHtml) { $('#fileList').empty().html(fileListHtml); }, - addFile:function(name,size,lastModified,loading,hidden){ - var basename, extension, simpleSize, sizeColor, lastModifiedTime, modifiedColor, - img=(loading)?OC.imagePath('core', 'loading.gif'):OC.imagePath('core', 'filetypes/file.png'), - html='<tr data-type="file" data-size="'+size+'" data-permissions="'+$('#permissions').val()+'">'; - if(name.indexOf('.')!=-1){ + createRow:function(type, name, iconurl, linktarget, size, lastModified, permissions){ + var td, simpleSize, basename, extension; + //containing tr + var tr = $('<tr></tr>').attr({ + "data-type": type, + "data-size": size, + "data-file": name, + "data-permissions": permissions + }); + // filename td + td = $('<td></td>').attr({ + "class": "filename", + "style": 'background-image:url('+iconurl+')' + }); + td.append('<input type="checkbox" />'); + var link_elem = $('<a></a>').attr({ + "class": "name", + "href": linktarget + }); + //split extension from filename for non dirs + if (type != 'dir' && name.indexOf('.')!=-1) { basename=name.substr(0,name.lastIndexOf('.')); extension=name.substr(name.lastIndexOf('.')); - }else{ + } else { basename=name; extension=false; } - html+='<td class="filename" style="background-image:url('+img+')"><input type="checkbox" />'; - html+='<a class="name" href="download.php?file='+$('#dir').val().replace(/</, '<').replace(/>/, '>')+'/'+escapeHTML(name)+'"><span class="nametext">'+escapeHTML(basename); + var name_span=$('<span></span>').addClass('nametext').text(basename); + link_elem.append(name_span); if(extension){ - html+='<span class="extension">'+escapeHTML(extension)+'</span>'; + name_span.append($('<span></span>').addClass('extension').text(extension)); + } + //dirs can show the number of uploaded files + if (type == 'dir') { + link_elem.append($('<span></span>').attr({ + 'class': 'uploadtext', + 'currentUploads': 0 + })); } - html+='</span></a></td>'; - if(size!='Pending'){ + td.append(link_elem); + tr.append(td); + + //size column + if(size!=t('files', 'Pending')){ simpleSize=simpleFileSize(size); }else{ - simpleSize='Pending'; + simpleSize=t('files', 'Pending'); } - sizeColor = Math.round(200-size/(1024*1024)*2); - lastModifiedTime=Math.round(lastModified.getTime() / 1000); - modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*14); - html+='<td class="filesize" title="'+humanFileSize(size)+'" style="color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')">'+simpleSize+'</td>'; - html+='<td class="date"><span class="modified" title="'+formatDate(lastModified)+'" style="color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')">'+relative_modified_date(lastModified.getTime() / 1000)+'</span></td>'; - html+='</tr>'; - FileList.insertElement(name,'file',$(html).attr('data-file',name)); + var sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2)); + var lastModifiedTime = Math.round(lastModified.getTime() / 1000); + td = $('<td></td>').attr({ + "class": "filesize", + "title": humanFileSize(size), + "style": 'color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')' + }).text(simpleSize); + tr.append(td); + + // date column + var modifiedColor = Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5); + td = $('<td></td>').attr({ "class": "date" }); + td.append($('<span></span>').attr({ + "class": "modified", + "title": formatDate(lastModified), + "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')' + }).text( relative_modified_date(lastModified.getTime() / 1000) )); + tr.append(td); + return tr; + }, + addFile:function(name,size,lastModified,loading,hidden){ + var imgurl; + if (loading) { + imgurl = OC.imagePath('core', 'loading.gif'); + } else { + imgurl = OC.imagePath('core', 'filetypes/file.png'); + } + var tr = this.createRow( + 'file', + name, + imgurl, + OC.Router.generate('download', { file: $('#dir').val()+'/'+name }), + size, + lastModified, + $('#permissions').val() + ); + + FileList.insertElement(name, 'file', tr.attr('data-file',name)); var row = $('tr').filterAttr('data-file',name); if(loading){ row.data('loading',true); @@ -44,30 +101,18 @@ var FileList={ FileActions.display(row.find('td.filename')); }, addDir:function(name,size,lastModified,hidden){ - var html, td, link_elem, sizeColor, lastModifiedTime, modifiedColor; - html = $('<tr></tr>').attr({ "data-type": "dir", "data-size": size, "data-file": name, "data-permissions": $('#permissions').val()}); - td = $('<td></td>').attr({"class": "filename", "style": 'background-image:url('+OC.imagePath('core', 'filetypes/folder.png')+')' }); - td.append('<input type="checkbox" />'); - link_elem = $('<a></a>').attr({ "class": "name", "href": OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/') }); - link_elem.append($('<span></span>').addClass('nametext').text(name)); - link_elem.append($('<span></span>').attr({'class': 'uploadtext', 'currentUploads': 0})); - td.append(link_elem); - html.append(td); - if(size!='Pending'){ - simpleSize=simpleFileSize(size); - }else{ - simpleSize='Pending'; - } - sizeColor = Math.round(200-Math.pow((size/(1024*1024)),2)); - lastModifiedTime=Math.round(lastModified.getTime() / 1000); - modifiedColor=Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5); - td = $('<td></td>').attr({ "class": "filesize", "title": humanFileSize(size), "style": 'color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')'}).text(simpleSize); - html.append(td); - - td = $('<td></td>').attr({ "class": "date" }); - td.append($('<span></span>').attr({ "class": "modified", "title": formatDate(lastModified), "style": 'color:rgb('+modifiedColor+','+modifiedColor+','+modifiedColor+')' }).text( relative_modified_date(lastModified.getTime() / 1000) )); - html.append(td); - FileList.insertElement(name,'dir',html); + + var tr = this.createRow( + 'dir', + name, + OC.imagePath('core', 'filetypes/folder.png'), + OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent($('#dir').val()+'/'+name).replace(/%2F/g, '/'), + size, + lastModified, + $('#permissions').val() + ); + + FileList.insertElement(name,'dir',tr); var row = $('tr').filterAttr('data-file',name); row.find('td.filename').draggable(dragOptions); row.find('td.filename').droppable(folderDropOptions); @@ -216,9 +261,6 @@ var FileList={ }, replace:function(oldName, newName, isNewFile) { // Finish any existing actions - if (FileList.lastAction || !FileList.useUndo) { - FileList.lastAction(); - } $('tr').filterAttr('data-file', oldName).hide(); $('tr').filterAttr('data-file', newName).hide(); var tr = $('tr').filterAttr('data-file', oldName).clone(); @@ -321,7 +363,6 @@ $(document).ready(function(){ // Delete the new uploaded file FileList.deleteCanceled = false; FileList.deleteFiles = [FileList.replaceOldName]; - FileList.finishDelete(null, true); } else { $('tr').filterAttr('data-file', FileList.replaceOldName).show(); } @@ -348,7 +389,6 @@ $(document).ready(function(){ if ($('#notification').data('isNewFile')) { FileList.deleteCanceled = false; FileList.deleteFiles = [$('#notification').data('oldName')]; - FileList.finishDelete(null, true); } }); FileList.useUndo=(window.onbeforeunload)?true:false; diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 7c377afc620..5c5b430a8d4 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -262,12 +262,6 @@ $(document).ready(function() { return; } totalSize+=files[i].size; - if(FileList.deleteFiles && FileList.deleteFiles.indexOf(files[i].name)!=-1){//finish delete if we are uploading a deleted file - FileList.finishDelete(function(){ - $('#file_upload_start').change(); - }); - return; - } } } if(totalSize>$('#max_upload').val()){ diff --git a/apps/files/l10n/bn_BD.php b/apps/files/l10n/bn_BD.php index 3d676810c7c..dbff81cef6c 100644 --- a/apps/files/l10n/bn_BD.php +++ b/apps/files/l10n/bn_BD.php @@ -7,7 +7,6 @@ "No file was uploaded" => "কোন ফাইল আপলোড করা হয় নি", "Missing a temporary folder" => "অস্থায়ী ফোল্ডার খোয়া গিয়েছে", "Failed to write to disk" => "ডিস্কে লিখতে ব্যর্থ", -"Not enough space available" => "যথেষ্ঠ পরিমাণ স্থান নেই", "Invalid directory." => "ভুল ডিরেক্টরি", "Files" => "ফাইল", "Unshare" => "ভাগাভাগি বাতিল ", diff --git a/apps/files/l10n/ca.php b/apps/files/l10n/ca.php index 22b684fcfd7..49ea7f73abb 100644 --- a/apps/files/l10n/ca.php +++ b/apps/files/l10n/ca.php @@ -7,10 +7,10 @@ "No file was uploaded" => "El fitxer no s'ha pujat", "Missing a temporary folder" => "S'ha perdut un fitxer temporal", "Failed to write to disk" => "Ha fallat en escriure al disc", -"Not enough space available" => "No hi ha prou espai disponible", "Invalid directory." => "Directori no vàlid.", "Files" => "Fitxers", "Unshare" => "Deixa de compartir", +"Delete permanently" => "Esborra permanentment", "Delete" => "Suprimeix", "Rename" => "Reanomena", "{new_name} already exists" => "{new_name} ja existeix", diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index f0beda9f55c..c2085a3aa9a 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Žádný soubor nebyl odeslán", "Missing a temporary folder" => "Chybí adresář pro dočasné soubory", "Failed to write to disk" => "Zápis na disk selhal", -"Not enough space available" => "Nedostatek dostupného místa", "Invalid directory." => "Neplatný adresář", "Files" => "Soubory", "Unshare" => "Zrušit sdílení", +"Delete permanently" => "Trvale odstranit", "Delete" => "Smazat", "Rename" => "Přejmenovat", "{new_name} already exists" => "{new_name} již existuje", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 55ea24baa2f..4b38619eaa5 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Es wurde keine Datei hochgeladen.", "Missing a temporary folder" => "Temporärer Ordner fehlt.", "Failed to write to disk" => "Fehler beim Schreiben auf die Festplatte", -"Not enough space available" => "Nicht genug Speicherplatz verfügbar", "Invalid directory." => "Ungültiges Verzeichnis.", "Files" => "Dateien", "Unshare" => "Nicht mehr freigeben", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index 18f3ee38028..71f24eba4c8 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Es wurde keine Datei hochgeladen.", "Missing a temporary folder" => "Der temporäre Ordner fehlt.", "Failed to write to disk" => "Fehler beim Schreiben auf die Festplatte", -"Not enough space available" => "Nicht genügend Speicherplatz verfügbar", "Invalid directory." => "Ungültiges Verzeichnis.", "Files" => "Dateien", "Unshare" => "Nicht mehr freigeben", +"Delete permanently" => "Entgültig löschen", "Delete" => "Löschen", "Rename" => "Umbenennen", "{new_name} already exists" => "{new_name} existiert bereits", diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index 7b458bf35dd..a9c5fda0981 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Κανένα αρχείο δεν στάλθηκε", "Missing a temporary folder" => "Λείπει ο προσωρινός φάκελος", "Failed to write to disk" => "Αποτυχία εγγραφής στο δίσκο", -"Not enough space available" => "Δεν υπάρχει αρκετός διαθέσιμος χώρος", "Invalid directory." => "Μη έγκυρος φάκελος.", "Files" => "Αρχεία", "Unshare" => "Διακοπή κοινής χρήσης", diff --git a/apps/files/l10n/eo.php b/apps/files/l10n/eo.php index a510d47ad6c..ba78e8b56d7 100644 --- a/apps/files/l10n/eo.php +++ b/apps/files/l10n/eo.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Neniu dosiero estas alŝutita", "Missing a temporary folder" => "Mankas tempa dosierujo", "Failed to write to disk" => "Malsukcesis skribo al disko", -"Not enough space available" => "Ne haveblas sufiĉa spaco", "Invalid directory." => "Nevalida dosierujo.", "Files" => "Dosieroj", "Unshare" => "Malkunhavigi", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 201e731179a..9d45e6035c7 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -7,10 +7,10 @@ "No file was uploaded" => "No se ha subido ningún archivo", "Missing a temporary folder" => "Falta un directorio temporal", "Failed to write to disk" => "La escritura en disco ha fallado", -"Not enough space available" => "No hay suficiente espacio disponible", "Invalid directory." => "Directorio invalido.", "Files" => "Archivos", "Unshare" => "Dejar de compartir", +"Delete permanently" => "Eliminar permanentemente", "Delete" => "Eliminar", "Rename" => "Renombrar", "{new_name} already exists" => "{new_name} ya existe", diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php index ea8352e3251..e805f24ce4c 100644 --- a/apps/files/l10n/es_AR.php +++ b/apps/files/l10n/es_AR.php @@ -7,7 +7,6 @@ "No file was uploaded" => "El archivo no fue subido", "Missing a temporary folder" => "Falta un directorio temporal", "Failed to write to disk" => "Error al escribir en el disco", -"Not enough space available" => "No hay suficiente espacio disponible", "Invalid directory." => "Directorio invalido.", "Files" => "Archivos", "Unshare" => "Dejar de compartir", @@ -20,6 +19,7 @@ "replaced {new_name}" => "reemplazado {new_name}", "undo" => "deshacer", "replaced {new_name} with {old_name}" => "reemplazado {new_name} con {old_name}", +"perform delete operation" => "Eliminar", "'.' is an invalid file name." => "'.' es un nombre de archivo inválido.", "File name cannot be empty." => "El nombre del archivo no puede quedar vacío.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre invalido, '\\', '/', '<', '>', ':', '\"', '|', '?' y '*' no están permitidos.", @@ -56,11 +56,13 @@ "Text file" => "Archivo de texto", "Folder" => "Carpeta", "From link" => "Desde enlace", +"Trash" => "Papelera", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "No hay nada. ¡Subí contenido!", "Download" => "Descargar", "Upload too large" => "El archivo es demasiado grande", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Los archivos que intentás subir sobrepasan el tamaño máximo ", "Files are being scanned, please wait." => "Se están escaneando los archivos, por favor esperá.", -"Current scanning" => "Escaneo actual" +"Current scanning" => "Escaneo actual", +"Upgrading filesystem cache..." => "Actualizando el cache del sistema de archivos" ); diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index 6f4c55f4846..45c515814e7 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Ez da fitxategirik igo", "Missing a temporary folder" => "Aldi baterako karpeta falta da", "Failed to write to disk" => "Errore bat izan da diskoan idazterakoan", -"Not enough space available" => "Ez dago leku nahikorik.", "Invalid directory." => "Baliogabeko karpeta.", "Files" => "Fitxategiak", "Unshare" => "Ez elkarbanatu", diff --git a/apps/files/l10n/fa.php b/apps/files/l10n/fa.php index a4181c6ff53..2559d597a79 100644 --- a/apps/files/l10n/fa.php +++ b/apps/files/l10n/fa.php @@ -7,7 +7,6 @@ "No file was uploaded" => "هیچ فایلی بارگذاری نشده", "Missing a temporary folder" => "یک پوشه موقت گم شده است", "Failed to write to disk" => "نوشتن بر روی دیسک سخت ناموفق بود", -"Not enough space available" => "فضای کافی در دسترس نیست", "Invalid directory." => "فهرست راهنما نامعتبر می باشد.", "Files" => "فایل ها", "Unshare" => "لغو اشتراک", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index 809a5e5c554..6a425e76090 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -6,7 +6,6 @@ "No file was uploaded" => "Yhtäkään tiedostoa ei lähetetty", "Missing a temporary folder" => "Väliaikaiskansiota ei ole olemassa", "Failed to write to disk" => "Levylle kirjoitus epäonnistui", -"Not enough space available" => "Tilaa ei ole riittävästi", "Invalid directory." => "Virheellinen kansio.", "Files" => "Tiedostot", "Unshare" => "Peru jakaminen", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index 4be699c0017..45281d277ff 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Aucun fichier n'a été téléversé", "Missing a temporary folder" => "Il manque un répertoire temporaire", "Failed to write to disk" => "Erreur d'écriture sur le disque", -"Not enough space available" => "Espace disponible insuffisant", "Invalid directory." => "Dossier invalide.", "Files" => "Fichiers", "Unshare" => "Ne plus partager", +"Delete permanently" => "Supprimer de façon définitive", "Delete" => "Supprimer", "Rename" => "Renommer", "{new_name} already exists" => "{new_name} existe déjà", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index a1c0f0a5dd5..362e92dacea 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Non se enviou ningún ficheiro", "Missing a temporary folder" => "Falta un cartafol temporal", "Failed to write to disk" => "Erro ao escribir no disco", -"Not enough space available" => "O espazo dispoñíbel é insuficiente", "Invalid directory." => "O directorio é incorrecto.", "Files" => "Ficheiros", "Unshare" => "Deixar de compartir", diff --git a/apps/files/l10n/hu_HU.php b/apps/files/l10n/hu_HU.php index 86fc0f223f9..26d56480790 100644 --- a/apps/files/l10n/hu_HU.php +++ b/apps/files/l10n/hu_HU.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Nem töltődött fel semmi", "Missing a temporary folder" => "Hiányzik egy ideiglenes mappa", "Failed to write to disk" => "Nem sikerült a lemezre történő írás", -"Not enough space available" => "Nincs elég szabad hely", "Invalid directory." => "Érvénytelen mappa.", "Files" => "Fájlok", "Unshare" => "Megosztás visszavonása", diff --git a/apps/files/l10n/is.php b/apps/files/l10n/is.php index 43c10ef236e..f8d9789cf0f 100644 --- a/apps/files/l10n/is.php +++ b/apps/files/l10n/is.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Engin skrá skilaði sér", "Missing a temporary folder" => "Vantar bráðabirgðamöppu", "Failed to write to disk" => "Tókst ekki að skrifa á disk", -"Not enough space available" => "Ekki nægt pláss tiltækt", "Invalid directory." => "Ógild mappa.", "Files" => "Skrár", "Unshare" => "Hætta deilingu", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index bb3a5bdf054..3d6eb254e59 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Nessun file è stato caricato", "Missing a temporary folder" => "Cartella temporanea mancante", "Failed to write to disk" => "Scrittura su disco non riuscita", -"Not enough space available" => "Spazio disponibile insufficiente", "Invalid directory." => "Cartella non valida.", "Files" => "File", "Unshare" => "Rimuovi condivisione", +"Delete permanently" => "Elimina definitivamente", "Delete" => "Elimina", "Rename" => "Rinomina", "{new_name} already exists" => "{new_name} esiste già", diff --git a/apps/files/l10n/ja_JP.php b/apps/files/l10n/ja_JP.php index c8b1054f30b..1caa308c1b8 100644 --- a/apps/files/l10n/ja_JP.php +++ b/apps/files/l10n/ja_JP.php @@ -7,10 +7,10 @@ "No file was uploaded" => "ファイルはアップロードされませんでした", "Missing a temporary folder" => "テンポラリフォルダが見つかりません", "Failed to write to disk" => "ディスクへの書き込みに失敗しました", -"Not enough space available" => "利用可能なスペースが十分にありません", "Invalid directory." => "無効なディレクトリです。", "Files" => "ファイル", "Unshare" => "共有しない", +"Delete permanently" => "完全に削除する", "Delete" => "削除", "Rename" => "名前の変更", "{new_name} already exists" => "{new_name} はすでに存在しています", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index 7774aeea31c..98d0d602801 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -7,7 +7,6 @@ "No file was uploaded" => "업로드된 파일 없음", "Missing a temporary folder" => "임시 폴더가 사라짐", "Failed to write to disk" => "디스크에 쓰지 못했습니다", -"Not enough space available" => "여유 공간이 부족합니다", "Invalid directory." => "올바르지 않은 디렉터리입니다.", "Files" => "파일", "Unshare" => "공유 해제", diff --git a/apps/files/l10n/lv.php b/apps/files/l10n/lv.php index 25c1da73beb..57b391e444c 100644 --- a/apps/files/l10n/lv.php +++ b/apps/files/l10n/lv.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Neviena datne netika augšupielādēta", "Missing a temporary folder" => "Trūkst pagaidu mapes", "Failed to write to disk" => "Neizdevās saglabāt diskā", -"Not enough space available" => "Nepietiek brīvas vietas", "Invalid directory." => "Nederīga direktorija.", "Files" => "Datnes", "Unshare" => "Pārtraukt dalīšanos", +"Delete permanently" => "Dzēst pavisam", "Delete" => "Dzēst", "Rename" => "Pārsaukt", "{new_name} already exists" => "{new_name} jau eksistē", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index addd3a93723..9095149cd9d 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Geen bestand geüpload", "Missing a temporary folder" => "Een tijdelijke map mist", "Failed to write to disk" => "Schrijven naar schijf mislukt", -"Not enough space available" => "Niet genoeg ruimte beschikbaar", "Invalid directory." => "Ongeldige directory.", "Files" => "Bestanden", "Unshare" => "Stop delen", +"Delete permanently" => "Verwijder definitief", "Delete" => "Verwijder", "Rename" => "Hernoem", "{new_name} already exists" => "{new_name} bestaat al", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index 6855850f0da..45d0f436614 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Nie przesłano żadnego pliku", "Missing a temporary folder" => "Brak katalogu tymczasowego", "Failed to write to disk" => "Błąd zapisu na dysk", -"Not enough space available" => "Za mało miejsca", "Invalid directory." => "Zła ścieżka.", "Files" => "Pliki", "Unshare" => "Nie udostępniaj", diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php index b1d7385bc58..52c87ed728a 100644 --- a/apps/files/l10n/pt_PT.php +++ b/apps/files/l10n/pt_PT.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Não foi enviado nenhum ficheiro", "Missing a temporary folder" => "Falta uma pasta temporária", "Failed to write to disk" => "Falhou a escrita no disco", -"Not enough space available" => "Espaço em disco insuficiente!", "Invalid directory." => "Directório Inválido", "Files" => "Ficheiros", "Unshare" => "Deixar de partilhar", +"Delete permanently" => "Eliminar permanentemente", "Delete" => "Apagar", "Rename" => "Renomear", "{new_name} already exists" => "O nome {new_name} já existe", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index 7837b1f5b30..79ca1cf4f51 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Niciun fișier încărcat", "Missing a temporary folder" => "Lipsește un dosar temporar", "Failed to write to disk" => "Eroare la scriere pe disc", -"Not enough space available" => "Nu este suficient spațiu disponibil", "Invalid directory." => "Director invalid.", "Files" => "Fișiere", "Unshare" => "Anulează partajarea", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index 716afa5f29a..05542452e7f 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Файл не был загружен", "Missing a temporary folder" => "Невозможно найти временную папку", "Failed to write to disk" => "Ошибка записи на диск", -"Not enough space available" => "Недостаточно свободного места", "Invalid directory." => "Неправильный каталог.", "Files" => "Файлы", "Unshare" => "Отменить публикацию", +"Delete permanently" => "Удалено навсегда", "Delete" => "Удалить", "Rename" => "Переименовать", "{new_name} already exists" => "{new_name} уже существует", @@ -20,9 +20,13 @@ "replaced {new_name}" => "заменено {new_name}", "undo" => "отмена", "replaced {new_name} with {old_name}" => "заменено {new_name} на {old_name}", +"perform delete operation" => "выполняется операция удаления", "'.' is an invalid file name." => "'.' - неправильное имя файла.", "File name cannot be empty." => "Имя файла не может быть пустым.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неправильное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' недопустимы.", +"Your storage is full, files can not be updated or synced anymore!" => "Ваше дисковое пространство полностью заполнено, произведите очистку перед загрузкой новых файлов.", +"Your storage is almost full ({usedSpacePercent}%)" => "Ваше хранилище почти заполнено ({usedSpacePercent}%)", +"Your download is being prepared. This might take some time if the files are big." => "Загрузка началась. Это может потребовать много времени, если файл большого размера.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не удается загрузить файл размером 0 байт в каталог", "Upload Error" => "Ошибка загрузки", "Close" => "Закрыть", @@ -53,11 +57,13 @@ "Text file" => "Текстовый файл", "Folder" => "Папка", "From link" => "Из ссылки", +"Trash" => "Корзина", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", "Download" => "Скачать", "Upload too large" => "Файл слишком большой", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файлы, которые Вы пытаетесь загрузить, превышают лимит для файлов на этом сервере.", "Files are being scanned, please wait." => "Подождите, файлы сканируются.", -"Current scanning" => "Текущее сканирование" +"Current scanning" => "Текущее сканирование", +"Upgrading filesystem cache..." => "Обновление кеша файловой системы..." ); diff --git a/apps/files/l10n/ru_RU.php b/apps/files/l10n/ru_RU.php index e1952567d31..9b2913970f2 100644 --- a/apps/files/l10n/ru_RU.php +++ b/apps/files/l10n/ru_RU.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Файл не был загружен", "Missing a temporary folder" => "Отсутствует временная папка", "Failed to write to disk" => "Не удалось записать на диск", -"Not enough space available" => "Не достаточно свободного места", "Invalid directory." => "Неверный каталог.", "Files" => "Файлы", "Unshare" => "Скрыть", +"Delete permanently" => "Удалить навсегда", "Delete" => "Удалить", "Rename" => "Переименовать", "{new_name} already exists" => "{новое_имя} уже существует", @@ -20,9 +20,13 @@ "replaced {new_name}" => "заменено {новое_имя}", "undo" => "отменить действие", "replaced {new_name} with {old_name}" => "заменено {новое_имя} с {старое_имя}", +"perform delete operation" => "выполняется процесс удаления", "'.' is an invalid file name." => "'.' является неверным именем файла.", "File name cannot be empty." => "Имя файла не может быть пустым.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Некорректное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' не допустимы.", +"Your storage is full, files can not be updated or synced anymore!" => "Ваше хранилище переполнено, фалы больше не могут быть обновлены или синхронизированы!", +"Your storage is almost full ({usedSpacePercent}%)" => "Ваше хранилище почти полно ({usedSpacePercent}%)", +"Your download is being prepared. This might take some time if the files are big." => "Идёт подготовка к скачке Вашего файла. Это может занять некоторое время, если фалы большие.", "Unable to upload your file as it is a directory or has 0 bytes" => "Невозможно загрузить файл,\n так как он имеет нулевой размер или является директорией", "Upload Error" => "Ошибка загрузки", "Close" => "Закрыть", @@ -53,6 +57,7 @@ "Text file" => "Текстовый файл", "Folder" => "Папка", "From link" => "По ссылке", +"Trash" => "Корзина", "Cancel upload" => "Отмена загрузки", "Nothing in here. Upload something!" => "Здесь ничего нет. Загрузите что-нибудь!", "Download" => "Загрузить", diff --git a/apps/files/l10n/sk_SK.php b/apps/files/l10n/sk_SK.php index 9c27e215397..be7f77adab0 100644 --- a/apps/files/l10n/sk_SK.php +++ b/apps/files/l10n/sk_SK.php @@ -7,10 +7,10 @@ "No file was uploaded" => "Žiaden súbor nebol nahraný", "Missing a temporary folder" => "Chýbajúci dočasný priečinok", "Failed to write to disk" => "Zápis na disk sa nepodaril", -"Not enough space available" => "Nie je k dispozícii dostatok miesta", "Invalid directory." => "Neplatný adresár", "Files" => "Súbory", "Unshare" => "Nezdielať", +"Delete permanently" => "Zmazať trvalo", "Delete" => "Odstrániť", "Rename" => "Premenovať", "{new_name} already exists" => "{new_name} už existuje", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index 55493e24943..ebdaae9193f 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Ingen fil blev uppladdad", "Missing a temporary folder" => "Saknar en tillfällig mapp", "Failed to write to disk" => "Misslyckades spara till disk", -"Not enough space available" => "Inte tillräckligt med utrymme tillgängligt", "Invalid directory." => "Felaktig mapp.", "Files" => "Filer", "Unshare" => "Sluta dela", diff --git a/apps/files/l10n/th_TH.php b/apps/files/l10n/th_TH.php index 06dab9d8e6c..5f880702b82 100644 --- a/apps/files/l10n/th_TH.php +++ b/apps/files/l10n/th_TH.php @@ -7,7 +7,6 @@ "No file was uploaded" => "ยังไม่มีไฟล์ที่ถูกอัพโหลด", "Missing a temporary folder" => "แฟ้มเอกสารชั่วคราวเกิดการสูญหาย", "Failed to write to disk" => "เขียนข้อมูลลงแผ่นดิสก์ล้มเหลว", -"Not enough space available" => "มีพื้นที่เหลือไม่เพียงพอ", "Invalid directory." => "ไดเร็กทอรี่ไม่ถูกต้อง", "Files" => "ไฟล์", "Unshare" => "ยกเลิกการแชร์ข้อมูล", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index 3412d8ad448..3325cbe1ee4 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -7,7 +7,6 @@ "No file was uploaded" => "Hiç dosya yüklenmedi", "Missing a temporary folder" => "Geçici bir klasör eksik", "Failed to write to disk" => "Diske yazılamadı", -"Not enough space available" => "Yeterli disk alanı yok", "Invalid directory." => "Geçersiz dizin.", "Files" => "Dosyalar", "Unshare" => "Paylaşılmayan", diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index 9831dfe0f8f..4a76158c462 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -7,8 +7,10 @@ "No file was uploaded" => "Не відвантажено жодного файлу", "Missing a temporary folder" => "Відсутній тимчасовий каталог", "Failed to write to disk" => "Невдалося записати на диск", +"Invalid directory." => "Невірний каталог.", "Files" => "Файли", "Unshare" => "Заборонити доступ", +"Delete permanently" => "Видалити назавжди", "Delete" => "Видалити", "Rename" => "Перейменувати", "{new_name} already exists" => "{new_name} вже існує", @@ -18,7 +20,13 @@ "replaced {new_name}" => "замінено {new_name}", "undo" => "відмінити", "replaced {new_name} with {old_name}" => "замінено {new_name} на {old_name}", +"perform delete operation" => "виконати операцію видалення", +"'.' is an invalid file name." => "'.' це невірне ім'я файлу.", +"File name cannot be empty." => " Ім'я файлу не може бути порожнім.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Невірне ім'я, '\\', '/', '<', '>', ':', '\"', '|', '?' та '*' не дозволені.", +"Your storage is full, files can not be updated or synced anymore!" => "Ваше сховище переповнене, файли більше не можуть бути оновлені або синхронізовані !", +"Your storage is almost full ({usedSpacePercent}%)" => "Ваше сховище майже повне ({usedSpacePercent}%)", +"Your download is being prepared. This might take some time if the files are big." => "Ваше завантаження готується. Це може зайняти деякий час, якщо файли завеликі.", "Unable to upload your file as it is a directory or has 0 bytes" => "Неможливо завантажити ваш файл тому, що він тека або файл розміром 0 байт", "Upload Error" => "Помилка завантаження", "Close" => "Закрити", @@ -28,6 +36,7 @@ "Upload cancelled." => "Завантаження перервано.", "File upload is in progress. Leaving the page now will cancel the upload." => "Виконується завантаження файлу. Закриття цієї сторінки приведе до відміни завантаження.", "URL cannot be empty." => "URL не може бути пустим.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Невірне ім'я теки. Використання \"Shared\" зарезервовано Owncloud", "Name" => "Ім'я", "Size" => "Розмір", "Modified" => "Змінено", @@ -48,11 +57,13 @@ "Text file" => "Текстовий файл", "Folder" => "Папка", "From link" => "З посилання", +"Trash" => "Смітник", "Cancel upload" => "Перервати завантаження", "Nothing in here. Upload something!" => "Тут нічого немає. Відвантажте що-небудь!", "Download" => "Завантажити", "Upload too large" => "Файл занадто великий", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файли,що ви намагаєтесь відвантажити перевищують максимальний дозволений розмір файлів на цьому сервері.", "Files are being scanned, please wait." => "Файли скануються, зачекайте, будь-ласка.", -"Current scanning" => "Поточне сканування" +"Current scanning" => "Поточне сканування", +"Upgrading filesystem cache..." => "Оновлення кеша файлової системи..." ); diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php index 2491d645340..3c87ee2b73f 100644 --- a/apps/files/l10n/zh_CN.php +++ b/apps/files/l10n/zh_CN.php @@ -7,7 +7,6 @@ "No file was uploaded" => "文件没有上传", "Missing a temporary folder" => "缺少临时目录", "Failed to write to disk" => "写入磁盘失败", -"Not enough space available" => "没有足够可用空间", "Invalid directory." => "无效文件夹。", "Files" => "文件", "Unshare" => "取消分享", diff --git a/apps/files/l10n/zh_TW.php b/apps/files/l10n/zh_TW.php index 104cb3a619f..439907821d4 100644 --- a/apps/files/l10n/zh_TW.php +++ b/apps/files/l10n/zh_TW.php @@ -7,7 +7,6 @@ "No file was uploaded" => "無已上傳檔案", "Missing a temporary folder" => "遺失暫存資料夾", "Failed to write to disk" => "寫入硬碟失敗", -"Not enough space available" => "沒有足夠的可用空間", "Invalid directory." => "無效的資料夾。", "Files" => "檔案", "Unshare" => "取消共享", diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 0b4aa21eac3..7cf65915af0 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -37,7 +37,7 @@ </div> <?php if ($_['trash'] ): ?> <div id="trash" class="button"> - <a><?php echo $l->t('Trash');?></a> + <a><?php echo $l->t('Trash bin');?></a> </div> <?php endif; ?> <div id="uploadprogresswrapper"> diff --git a/apps/files_encryption/ajax/mode.php b/apps/files_encryption/ajax/mode.php deleted file mode 100644 index 64c5be94401..00000000000 --- a/apps/files_encryption/ajax/mode.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/**
- * Copyright (c) 2012, Bjoern Schiessle <schiessle@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or later.
- * See the COPYING-README file.
- */ -
-use OCA\Encryption\Keymanager; - -OCP\JSON::checkAppEnabled('files_encryption');
-OCP\JSON::checkLoggedIn();
-OCP\JSON::callCheck();
- -$mode = $_POST['mode']; -$changePasswd = false; -$passwdChanged = false; - -if ( isset($_POST['newpasswd']) && isset($_POST['oldpasswd']) ) { - $oldpasswd = $_POST['oldpasswd']; - $newpasswd = $_POST['newpasswd']; - $changePasswd = true; - $passwdChanged = Keymanager::changePasswd($oldpasswd, $newpasswd); -} - -$query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" );
-$result = $query->execute(array(\OCP\User::getUser()));
- -if ($result->fetchRow()){ - $query = OC_DB::prepare( 'UPDATE *PREFIX*encryption SET mode = ? WHERE uid = ?' ); -} else { - $query = OC_DB::prepare( 'INSERT INTO *PREFIX*encryption ( mode, uid ) VALUES( ?, ? )' ); -} - -if ( (!$changePasswd || $passwdChanged) && $query->execute(array($mode, \OCP\User::getUser())) ) { - OCP\JSON::success(); -} else { - OCP\JSON::error(); -}
\ No newline at end of file diff --git a/apps/files_encryption/appinfo/app.php b/apps/files_encryption/appinfo/app.php index e426f237bbe..08728622525 100644 --- a/apps/files_encryption/appinfo/app.php +++ b/apps/files_encryption/appinfo/app.php @@ -12,7 +12,7 @@ OC_FileProxy::register( new OCA\Encryption\Proxy() ); // User-related hooks OCP\Util::connectHook( 'OC_User', 'post_login', 'OCA\Encryption\Hooks', 'login' ); -OCP\Util::connectHook( 'OC_User', 'post_setPassword','OCA\Encryption\Hooks', 'setPassphrase' ); +OCP\Util::connectHook( 'OC_User', 'pre_setPassword','OCA\Encryption\Hooks', 'setPassphrase' ); // Sharing-related hooks OCP\Util::connectHook( 'OCP\Share', 'post_shared', 'OCA\Encryption\Hooks', 'postShared' ); @@ -43,6 +43,6 @@ if ( } -// Reguster settings scripts +// Register settings scripts OCP\App::registerAdmin( 'files_encryption', 'settings' ); -OCP\App::registerPersonal( 'files_encryption', 'settings-personal' );
\ No newline at end of file +OCP\App::registerPersonal( 'files_encryption', 'settings-personal' ); diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 065ef9d2410..7e4f677ce9d 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -38,12 +38,15 @@ class Hooks { */
public static function login( $params ) {
+ // Manually initialise Filesystem{} singleton with correct
+ // fake root path, in order to avoid fatal webdav errors
\OC\Files\Filesystem::init( $params['uid'] . '/' . 'files' . '/' );
$view = new \OC_FilesystemView( '/' );
$util = new Util( $view, $params['uid'] );
+ // Check files_encryption infrastructure is ready for action
if ( ! $util->ready() ) {
\OC_Log::write( 'Encryption library', 'User account "' . $params['uid'] . '" is not ready for encryption; configuration started', \OC_Log::DEBUG );
@@ -104,14 +107,16 @@ class Hooks { * @param array $params keys: uid, password
*/
public static function setPassphrase( $params ) {
-
+
// Only attempt to change passphrase if server-side encryption
// is in use (client-side encryption does not have access to
// the necessary keys)
if ( Crypt::mode() == 'server' ) {
+ $session = new Session();
+
// Get existing decrypted private key
- $privateKey = $_SESSION['privateKey'];
+ $privateKey = $session->getPrivateKey();
// Encrypt private key with new user pwd as passphrase
$encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $privateKey, $params['password'] );
@@ -160,16 +165,6 @@ class Hooks { * @brief
*/
public static function postShared( $params ) {
-
- // Delete existing catfile
- Keymanager::deleteFileKey( );
-
- // Generate new catfile and env keys
- Crypt::multiKeyEncrypt( $plainContent, $publicKeys );
-
- // Save env keys to user folders
-
-
}
/**
diff --git a/apps/files_encryption/js/settings-personal.js b/apps/files_encryption/js/settings-personal.js deleted file mode 100644 index 1a53e99d2b4..00000000000 --- a/apps/files_encryption/js/settings-personal.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Copyright (c) 2012, Bjoern Schiessle <schiessle@owncloud.com> - * This file is licensed under the Affero General Public License version 3 or later. - * See the COPYING-README file. - */ - -$(document).ready(function(){ - $('input[name=encryption_mode]').change(function(){ - var prevmode = document.getElementById('prev_encryption_mode').value - var client=$('input[value="client"]:checked').val() - ,server=$('input[value="server"]:checked').val() - ,user=$('input[value="user"]:checked').val() - ,none=$('input[value="none"]:checked').val() - if (client) { - $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'client' }); - if (prevmode == 'server') { - OC.dialogs.info(t('encryption', 'Please switch to your ownCloud client and change your encryption password to complete the conversion.'), t('encryption', 'switched to client side encryption')); - } - } else if (server) { - if (prevmode == 'client') { - OC.dialogs.form([{text:'Login password', name:'newpasswd', type:'password'},{text:'Encryption password used on the client', name:'oldpasswd', type:'password'}],t('encryption', 'Change encryption password to login password'), function(data) { - $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server', newpasswd: data[0].value, oldpasswd: data[1].value }, function(result) { - if (result.status != 'success') { - document.getElementById(prevmode+'_encryption').checked = true; - OC.dialogs.alert(t('encryption', 'Please check your passwords and try again.'), t('encryption', 'Could not change your file encryption password to your login password')) - } else { - console.log("alles super"); - } - }, true); - }); - } else { - $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'server' }); - } - } else { - $.post(OC.filePath('files_encryption', 'ajax', 'mode.php'), { mode: 'none' }); - } - }) -})
\ No newline at end of file diff --git a/apps/files_encryption/js/settings.js b/apps/files_encryption/js/settings.js index 60563bde859..0be857bb73e 100644 --- a/apps/files_encryption/js/settings.js +++ b/apps/files_encryption/js/settings.js @@ -9,38 +9,11 @@ $(document).ready(function(){ $('#encryption_blacklist').multiSelect({ oncheck:blackListChange, onuncheck:blackListChange, - createText:'...', + createText:'...' }); function blackListChange(){ var blackList=$('#encryption_blacklist').val().join(','); OC.AppConfig.setValue('files_encryption','type_blacklist',blackList); } - - //TODO: Handle switch between client and server side encryption - $('input[name=encryption_mode]').change(function(){ - var client=$('input[value="client"]:checked').val() - ,server=$('input[value="server"]:checked').val() - ,user=$('input[value="user"]:checked').val() - ,none=$('input[value="none"]:checked').val() - ,disable=false - if (client) { - OC.AppConfig.setValue('files_encryption','mode','client'); - disable = true; - } else if (server) { - OC.AppConfig.setValue('files_encryption','mode','server'); - disable = true; - } else if (user) { - OC.AppConfig.setValue('files_encryption','mode','user'); - disable = true; - } else { - OC.AppConfig.setValue('files_encryption','mode','none'); - } - if (disable) { - document.getElementById('server_encryption').disabled = true; - document.getElementById('client_encryption').disabled = true; - document.getElementById('user_encryption').disabled = true; - document.getElementById('none_encryption').disabled = true; - } - }) })
\ No newline at end of file diff --git a/apps/files_encryption/l10n/ca.php b/apps/files_encryption/l10n/ca.php index 815cf1af003..1b888f7714b 100644 --- a/apps/files_encryption/l10n/ca.php +++ b/apps/files_encryption/l10n/ca.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Comproveu les contrasenyes i proveu-ho de nou.", "Could not change your file encryption password to your login password" => "No s'ha pogut canviar la contrasenya d'encriptació de fitxers per la d'accés", "Encryption" => "Encriptatge", +"File encryption is enabled." => "L'encriptació de fitxers està activada.", +"The following file types will not be encrypted:" => "Els tipus de fitxers següents no s'encriptaran:", +"Exclude the following file types from encryption:" => "Exclou els tipus de fitxers següents de l'encriptatge:", "None" => "Cap" ); diff --git a/apps/files_encryption/l10n/cs_CZ.php b/apps/files_encryption/l10n/cs_CZ.php index 27d2ae544b5..3278f13920a 100644 --- a/apps/files_encryption/l10n/cs_CZ.php +++ b/apps/files_encryption/l10n/cs_CZ.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Zkontrolujte, prosím, své heslo a zkuste to znovu.", "Could not change your file encryption password to your login password" => "Nelze změnit šifrovací heslo na přihlašovací.", "Encryption" => "Šifrování", +"File encryption is enabled." => "Šifrování je povoleno.", +"The following file types will not be encrypted:" => "Následující typy souborů nebudou šifrovány:", +"Exclude the following file types from encryption:" => "Vyjmout následující typy souborů ze šifrování:", "None" => "Žádné" ); diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php index c3c69e09007..465af23efdd 100644 --- a/apps/files_encryption/l10n/de_DE.php +++ b/apps/files_encryption/l10n/de_DE.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Bitte überprüfen sie Ihr Passwort und versuchen Sie es erneut.", "Could not change your file encryption password to your login password" => "Ihr Verschlüsselungspasswort konnte nicht als Anmeldepasswort gesetzt werden.", "Encryption" => "Verschlüsselung", +"File encryption is enabled." => "Datei-Verschlüsselung ist aktiviert", +"The following file types will not be encrypted:" => "Die folgenden Datei-Typen werden nicht verschlüsselt:", +"Exclude the following file types from encryption:" => "Die folgenden Datei-Typen von der Verschlüsselung ausnehmen:", "None" => "Keine" ); diff --git a/apps/files_encryption/l10n/es.php b/apps/files_encryption/l10n/es.php index 87f984c2c10..73b5f273d1f 100644 --- a/apps/files_encryption/l10n/es.php +++ b/apps/files_encryption/l10n/es.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Por favor revise su contraseña e intentelo de nuevo.", "Could not change your file encryption password to your login password" => "No se pudo cambiar la contraseña de cifrado de archivos de su contraseña de inicio de sesión", "Encryption" => "Cifrado", +"File encryption is enabled." => "La encriptacion de archivo esta activada.", +"The following file types will not be encrypted:" => "Los siguientes tipos de archivo no seran encriptados:", +"Exclude the following file types from encryption:" => "Excluir los siguientes tipos de archivo de la encriptacion:", "None" => "Ninguno" ); diff --git a/apps/files_encryption/l10n/fr.php b/apps/files_encryption/l10n/fr.php index 608778b2ec8..7d431e6e462 100644 --- a/apps/files_encryption/l10n/fr.php +++ b/apps/files_encryption/l10n/fr.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Veuillez vérifier vos mots de passe et réessayer.", "Could not change your file encryption password to your login password" => "Impossible de convertir votre mot de passe de chiffrement en mot de passe de connexion", "Encryption" => "Chiffrement", +"File encryption is enabled." => "Le chiffrement des fichiers est activé", +"The following file types will not be encrypted:" => "Les fichiers de types suivants ne seront pas chiffrés :", +"Exclude the following file types from encryption:" => "Ne pas chiffrer les fichiers dont les types sont les suivants :", "None" => "Aucun" ); diff --git a/apps/files_encryption/l10n/it.php b/apps/files_encryption/l10n/it.php index 86e1a66c458..ffa20b718d9 100644 --- a/apps/files_encryption/l10n/it.php +++ b/apps/files_encryption/l10n/it.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Controlla la password e prova ancora.", "Could not change your file encryption password to your login password" => "Impossibile convertire la password di cifratura nella password di accesso", "Encryption" => "Cifratura", +"File encryption is enabled." => "La cifratura dei file è abilitata.", +"The following file types will not be encrypted:" => "I seguenti tipi di file non saranno cifrati:", +"Exclude the following file types from encryption:" => "Escludi i seguenti tipi di file dalla cifratura:", "None" => "Nessuna" ); diff --git a/apps/files_encryption/l10n/ja_JP.php b/apps/files_encryption/l10n/ja_JP.php index 8d3df1f06ae..b7aeb8d8348 100644 --- a/apps/files_encryption/l10n/ja_JP.php +++ b/apps/files_encryption/l10n/ja_JP.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "パスワードを確認してもう一度行なってください。", "Could not change your file encryption password to your login password" => "ファイル暗号化パスワードをログインパスワードに変更できませんでした。", "Encryption" => "暗号化", +"File encryption is enabled." => "ファイルの暗号化は有効です。", +"The following file types will not be encrypted:" => "次のファイルタイプは暗号化されません:", +"Exclude the following file types from encryption:" => "次のファイルタイプを暗号化から除外:", "None" => "なし" ); diff --git a/apps/files_encryption/l10n/lv.php b/apps/files_encryption/l10n/lv.php index 7b94bb99e1a..1aae1377516 100644 --- a/apps/files_encryption/l10n/lv.php +++ b/apps/files_encryption/l10n/lv.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Lūdzu, pārbaudiet savas paroles un mēģiniet vēlreiz.", "Could not change your file encryption password to your login password" => "Nevarēja mainīt datņu šifrēšanas paroli uz ierakstīšanās paroli", "Encryption" => "Šifrēšana", +"File encryption is enabled." => "Datņu šifrēšana ir aktivēta.", +"The following file types will not be encrypted:" => "Sekojošās datnes netiks šifrētas:", +"Exclude the following file types from encryption:" => "Sekojošos datņu tipus izslēgt no šifrēšanas:", "None" => "Nav" ); diff --git a/apps/files_encryption/l10n/nl.php b/apps/files_encryption/l10n/nl.php index fc8a7954a9e..c434330049b 100644 --- a/apps/files_encryption/l10n/nl.php +++ b/apps/files_encryption/l10n/nl.php @@ -1,8 +1,12 @@ <?php $TRANSLATIONS = array( +"Please switch to your ownCloud client and change your encryption password to complete the conversion." => "Schakel om naar uw eigen ownCloud client en wijzig uw versleutelwachtwoord om de conversie af te ronden.", "switched to client side encryption" => "overgeschakeld naar client side encryptie", "Change encryption password to login password" => "Verander encryptie wachtwoord naar login wachtwoord", "Please check your passwords and try again." => "Controleer uw wachtwoorden en probeer het opnieuw.", "Could not change your file encryption password to your login password" => "Kon het bestandsencryptie wachtwoord niet veranderen naar het login wachtwoord", "Encryption" => "Versleuteling", +"File encryption is enabled." => "Bestandsversleuteling geactiveerd.", +"The following file types will not be encrypted:" => "De volgende bestandstypen zullen niet worden versleuteld:", +"Exclude the following file types from encryption:" => "Sluit de volgende bestandstypen uit van versleuteling:", "None" => "Geen" ); diff --git a/apps/files_encryption/l10n/ru.php b/apps/files_encryption/l10n/ru.php index c11cf74ecfb..651885fe022 100644 --- a/apps/files_encryption/l10n/ru.php +++ b/apps/files_encryption/l10n/ru.php @@ -1,4 +1,12 @@ <?php $TRANSLATIONS = array( +"Please switch to your ownCloud client and change your encryption password to complete the conversion." => "Пожалуйста переключитесь на Ваш клиент ownCloud и поменяйте пароль шиврования для завершения преобразования.", +"switched to client side encryption" => "переключён на шифрование со стороны клиента", +"Change encryption password to login password" => "Изменить пароль шифрования для пароля входа", +"Please check your passwords and try again." => "Пожалуйста проверьте пароли и попробуйте снова.", +"Could not change your file encryption password to your login password" => "Невозможно изменить Ваш пароль файла шифрования для пароля входа", "Encryption" => "Шифрование", +"File encryption is enabled." => "Шифрование файла включено.", +"The following file types will not be encrypted:" => "Следующие типы файлов не будут зашифрованы:", +"Exclude the following file types from encryption:" => "Исключить следующие типы файлов из шифрованных:", "None" => "Ничего" ); diff --git a/apps/files_encryption/l10n/sk_SK.php b/apps/files_encryption/l10n/sk_SK.php index 3a1e4c7e194..dc2907e704f 100644 --- a/apps/files_encryption/l10n/sk_SK.php +++ b/apps/files_encryption/l10n/sk_SK.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Skontrolujte si heslo a skúste to znovu.", "Could not change your file encryption password to your login password" => "Nie je možné zmeniť šifrovacie heslo na prihlasovacie", "Encryption" => "Šifrovanie", +"File encryption is enabled." => "Kryptovanie súborov nastavené.", +"The following file types will not be encrypted:" => "Uvedené typy súborov nebudú kryptované:", +"Exclude the following file types from encryption:" => "Nekryptovať uvedené typy súborov", "None" => "Žiadne" ); diff --git a/apps/files_encryption/l10n/sv.php b/apps/files_encryption/l10n/sv.php index c3f92dc66eb..e5294974e4e 100644 --- a/apps/files_encryption/l10n/sv.php +++ b/apps/files_encryption/l10n/sv.php @@ -5,5 +5,8 @@ "Please check your passwords and try again." => "Kontrollera dina lösenord och försök igen.", "Could not change your file encryption password to your login password" => "Kunde inte ändra ditt filkrypteringslösenord till ditt loginlösenord", "Encryption" => "Kryptering", +"File encryption is enabled." => "Filkryptering är aktiverat.", +"The following file types will not be encrypted:" => "Följande filtyper kommer inte att krypteras:", +"Exclude the following file types from encryption:" => "Exkludera följande filtyper från kryptering:", "None" => "Ingen" ); diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index e3ffacabc9a..c7a414c5080 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -4,8 +4,8 @@ * ownCloud
*
* @author Sam Tuke, Frank Karlitschek, Robin Appelman
- * @copyright 2012 Sam Tuke samtuke@owncloud.com,
- * Robin Appelman icewind@owncloud.com, Frank Karlitschek
+ * @copyright 2012 Sam Tuke samtuke@owncloud.com,
+ * Robin Appelman icewind@owncloud.com, Frank Karlitschek
* frank@owncloud.org
*
* This library is free software; you can redistribute it and/or
@@ -45,35 +45,17 @@ class Crypt { * @return string 'client' or 'server'
*/
public static function mode( $user = null ) {
-
-// $mode = \OC_Appconfig::getValue( 'files_encryption', 'mode', 'none' );
-//
-// if ( $mode == 'user') {
-// if ( !$user ) {
-// $user = \OCP\User::getUser();
-// }
-// $mode = 'none';
-// if ( $user ) {
-// $query = \OC_DB::prepare( "SELECT mode FROM *PREFIX*encryption WHERE uid = ?" );
-// $result = $query->execute(array($user));
-// if ($row = $result->fetchRow()){
-// $mode = $row['mode'];
-// }
-// }
-// }
-//
-// return $mode;
return 'server';
-
+
}
-
- /**
- * @brief Create a new encryption keypair
- * @return array publicKey, privatekey
- */
+
+ /**
+ * @brief Create a new encryption keypair
+ * @return array publicKey, privatekey
+ */
public static function createKeypair() {
-
+
$res = openssl_pkey_new();
// Get private key
@@ -81,576 +63,543 @@ class Crypt { // Get public key
$publicKey = openssl_pkey_get_details( $res );
-
+
$publicKey = $publicKey['key'];
-
+
return( array( 'publicKey' => $publicKey, 'privateKey' => $privateKey ) );
-
+
}
-
- /**
- * @brief Add arbitrary padding to encrypted data
- * @param string $data data to be padded
- * @return padded data
- * @note In order to end up with data exactly 8192 bytes long we must
- * add two letters. It is impossible to achieve exactly 8192 length
- * blocks with encryption alone, hence padding is added to achieve the
- * required length.
- */
+
+ /**
+ * @brief Add arbitrary padding to encrypted data
+ * @param string $data data to be padded
+ * @return padded data
+ * @note In order to end up with data exactly 8192 bytes long we must
+ * add two letters. It is impossible to achieve exactly 8192 length
+ * blocks with encryption alone, hence padding is added to achieve the
+ * required length.
+ */
public static function addPadding( $data ) {
-
+
$padded = $data . 'xx';
-
+
return $padded;
-
+
}
-
- /**
- * @brief Remove arbitrary padding to encrypted data
- * @param string $padded padded data to remove padding from
- * @return unpadded data on success, false on error
- */
+
+ /**
+ * @brief Remove arbitrary padding to encrypted data
+ * @param string $padded padded data to remove padding from
+ * @return unpadded data on success, false on error
+ */
public static function removePadding( $padded ) {
-
+
if ( substr( $padded, -2 ) == 'xx' ) {
-
+
$data = substr( $padded, 0, -2 );
-
+
return $data;
-
+
} else {
-
+
// TODO: log the fact that unpadded data was submitted for removal of padding
return false;
-
+
}
-
+
}
-
- /**
- * @brief Check if a file's contents contains an IV and is symmetrically encrypted
- * @return true / false
- * @note see also OCA\Encryption\Util->isEncryptedPath()
- */
+
+ /**
+ * @brief Check if a file's contents contains an IV and is symmetrically encrypted
+ * @return true / false
+ * @note see also OCA\Encryption\Util->isEncryptedPath()
+ */
public static function isCatfile( $content ) {
-
+
if ( !$content ) {
-
+
return false;
-
+
}
-
+
$noPadding = self::removePadding( $content );
-
+
// Fetch encryption metadata from end of file
$meta = substr( $noPadding, -22 );
-
+
// Fetch IV from end of file
$iv = substr( $meta, -16 );
-
+
// Fetch identifier from start of metadata
$identifier = substr( $meta, 0, 6 );
-
+
if ( $identifier == '00iv00') {
-
+
return true;
-
+
} else {
-
+
return false;
-
+
}
-
+
}
-
+
/**
* Check if a file is encrypted according to database file cache
* @param string $path
* @return bool
*/
public static function isEncryptedMeta( $path ) {
-
+
// TODO: Use DI to get \OC\Files\Filesystem out of here
-
+
// Fetch all file metadata from DB
$metadata = \OC\Files\Filesystem::getFileInfo( $path, '' );
-
+
// Return encryption status
return isset( $metadata['encrypted'] ) and ( bool )$metadata['encrypted'];
-
+
}
-
- /**
- * @brief Check if a file is encrypted via legacy system
- * @param string $relPath The path of the file, relative to user/data;
- * e.g. filename or /Docs/filename, NOT admin/files/filename
- * @return true / false
- */
+
+ /**
+ * @brief Check if a file is encrypted via legacy system
+ * @param string $relPath The path of the file, relative to user/data;
+ * e.g. filename or /Docs/filename, NOT admin/files/filename
+ * @return true / false
+ */
public static function isLegacyEncryptedContent( $data, $relPath ) {
-
+
// Fetch all file metadata from DB
$metadata = \OC\Files\Filesystem::getFileInfo( $relPath, '' );
-
+
// If a file is flagged with encryption in DB, but isn't a
// valid content + IV combination, it's probably using the
// legacy encryption system
- if (
- isset( $metadata['encrypted'] )
- and $metadata['encrypted'] === true
- and ! self::isCatfile( $data )
+ if (
+ isset( $metadata['encrypted'] )
+ and $metadata['encrypted'] === true
+ and ! self::isCatfile( $data )
) {
-
+
return true;
-
+
} else {
-
+
return false;
-
+
}
-
+
}
-
- /**
- * @brief Symmetrically encrypt a string
- * @returns encrypted file
- */
+
+ /**
+ * @brief Symmetrically encrypt a string
+ * @returns encrypted file
+ */
public static function encrypt( $plainContent, $iv, $passphrase = '' ) {
-
+
if ( $encryptedContent = openssl_encrypt( $plainContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
return $encryptedContent;
-
+
} else {
-
+
\OC_Log::write( 'Encryption library', 'Encryption (symmetric) of content failed', \OC_Log::ERROR );
-
+
return false;
-
+
}
-
+
}
-
- /**
- * @brief Symmetrically decrypt a string
- * @returns decrypted file
- */
+
+ /**
+ * @brief Symmetrically decrypt a string
+ * @returns decrypted file
+ */
public static function decrypt( $encryptedContent, $iv, $passphrase ) {
-
+
if ( $plainContent = openssl_decrypt( $encryptedContent, 'AES-128-CFB', $passphrase, false, $iv ) ) {
return $plainContent;
-
-
+
+
} else {
-
+
throw new \Exception( 'Encryption library: Decryption (symmetric) of content failed' );
-
- return false;
-
+
}
-
+
}
-
- /**
- * @brief Concatenate encrypted data with its IV and padding
- * @param string $content content to be concatenated
- * @param string $iv IV to be concatenated
- * @returns string concatenated content
- */
+
+ /**
+ * @brief Concatenate encrypted data with its IV and padding
+ * @param string $content content to be concatenated
+ * @param string $iv IV to be concatenated
+ * @returns string concatenated content
+ */
public static function concatIv ( $content, $iv ) {
-
+
$combined = $content . '00iv00' . $iv;
-
+
return $combined;
-
+
}
-
- /**
- * @brief Split concatenated data and IV into respective parts
- * @param string $catFile concatenated data to be split
- * @returns array keys: encrypted, iv
- */
+
+ /**
+ * @brief Split concatenated data and IV into respective parts
+ * @param string $catFile concatenated data to be split
+ * @returns array keys: encrypted, iv
+ */
public static function splitIv ( $catFile ) {
-
+
// Fetch encryption metadata from end of file
$meta = substr( $catFile, -22 );
-
+
// Fetch IV from end of file
$iv = substr( $meta, -16 );
-
+
// Remove IV and IV identifier text to expose encrypted content
$encrypted = substr( $catFile, 0, -22 );
-
+
$split = array(
'encrypted' => $encrypted
- , 'iv' => $iv
+ , 'iv' => $iv
);
-
+
return $split;
-
+
}
-
- /**
- * @brief Symmetrically encrypts a string and returns keyfile content
- * @param $plainContent content to be encrypted in keyfile
- * @returns encrypted content combined with IV
- * @note IV need not be specified, as it will be stored in the returned keyfile
- * and remain accessible therein.
- */
+
+ /**
+ * @brief Symmetrically encrypts a string and returns keyfile content
+ * @param $plainContent content to be encrypted in keyfile
+ * @returns encrypted content combined with IV
+ * @note IV need not be specified, as it will be stored in the returned keyfile
+ * and remain accessible therein.
+ */
public static function symmetricEncryptFileContent( $plainContent, $passphrase = '' ) {
-
+
if ( !$plainContent ) {
-
+
return false;
-
+
}
-
+
$iv = self::generateIv();
-
+
if ( $encryptedContent = self::encrypt( $plainContent, $iv, $passphrase ) ) {
-
- // Combine content to encrypt with IV identifier and actual IV
- $catfile = self::concatIv( $encryptedContent, $iv );
-
- $padded = self::addPadding( $catfile );
-
- return $padded;
-
+
+ // Combine content to encrypt with IV identifier and actual IV
+ $catfile = self::concatIv( $encryptedContent, $iv );
+
+ $padded = self::addPadding( $catfile );
+
+ return $padded;
+
} else {
-
+
\OC_Log::write( 'Encryption library', 'Encryption (symmetric) of keyfile content failed', \OC_Log::ERROR );
-
+
return false;
-
+
}
-
+
}
/**
- * @brief Symmetrically decrypts keyfile content
- * @param string $source
- * @param string $target
- * @param string $key the decryption key
- * @returns decrypted content
- *
- * This function decrypts a file
- */
+ * @brief Symmetrically decrypts keyfile content
+ * @param string $source
+ * @param string $target
+ * @param string $key the decryption key
+ * @returns decrypted content
+ *
+ * This function decrypts a file
+ */
public static function symmetricDecryptFileContent( $keyfileContent, $passphrase = '' ) {
-
+
if ( !$keyfileContent ) {
-
+
throw new \Exception( 'Encryption library: no data provided for decryption' );
-
+
}
-
+
// Remove padding
$noPadding = self::removePadding( $keyfileContent );
-
+
// Split into enc data and catfile
$catfile = self::splitIv( $noPadding );
-
+
if ( $plainContent = self::decrypt( $catfile['encrypted'], $catfile['iv'], $passphrase ) ) {
-
+
return $plainContent;
-
+
}
-
+
}
-
+
/**
- * @brief Creates symmetric keyfile content using a generated key
- * @param string $plainContent content to be encrypted
- * @returns array keys: key, encrypted
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
+ * @brief Creates symmetric keyfile content using a generated key
+ * @param string $plainContent content to be encrypted
+ * @returns array keys: key, encrypted
+ * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
+ *
+ * This function decrypts a file
+ */
public static function symmetricEncryptFileContentKeyfile( $plainContent ) {
-
+
$key = self::generateKey();
-
+
if( $encryptedContent = self::symmetricEncryptFileContent( $plainContent, $key ) ) {
-
+
return array(
'key' => $key
- , 'encrypted' => $encryptedContent
+ , 'encrypted' => $encryptedContent
);
-
+
} else {
-
+
return false;
-
+
}
-
+
}
-
+
/**
- * @brief Create asymmetrically encrypted keyfile content using a generated key
- * @param string $plainContent content to be encrypted
- * @returns array keys: key, encrypted
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
+ * @brief Create asymmetrically encrypted keyfile content using a generated key
+ * @param string $plainContent content to be encrypted
+ * @returns array keys: key, encrypted
+ * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
+ *
+ * This function decrypts a file
+ */
public static function multiKeyEncrypt( $plainContent, array $publicKeys ) {
-
+
// Set empty vars to be set by openssl by reference
$sealed = '';
$envKeys = array();
-
+
if( openssl_seal( $plainContent, $sealed, $envKeys, $publicKeys ) ) {
-
+
return array(
'keys' => $envKeys
- , 'encrypted' => $sealed
+ , 'encrypted' => $sealed
);
-
+
} else {
-
+
return false;
-
+
}
-
+
}
-
+
/**
- * @brief Asymmetrically encrypt a file using multiple public keys
- * @param string $plainContent content to be encrypted
- * @returns string $plainContent decrypted string
- * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
- *
- * This function decrypts a file
- */
+ * @brief Asymmetrically encrypt a file using multiple public keys
+ * @param string $plainContent content to be encrypted
+ * @returns string $plainContent decrypted string
+ * @note symmetricDecryptFileContent() can be used to decrypt files created using this method
+ *
+ * This function decrypts a file
+ */
public static function multiKeyDecrypt( $encryptedContent, $envKey, $privateKey ) {
-
+
if ( !$encryptedContent ) {
-
+
return false;
-
+
}
-
+
if ( openssl_open( $encryptedContent, $plainContent, $envKey, $privateKey ) ) {
-
+
return $plainContent;
-
+
} else {
-
+
\OC_Log::write( 'Encryption library', 'Decryption (asymmetric) of sealed content failed', \OC_Log::ERROR );
-
+
return false;
-
+
}
-
+
}
-
- /**
- * @brief Asymetrically encrypt a string using a public key
- * @returns encrypted file
- */
+
+ /**
+ * @brief Asymmetrically encrypt a string using a public key
+ * @returns encrypted file
+ */
public static function keyEncrypt( $plainContent, $publicKey ) {
-
+
openssl_public_encrypt( $plainContent, $encryptedContent, $publicKey );
-
+
return $encryptedContent;
-
+
}
-
- /**
- * @brief Asymetrically decrypt a file using a private key
- * @returns decrypted file
- */
+
+ /**
+ * @brief Asymetrically decrypt a file using a private key
+ * @returns decrypted file
+ */
public static function keyDecrypt( $encryptedContent, $privatekey ) {
-
+
openssl_private_decrypt( $encryptedContent, $plainContent, $privatekey );
-
+
return $plainContent;
-
+
}
- /**
- * @brief Encrypts content symmetrically and generates keyfile asymmetrically
- * @returns array containing catfile and new keyfile.
- * keys: data, key
- * @note this method is a wrapper for combining other crypt class methods
- */
+ /**
+ * @brief Encrypts content symmetrically and generates keyfile asymmetrically
+ * @returns array containing catfile and new keyfile.
+ * keys: data, key
+ * @note this method is a wrapper for combining other crypt class methods
+ */
public static function keyEncryptKeyfile( $plainContent, $publicKey ) {
-
+
// Encrypt plain data, generate keyfile & encrypted file
$cryptedData = self::symmetricEncryptFileContentKeyfile( $plainContent );
-
+
// Encrypt keyfile
$cryptedKey = self::keyEncrypt( $cryptedData['key'], $publicKey );
-
+
return array( 'data' => $cryptedData['encrypted'], 'key' => $cryptedKey );
-
+
}
-
- /**
- * @brief Takes catfile, keyfile, and private key, and
- * performs decryption
- * @returns decrypted content
- * @note this method is a wrapper for combining other crypt class methods
- */
+
+ /**
+ * @brief Takes catfile, keyfile, and private key, and
+ * performs decryption
+ * @returns decrypted content
+ * @note this method is a wrapper for combining other crypt class methods
+ */
public static function keyDecryptKeyfile( $catfile, $keyfile, $privateKey ) {
-
+
// Decrypt the keyfile with the user's private key
$decryptedKeyfile = self::keyDecrypt( $keyfile, $privateKey );
-
+
// Decrypt the catfile symmetrically using the decrypted keyfile
$decryptedData = self::symmetricDecryptFileContent( $catfile, $decryptedKeyfile );
-
+
return $decryptedData;
-
+
}
-
+
/**
- * @brief Symmetrically encrypt a file by combining encrypted component data blocks
- */
+ * @brief Symmetrically encrypt a file by combining encrypted component data blocks
+ */
public static function symmetricBlockEncryptFileContent( $plainContent, $key ) {
-
+
$crypted = '';
-
+
$remaining = $plainContent;
-
+
$testarray = array();
-
+
while( strlen( $remaining ) ) {
-
+
//echo "\n\n\$block = ".substr( $remaining, 0, 6126 );
-
+
// Encrypt a chunk of unencrypted data and add it to the rest
$block = self::symmetricEncryptFileContent( substr( $remaining, 0, 6126 ), $key );
-
+
$padded = self::addPadding( $block );
-
+
$crypted .= $block;
-
+
$testarray[] = $block;
-
+
// Remove the data already encrypted from remaining unencrypted data
$remaining = substr( $remaining, 6126 );
-
+
}
-
- //echo "hags ";
-
- //echo "\n\n\n\$crypted = $crypted\n\n\n";
-
- //print_r($testarray);
-
+
return $crypted;
}
/**
- * @brief Symmetrically decrypt a file by combining encrypted component data blocks
- */
+ * @brief Symmetrically decrypt a file by combining encrypted component data blocks
+ */
public static function symmetricBlockDecryptFileContent( $crypted, $key ) {
-
+
$decrypted = '';
-
+
$remaining = $crypted;
-
+
$testarray = array();
-
+
while( strlen( $remaining ) ) {
-
+
$testarray[] = substr( $remaining, 0, 8192 );
-
+
// Decrypt a chunk of unencrypted data and add it to the rest
$decrypted .= self::symmetricDecryptFileContent( $remaining, $key );
-
+
// Remove the data already encrypted from remaining unencrypted data
$remaining = substr( $remaining, 8192 );
-
+
}
-
- //echo "\n\n\$testarray = "; print_r($testarray);
-
+
return $decrypted;
-
+
}
-
- /**
- * @brief Generates a pseudo random initialisation vector
- * @return String $iv generated IV
- */
+
+ /**
+ * @brief Generates a pseudo random initialisation vector
+ * @return String $iv generated IV
+ */
public static function generateIv() {
-
+
if ( $random = openssl_random_pseudo_bytes( 12, $strong ) ) {
-
+
if ( !$strong ) {
-
+
// If OpenSSL indicates randomness is insecure, log error
\OC_Log::write( 'Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OC_Log::WARN );
-
+
}
-
+
// We encode the iv purely for string manipulation
// purposes - it gets decoded before use
$iv = base64_encode( $random );
-
+
return $iv;
-
+
} else {
-
- throw new Exception( 'Generating IV failed' );
-
+
+ throw new \Exception( 'Generating IV failed' );
+
}
-
+
}
-
- /**
- * @brief Generate a pseudo random 1024kb ASCII key
- * @returns $key Generated key
- */
+
+ /**
+ * @brief Generate a pseudo random 1024kb ASCII key
+ * @returns $key Generated key
+ */
public static function generateKey() {
-
+
// Generate key
if ( $key = base64_encode( openssl_random_pseudo_bytes( 183, $strong ) ) ) {
-
+
if ( !$strong ) {
-
+
// If OpenSSL indicates randomness is insecure, log error
- throw new Exception ( 'Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()' );
-
+ throw new \Exception ( 'Encryption library, Insecure symmetric key was generated using openssl_random_pseudo_bytes()' );
+
}
-
+
return $key;
-
+
} else {
-
+
return false;
-
- }
-
- }
- public static function changekeypasscode( $oldPassword, $newPassword ) {
-
- if ( \OCP\User::isLoggedIn() ) {
-
- $key = Keymanager::getPrivateKey( $user, $view );
-
- if ( ( $key = Crypt::symmetricDecryptFileContent($key,$oldpasswd) ) ) {
-
- if ( ( $key = Crypt::symmetricEncryptFileContent( $key, $newpasswd ) ) ) {
-
- Keymanager::setPrivateKey( $key );
-
- return true;
- }
-
- }
-
}
-
- return false;
-
+
}
-
+
/**
* @brief Get the blowfish encryption handeler for a key
* @param $key string (optional)
@@ -659,21 +608,21 @@ class Crypt { * if the key is left out, the default handeler will be used
*/
public static function getBlowfish( $key = '' ) {
-
+
if ( $key ) {
-
+
return new \Crypt_Blowfish( $key );
-
+
} else {
-
+
return false;
-
+
}
-
+
}
-
+
public static function legacyCreateKey( $passphrase ) {
-
+
// Generate a random integer
$key = mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 ) . mt_rand( 10000, 99999 );
@@ -681,9 +630,9 @@ class Crypt { $legacyEncKey = self::legacyEncrypt( $key, $passphrase );
return $legacyEncKey;
-
+
}
-
+
/**
* @brief encrypts content using legacy blowfish system
* @param $content the cleartext message you want to encrypt
@@ -693,54 +642,54 @@ class Crypt { * This function encrypts an content
*/
public static function legacyEncrypt( $content, $passphrase = '' ) {
-
+
$bf = self::getBlowfish( $passphrase );
-
+
return $bf->encrypt( $content );
-
+
}
-
+
/**
- * @brief decrypts content using legacy blowfish system
- * @param $content the cleartext message you want to decrypt
- * @param $key the encryption key (optional)
- * @returns cleartext content
- *
- * This function decrypts an content
- */
+ * @brief decrypts content using legacy blowfish system
+ * @param $content the cleartext message you want to decrypt
+ * @param $key the encryption key (optional)
+ * @returns cleartext content
+ *
+ * This function decrypts an content
+ */
public static function legacyDecrypt( $content, $passphrase = '' ) {
-
+
$bf = self::getBlowfish( $passphrase );
-
+
$decrypted = $bf->decrypt( $content );
-
+
$trimmed = rtrim( $decrypted, "\0" );
-
+
return $trimmed;
-
+
}
-
+
public static function legacyKeyRecryptKeyfile( $legacyEncryptedContent, $legacyPassphrase, $publicKey, $newPassphrase ) {
-
+
$decrypted = self::legacyDecrypt( $legacyEncryptedContent, $legacyPassphrase );
-
+
$recrypted = self::keyEncryptKeyfile( $decrypted, $publicKey );
-
+
return $recrypted;
-
+
}
-
+
/**
- * @brief Re-encryptes a legacy blowfish encrypted file using AES with integrated IV
- * @param $legacyContent the legacy encrypted content to re-encrypt
- * @returns cleartext content
- *
- * This function decrypts an content
- */
+ * @brief Re-encryptes a legacy blowfish encrypted file using AES with integrated IV
+ * @param $legacyContent the legacy encrypted content to re-encrypt
+ * @returns cleartext content
+ *
+ * This function decrypts an content
+ */
public static function legacyRecrypt( $legacyContent, $legacyPassphrase, $newPassphrase ) {
-
+
// TODO: write me
-
+
}
-
+
}
\ No newline at end of file diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php index 43af70dacc2..95587797154 100755 --- a/apps/files_encryption/lib/keymanager.php +++ b/apps/files_encryption/lib/keymanager.php @@ -1,325 +1,323 @@ -<?php
-
-/**
- * ownCloud
- *
- * @author Bjoern Schiessle
- * @copyright 2012 Bjoern Schiessle <schiessle@owncloud.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
- *
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-namespace OCA\Encryption;
-
-/**
- * @brief Class to manage storage and retrieval of encryption keys
- * @note Where a method requires a view object, it's root must be '/'
- */
-class Keymanager {
-
- /**
- * @brief retrieve the ENCRYPTED private key from a user
- *
- * @return string private key or false
- * @note the key returned by this method must be decrypted before use
- */
- public static function getPrivateKey( \OC_FilesystemView $view, $user ) {
-
- $path = '/' . $user . '/' . 'files_encryption' . '/' . $user.'.private.key';
-
- $key = $view->file_get_contents( $path );
-
- return $key;
- }
-
- /**
- * @brief retrieve public key for a specified user
- * @return string public key or false
- */
- public static function getPublicKey( \OC_FilesystemView $view, $userId ) {
-
- return $view->file_get_contents( '/public-keys/' . '/' . $userId . '.public.key' );
-
- }
-
- /**
- * @brief retrieve both keys from a user (private and public)
- * @return array keys: privateKey, publicKey
- */
- public static function getUserKeys( \OC_FilesystemView $view, $userId ) {
-
- return array(
- 'publicKey' => self::getPublicKey( $view, $userId )
- , 'privateKey' => self::getPrivateKey( $view, $userId )
- );
-
- }
-
- /**
- * @brief Retrieve public keys of all users with access to a file
- * @param string $path Path to file
- * @return array of public keys for the given file
- * @note Checks that the sharing app is enabled should be performed
- * by client code, that isn't checked here
- */
- public static function getPublicKeys( \OC_FilesystemView $view, $userId, $filePath ) {
-
- $path = ltrim( $path, '/' );
-
- $filepath = '/' . $userId . '/files/' . $filePath;
-
- // Check if sharing is enabled
- if ( OC_App::isEnabled( 'files_sharing' ) ) {
-
-
-
- } else {
-
- // check if it is a file owned by the user and not shared at all
- $userview = new \OC_FilesystemView( '/'.$userId.'/files/' );
-
- if ( $userview->file_exists( $path ) ) {
-
- $users[] = $userId;
-
- }
-
- }
-
- $view = new \OC_FilesystemView( '/public-keys/' );
-
- $keylist = array();
-
- $count = 0;
-
- foreach ( $users as $user ) {
-
- $keylist['key'.++$count] = $view->file_get_contents( $user.'.public.key' );
-
- }
-
- return $keylist;
-
- }
-
- /**
- * @brief store file encryption key
- *
- * @param string $path relative path of the file, including filename
- * @param string $key
- * @return bool true/false
- * @note The keyfile is not encrypted here. Client code must
- * asymmetrically encrypt the keyfile before passing it to this method
- */
- public static function setFileKey( \OC_FilesystemView $view, $path, $userId, $catfile ) {
-
- $basePath = '/' . $userId . '/files_encryption/keyfiles';
-
- $targetPath = self::keySetPreparation( $view, $path, $basePath, $userId );
-
- if ( $view->is_dir( $basePath . '/' . $targetPath ) ) {
-
-
-
- } else {
-
- // Save the keyfile in parallel directory
- return $view->file_put_contents( $basePath . '/' . $targetPath . '.key', $catfile );
-
- }
-
- }
-
- /**
- * @brief retrieve keyfile for an encrypted file
- * @param string file name
- * @return string file key or false on failure
- * @note The keyfile returned is asymmetrically encrypted. Decryption
- * of the keyfile must be performed by client code
- */
- public static function getFileKey( \OC_FilesystemView $view, $userId, $filePath ) {
-
- $filePath_f = ltrim( $filePath, '/' );
-
- $catfilePath = '/' . $userId . '/files_encryption/keyfiles/' . $filePath_f . '.key';
-
- if ( $view->file_exists( $catfilePath ) ) {
-
- return $view->file_get_contents( $catfilePath );
-
- } else {
-
- return false;
-
- }
-
- }
-
- /**
- * @brief Delete a keyfile
- *
- * @param OC_FilesystemView $view
- * @param string $userId username
- * @param string $path path of the file the key belongs to
- * @return bool Outcome of unlink operation
- * @note $path must be relative to data/user/files. e.g. mydoc.txt NOT
- * /data/admin/files/mydoc.txt
- */
- public static function deleteFileKey( \OC_FilesystemView $view, $userId, $path ) {
-
- $trimmed = ltrim( $path, '/' );
- $keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed . '.key';
-
- // Unlink doesn't tell us if file was deleted (not found returns
- // true), so we perform our own test
- if ( $view->file_exists( $keyPath ) ) {
-
- return $view->unlink( $keyPath );
-
- } else {
-
- \OC_Log::write( 'Encryption library', 'Could not delete keyfile; does not exist: "' . $keyPath, \OC_Log::ERROR );
-
- return false;
-
- }
-
- }
-
- /**
- * @brief store private key from the user
- * @param string key
- * @return bool
- * @note Encryption of the private key must be performed by client code
- * as no encryption takes place here
- */
- public static function setPrivateKey( $key ) {
-
- $user = \OCP\User::getUser();
-
- $view = new \OC_FilesystemView( '/' . $user . '/files_encryption' );
-
- \OC_FileProxy::$enabled = false;
-
- if ( !$view->file_exists( '' ) ) $view->mkdir( '' );
-
- return $view->file_put_contents( $user . '.private.key', $key );
-
- \OC_FileProxy::$enabled = true;
-
- }
-
- /**
- * @brief store private keys from the user
- *
- * @param string privatekey
- * @param string publickey
- * @return bool true/false
- */
- public static function setUserKeys($privatekey, $publickey) {
-
- return ( self::setPrivateKey( $privatekey ) && self::setPublicKey( $publickey ) );
-
- }
-
- /**
- * @brief store public key of the user
- *
- * @param string key
- * @return bool true/false
- */
- public static function setPublicKey( $key ) {
-
- $view = new \OC_FilesystemView( '/public-keys' );
-
- \OC_FileProxy::$enabled = false;
-
- if ( !$view->file_exists( '' ) ) $view->mkdir( '' );
-
- return $view->file_put_contents( \OCP\User::getUser() . '.public.key', $key );
-
- \OC_FileProxy::$enabled = true;
-
- }
-
- /**
- * @note 'shareKey' is a more user-friendly name for env_key
- */
- public static function setShareKey( \OC_FilesystemView $view, $path, $userId, $shareKey ) {
-
- $basePath = '/' . $userId . '/files_encryption/share-keys';
-
- $shareKeyPath = self::keySetPreparation( $view, $path, $basePath, $userId );
-
- return $view->file_put_contents( $basePath . '/' . $shareKeyPath . '.shareKey', $shareKey );
-
- }
-
- /**
- * @brief Make preparations to vars and filesystem for saving a keyfile
- */
- public static function keySetPreparation( \OC_FilesystemView $view, $path, $basePath, $userId ) {
-
- $targetPath = ltrim( $path, '/' );
-
- $path_parts = pathinfo( $targetPath );
-
- // If the file resides within a subdirectory, create it
- if (
- isset( $path_parts['dirname'] )
- && ! $view->file_exists( $basePath . '/' . $path_parts['dirname'] )
- ) {
-
- $view->mkdir( $basePath . '/' . $path_parts['dirname'] );
-
- }
-
- return $targetPath;
-
- }
-
- /**
- * @brief change password of private encryption key
- *
- * @param string $oldpasswd old password
- * @param string $newpasswd new password
- * @return bool true/false
- */
- public static function changePasswd($oldpasswd, $newpasswd) {
-
- if ( \OCP\User::checkPassword(\OCP\User::getUser(), $newpasswd) ) {
- return Crypt::changekeypasscode($oldpasswd, $newpasswd);
- }
- return false;
-
- }
-
- /**
- * @brief Fetch the legacy encryption key from user files
- * @param string $login used to locate the legacy key
- * @param string $passphrase used to decrypt the legacy key
- * @return true / false
- *
- * if the key is left out, the default handeler will be used
- */
- public function getLegacyKey() {
-
- $user = \OCP\User::getUser();
- $view = new \OC_FilesystemView( '/' . $user );
- return $view->file_get_contents( 'encryption.key' );
-
- }
-
+<?php + +/** + * ownCloud + * + * @author Bjoern Schiessle + * @copyright 2012 Bjoern Schiessle <schiessle@owncloud.com> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ + +namespace OCA\Encryption; + +/** + * @brief Class to manage storage and retrieval of encryption keys + * @note Where a method requires a view object, it's root must be '/' + */ +class Keymanager { + + /** + * @brief retrieve the ENCRYPTED private key from a user + * + * @return string private key or false + * @note the key returned by this method must be decrypted before use + */ + public static function getPrivateKey( \OC_FilesystemView $view, $user ) { + + $path = '/' . $user . '/' . 'files_encryption' . '/' . $user.'.private.key'; + + $key = $view->file_get_contents( $path ); + + return $key; + } + + /** + * @brief retrieve public key for a specified user + * @param \OC_FilesystemView $view + * @param $userId + * @return string public key or false + */ + public static function getPublicKey( \OC_FilesystemView $view, $userId ) { + + return $view->file_get_contents( '/public-keys/' . '/' . $userId . '.public.key' ); + + } + + /** + * @brief retrieve both keys from a user (private and public) + * @param \OC_FilesystemView $view + * @param $userId + * @return array keys: privateKey, publicKey + */ + public static function getUserKeys( \OC_FilesystemView $view, $userId ) { + + return array( + 'publicKey' => self::getPublicKey( $view, $userId ) + , 'privateKey' => self::getPrivateKey( $view, $userId ) + ); + + } + + /** + * @brief Retrieve public keys of all users with access to a file + * @param string $path Path to file + * @return array of public keys for the given file + * @note Checks that the sharing app is enabled should be performed + * by client code, that isn't checked here + */ + public static function getPublicKeys( \OC_FilesystemView $view, $userId, $filePath ) { + + $path = ltrim( $path, '/' ); + + $filepath = '/' . $userId . '/files/' . $filePath; + + // Check if sharing is enabled + if ( OC_App::isEnabled( 'files_sharing' ) ) { + + + + } else { + + // check if it is a file owned by the user and not shared at all + $userview = new \OC_FilesystemView( '/'.$userId.'/files/' ); + + if ( $userview->file_exists( $path ) ) { + + $users[] = $userId; + + } + + } + + $view = new \OC_FilesystemView( '/public-keys/' ); + + $keylist = array(); + + $count = 0; + + foreach ( $users as $user ) { + + $keylist['key'.++$count] = $view->file_get_contents( $user.'.public.key' ); + + } + + return $keylist; + + } + + /** + * @brief store file encryption key + * + * @param string $path relative path of the file, including filename + * @param string $key + * @return bool true/false + * @note The keyfile is not encrypted here. Client code must + * asymmetrically encrypt the keyfile before passing it to this method + */ + public static function setFileKey( \OC_FilesystemView $view, $path, $userId, $catfile ) { + + $basePath = '/' . $userId . '/files_encryption/keyfiles'; + + $targetPath = self::keySetPreparation( $view, $path, $basePath, $userId ); + + if ( $view->is_dir( $basePath . '/' . $targetPath ) ) { + + + + } else { + + // Save the keyfile in parallel directory + return $view->file_put_contents( $basePath . '/' . $targetPath . '.key', $catfile ); + + } + + } + + /** + * @brief retrieve keyfile for an encrypted file + * @param \OC_FilesystemView $view + * @param $userId + * @param $filePath + * @internal param \OCA\Encryption\file $string name + * @return string file key or false + * @note The keyfile returned is asymmetrically encrypted. Decryption + * of the keyfile must be performed by client code + */ + public static function getFileKey( \OC_FilesystemView $view, $userId, $filePath ) { + + $filePath_f = ltrim( $filePath, '/' ); + + $catfilePath = '/' . $userId . '/files_encryption/keyfiles/' . $filePath_f . '.key'; + + if ( $view->file_exists( $catfilePath ) ) { + + return $view->file_get_contents( $catfilePath ); + + } else { + + return false; + + } + + } + + /** + * @brief Delete a keyfile + * + * @param OC_FilesystemView $view + * @param string $userId username + * @param string $path path of the file the key belongs to + * @return bool Outcome of unlink operation + * @note $path must be relative to data/user/files. e.g. mydoc.txt NOT + * /data/admin/files/mydoc.txt + */ + public static function deleteFileKey( \OC_FilesystemView $view, $userId, $path ) { + + $trimmed = ltrim( $path, '/' ); + $keyPath = '/' . $userId . '/files_encryption/keyfiles/' . $trimmed . '.key'; + + // Unlink doesn't tell us if file was deleted (not found returns + // true), so we perform our own test + if ( $view->file_exists( $keyPath ) ) { + + return $view->unlink( $keyPath ); + + } else { + + \OC_Log::write( 'Encryption library', 'Could not delete keyfile; does not exist: "' . $keyPath, \OC_Log::ERROR ); + + return false; + + } + + } + + /** + * @brief store private key from the user + * @param string key + * @return bool + * @note Encryption of the private key must be performed by client code + * as no encryption takes place here + */ + public static function setPrivateKey( $key ) { + + $user = \OCP\User::getUser(); + + $view = new \OC_FilesystemView( '/' . $user . '/files_encryption' ); + + \OC_FileProxy::$enabled = false; + + if ( !$view->file_exists( '' ) ) + $view->mkdir( '' ); + + return $view->file_put_contents( $user . '.private.key', $key ); + + } + + /** + * @brief store private keys from the user + * + * @param string privatekey + * @param string publickey + * @return bool true/false + */ + public static function setUserKeys($privatekey, $publickey) { + + return ( self::setPrivateKey( $privatekey ) && self::setPublicKey( $publickey ) ); + + } + + /** + * @brief store public key of the user + * + * @param string key + * @return bool true/false + */ + public static function setPublicKey( $key ) { + + $view = new \OC_FilesystemView( '/public-keys' ); + + \OC_FileProxy::$enabled = false; + + if ( !$view->file_exists( '' ) ) + $view->mkdir( '' ); + + return $view->file_put_contents( \OCP\User::getUser() . '.public.key', $key ); + + + } + + /** + * @brief store file encryption key + * + * @param string $path relative path of the file, including filename + * @param string $key + * @param null $view + * @param string $dbClassName + * @return bool true/false + * @note The keyfile is not encrypted here. Client code must + * asymmetrically encrypt the keyfile before passing it to this method + */ + public static function setShareKey( \OC_FilesystemView $view, $path, $userId, $shareKey ) { + + $basePath = '/' . $userId . '/files_encryption/share-keys'; + + $shareKeyPath = self::keySetPreparation( $view, $path, $basePath, $userId ); + + return $view->file_put_contents( $basePath . '/' . $shareKeyPath . '.shareKey', $shareKey ); + + } + + /** + * @brief Make preparations to vars and filesystem for saving a keyfile + */ + public static function keySetPreparation( \OC_FilesystemView $view, $path, $basePath, $userId ) { + + $targetPath = ltrim( $path, '/' ); + + $path_parts = pathinfo( $targetPath ); + + // If the file resides within a subdirectory, create it + if ( + isset( $path_parts['dirname'] ) + && ! $view->file_exists( $basePath . '/' . $path_parts['dirname'] ) + ) { + + $view->mkdir( $basePath . '/' . $path_parts['dirname'] ); + + } + + return $targetPath; + + } + + /** + * @brief Fetch the legacy encryption key from user files + * @param string $login used to locate the legacy key + * @param string $passphrase used to decrypt the legacy key + * @return true / false + * + * if the key is left out, the default handler will be used + */ + public function getLegacyKey() { + + $user = \OCP\User::getUser(); + $view = new \OC_FilesystemView( '/' . $user ); + return $view->file_get_contents( 'encryption.key' ); + + } + }
\ No newline at end of file diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index d4b993b4c06..65d7d57a05a 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -173,7 +173,7 @@ class Stream { // $count will always be 8192 https://bugs.php.net/bug.php?id=21641 // This makes this function a lot simpler, but will break this class if the above 'bug' gets 'fixed' - \OCP\Util::writeLog( 'files_encryption', 'PHP "bug" 21641 no longer holds, decryption system requires refactoring', OCP\Util::FATAL ); + \OCP\Util::writeLog( 'files_encryption', 'PHP "bug" 21641 no longer holds, decryption system requires refactoring', \OCP\Util::FATAL ); die(); @@ -209,7 +209,7 @@ class Stream { } /** - * @brief Encrypt and pad data ready for writting to disk + * @brief Encrypt and pad data ready for writing to disk * @param string $plainData data to be encrypted * @param string $key key to use for encryption * @return encrypted data on success, false on failure @@ -403,7 +403,7 @@ class Stream { $encrypted = $this->preWriteEncrypt( $chunk, $this->keyfile ); // Write the data chunk to disk. This will be - // addended to the last data chunk if the file + // attended to the last data chunk if the file // being handled totals more than 6126 bytes fwrite( $this->handle, $encrypted ); diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 355ffb90ef0..52bc74db27a 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -69,11 +69,6 @@ class Util { //// DONE: add method to fetch legacy key //// DONE: add method to decrypt legacy encrypted data - //// TODO: add method to encrypt all user files using new system - //// TODO: add method to decrypt all user files using new system - //// TODO: add method to encrypt all user files using old system - //// TODO: add method to decrypt all user files using old system - // Admin UI: @@ -93,7 +88,6 @@ class Util { // Integration testing: - //// TODO: test new encryption with webdav //// TODO: test new encryption with versioning //// TODO: test new encryption with sharing //// TODO: test new encryption with proxies @@ -278,7 +272,7 @@ class Util { // will eat server resources :( if ( Keymanager::getFileKey( $this->view, $this->userId, $file ) - && Crypt::isCatfile( $filePath ) + && Crypt::isCatfile( $data ) ) { $found['encrypted'][] = array( 'name' => $file, 'path' => $filePath ); @@ -391,7 +385,6 @@ class Util { } - // FIXME: Legacy recrypting here isn't finished yet // Encrypt legacy encrypted files if ( ! empty( $legacyPassphrase ) @@ -437,6 +430,11 @@ class Util { } + /** + * @brief Return important encryption related paths + * @param string $pathName Name of the directory to return the path of + * @return string path + */ public function getPath( $pathName ) { switch ( $pathName ) { diff --git a/apps/files_encryption/settings-personal.php b/apps/files_encryption/settings-personal.php index 6fe4ea6d564..af0273cfdc4 100644 --- a/apps/files_encryption/settings-personal.php +++ b/apps/files_encryption/settings-personal.php @@ -12,8 +12,6 @@ $blackList = explode( ',', \OCP\Config::getAppValue( 'files_encryption', 'type_b $tmpl->assign( 'blacklist', $blackList );
-OCP\Util::addscript('files_encryption','settings-personal');
-
return $tmpl->fetchPage();
return null;
diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/files_encryption/templates/settings-personal.php index 1f71efb1735..47467c52c08 100644 --- a/apps/files_encryption/templates/settings-personal.php +++ b/apps/files_encryption/templates/settings-personal.php @@ -16,7 +16,7 @@ <?php echo $type; ?>
</li>
<?php endforeach; ?>
- </p>
+ </ul>
<?php endif; ?>
</fieldset>
</form>
diff --git a/apps/files_sharing/l10n/sr.php b/apps/files_sharing/l10n/sr.php index 2eb61a738e3..6e277f67711 100644 --- a/apps/files_sharing/l10n/sr.php +++ b/apps/files_sharing/l10n/sr.php @@ -1,4 +1,5 @@ <?php $TRANSLATIONS = array( "Password" => "Лозинка", -"Submit" => "Пошаљи" +"Submit" => "Пошаљи", +"Download" => "Преузми" ); diff --git a/apps/files_trashbin/ajax/delete.php b/apps/files_trashbin/ajax/delete.php new file mode 100644 index 00000000000..7a6bd1342ea --- /dev/null +++ b/apps/files_trashbin/ajax/delete.php @@ -0,0 +1,24 @@ +<?php + +OCP\JSON::checkLoggedIn(); +OCP\JSON::callCheck(); + +$file = $_REQUEST['file']; + +$path_parts = pathinfo($file); +if ($path_parts['dirname'] == '.') { + $delimiter = strrpos($file, '.d'); + $filename = substr($file, 0, $delimiter); + $timestamp = substr($file, $delimiter+2); +} else { + $filename = $file; + $timestamp = null; +} + +if (OCA\Files_Trashbin\Trashbin::delete($filename, $timestamp)) { + OCP\JSON::success(array("data" => array("filename" => $file))); +} else { + $l = OC_L10N::get('files_trashbin'); + OCP\JSON::error(array("data" => array("message" => $l->t("Couldn't delete %s permanently", array($file))))); +} + diff --git a/apps/files_trashbin/ajax/undelete.php b/apps/files_trashbin/ajax/undelete.php index ee1c64aaaf2..cc010979c51 100644 --- a/apps/files_trashbin/ajax/undelete.php +++ b/apps/files_trashbin/ajax/undelete.php @@ -22,7 +22,7 @@ foreach ($list as $file) { $timestamp = null; } - if ( !OCA_Trash\Trashbin::restore($file, $filename, $timestamp) ) { + if ( !OCA\Files_Trashbin\Trashbin::restore($file, $filename, $timestamp) ) { $error[] = $filename; } else { $success[$i]['filename'] = $file; @@ -37,8 +37,10 @@ if ( $error ) { foreach ( $error as $e ) { $filelist .= $e.', '; } - OCP\JSON::error(array("data" => array("message" => "Couldn't restore ".rtrim($filelist,', '), "success" => $success, "error" => $error))); + $l = OC_L10N::get('files_trashbin'); + $message = $l->t("Couldn't restore %s", array(rtrim($filelist,', '))); + OCP\JSON::error(array("data" => array("message" => $message, + "success" => $success, "error" => $error))); } else { OCP\JSON::success(array("data" => array("success" => $success))); } - diff --git a/apps/files_trashbin/appinfo/app.php b/apps/files_trashbin/appinfo/app.php index 3741d42c781..b1a15cd13d1 100644 --- a/apps/files_trashbin/appinfo/app.php +++ b/apps/files_trashbin/appinfo/app.php @@ -1,7 +1,7 @@ <?php -OC::$CLASSPATH['OCA_Trash\Hooks'] = 'apps/files_trashbin/lib/hooks.php';
-OC::$CLASSPATH['OCA_Trash\Trashbin'] = 'apps/files_trashbin/lib/trash.php';
+OC::$CLASSPATH['OCA\Files_Trashbin\Hooks'] = 'apps/files_trashbin/lib/hooks.php';
+OC::$CLASSPATH['OCA\Files_Trashbin\Trashbin'] = 'apps/files_trashbin/lib/trash.php';
-OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA_Trash\Hooks", "remove_hook"); +OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Files_Trashbin\Hooks", "remove_hook"); diff --git a/apps/files_trashbin/js/disableDefaultActions.js b/apps/files_trashbin/js/disableDefaultActions.js index 56b95407dd3..27c3e13db4d 100644 --- a/apps/files_trashbin/js/disableDefaultActions.js +++ b/apps/files_trashbin/js/disableDefaultActions.js @@ -1,3 +1,4 @@ /* disable download and sharing actions */
var disableDownloadActions = true;
var disableSharing = true;
+var trashBinApp = true;
\ No newline at end of file diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index f1241fce51e..6c810e4c2bd 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -22,6 +22,31 @@ $(document).ready(function() { }); }; + FileActions.register('all', 'Delete', OC.PERMISSION_READ, function () { + return OC.imagePath('core', 'actions/delete'); + }, function (filename) { + $('.tipsy').remove(); + + var tr=$('tr').filterAttr('data-file', filename); + var deleteAction = $('tr').filterAttr('data-file',filename).children("td.date").children(".action.delete"); + var oldHTML = deleteAction[0].outerHTML; + var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'delete file permanently')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>'; + deleteAction[0].outerHTML = newHTML; + + $.post(OC.filePath('files_trashbin','ajax','delete.php'), + {file:tr.attr('data-file') }, + function(result){ + if ( result.status == 'success' ) { + var row = document.getElementById(result.data.filename); + row.parentNode.removeChild(row); + } else { + deleteAction[0].outerHTML = oldHTML; + OC.dialogs.alert(result.data.message, 'Error'); + } + }); + + }); + // Sets the select_all checkbox behaviour : $('#select_all').click(function() { if($(this).attr('checked')){ diff --git a/apps/files_trashbin/l10n/ca.php b/apps/files_trashbin/l10n/ca.php index 3af33c8a310..803b0c81ef0 100644 --- a/apps/files_trashbin/l10n/ca.php +++ b/apps/files_trashbin/l10n/ca.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "No s'ha pogut esborrar permanentment %s", +"Couldn't restore %s" => "No s'ha pogut restaurar %s", "perform restore operation" => "executa l'operació de restauració", +"delete file permanently" => "esborra el fitxer permanentment", "Name" => "Nom", "Deleted" => "Eliminat", "1 folder" => "1 carpeta", diff --git a/apps/files_trashbin/l10n/cs_CZ.php b/apps/files_trashbin/l10n/cs_CZ.php index caaaea37436..eeb27784d3e 100644 --- a/apps/files_trashbin/l10n/cs_CZ.php +++ b/apps/files_trashbin/l10n/cs_CZ.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "Nelze trvale odstranit %s", +"Couldn't restore %s" => "Nelze obnovit %s", "perform restore operation" => "provést obnovu", +"delete file permanently" => "trvale odstranit soubor", "Name" => "Název", "Deleted" => "Smazáno", "1 folder" => "1 složka", diff --git a/apps/files_trashbin/l10n/de_DE.php b/apps/files_trashbin/l10n/de_DE.php index 45e30d85a3b..e293bf0b2eb 100644 --- a/apps/files_trashbin/l10n/de_DE.php +++ b/apps/files_trashbin/l10n/de_DE.php @@ -1,5 +1,6 @@ <?php $TRANSLATIONS = array( "perform restore operation" => "Führe die Wiederherstellung aus", +"delete file permanently" => "Datei entgültig löschen", "Name" => "Name", "Deleted" => "Gelöscht", "1 folder" => "1 Ordner", diff --git a/apps/files_trashbin/l10n/es.php b/apps/files_trashbin/l10n/es.php index b191ffc4246..c14b9776473 100644 --- a/apps/files_trashbin/l10n/es.php +++ b/apps/files_trashbin/l10n/es.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "No se puede eliminar %s permanentemente", +"Couldn't restore %s" => "No se puede restaurar %s", "perform restore operation" => "Restaurar", +"delete file permanently" => "Eliminar archivo permanentemente", "Name" => "Nombre", "Deleted" => "Eliminado", "1 folder" => "1 carpeta", diff --git a/apps/files_trashbin/l10n/fr.php b/apps/files_trashbin/l10n/fr.php index 51ade82d908..609b2fa9bd7 100644 --- a/apps/files_trashbin/l10n/fr.php +++ b/apps/files_trashbin/l10n/fr.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "Impossible d'effacer %s de façon permanente", +"Couldn't restore %s" => "Impossible de restaurer %s", "perform restore operation" => "effectuer l'opération de restauration", +"delete file permanently" => "effacer définitivement le fichier", "Name" => "Nom", "Deleted" => "Effacé", "1 folder" => "1 dossier", diff --git a/apps/files_trashbin/l10n/it.php b/apps/files_trashbin/l10n/it.php index 7def431a42a..8627682d088 100644 --- a/apps/files_trashbin/l10n/it.php +++ b/apps/files_trashbin/l10n/it.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "Impossibile eliminare %s definitivamente", +"Couldn't restore %s" => "Impossibile ripristinare %s", "perform restore operation" => "esegui operazione di ripristino", +"delete file permanently" => "elimina il file definitivamente", "Name" => "Nome", "Deleted" => "Eliminati", "1 folder" => "1 cartella", diff --git a/apps/files_trashbin/l10n/ja_JP.php b/apps/files_trashbin/l10n/ja_JP.php index 0b4e1954e74..2bccf3f3bd5 100644 --- a/apps/files_trashbin/l10n/ja_JP.php +++ b/apps/files_trashbin/l10n/ja_JP.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "%s を完全に削除出来ませんでした", +"Couldn't restore %s" => "%s を復元出来ませんでした", "perform restore operation" => "復元操作を実行する", +"delete file permanently" => "ファイルを完全に削除する", "Name" => "名前", "Deleted" => "削除済み", "1 folder" => "1 フォルダ", diff --git a/apps/files_trashbin/l10n/lv.php b/apps/files_trashbin/l10n/lv.php index 017a8d285c0..5ecb99b9892 100644 --- a/apps/files_trashbin/l10n/lv.php +++ b/apps/files_trashbin/l10n/lv.php @@ -1,5 +1,8 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "Nevarēja pilnībā izdzēst %s", +"Couldn't restore %s" => "Nevarēja atjaunot %s", "perform restore operation" => "veikt atjaunošanu", +"delete file permanently" => "dzēst datni pavisam", "Name" => "Nosaukums", "Deleted" => "Dzēsts", "1 folder" => "1 mape", diff --git a/apps/files_trashbin/l10n/nl.php b/apps/files_trashbin/l10n/nl.php index 4efa6ecf662..a41a5c2fd9c 100644 --- a/apps/files_trashbin/l10n/nl.php +++ b/apps/files_trashbin/l10n/nl.php @@ -1,5 +1,6 @@ <?php $TRANSLATIONS = array( "perform restore operation" => "uitvoeren restore operatie", +"delete file permanently" => "verwijder bestanden definitief", "Name" => "Naam", "Deleted" => "Verwijderd", "1 folder" => "1 map", diff --git a/apps/files_trashbin/l10n/ru.php b/apps/files_trashbin/l10n/ru.php index 23d739a2ff7..f6c85a6800e 100644 --- a/apps/files_trashbin/l10n/ru.php +++ b/apps/files_trashbin/l10n/ru.php @@ -1,7 +1,14 @@ <?php $TRANSLATIONS = array( +"Couldn't delete %s permanently" => "%s не может быть удалён навсегда", +"Couldn't restore %s" => "%s не может быть восстановлен", +"perform restore operation" => "выполнить операцию восстановления", +"delete file permanently" => "удалить файл навсегда", "Name" => "Имя", +"Deleted" => "Удалён", "1 folder" => "1 папка", "{count} folders" => "{count} папок", "1 file" => "1 файл", -"{count} files" => "{count} файлов" +"{count} files" => "{count} файлов", +"Nothing in here. Your trash bin is empty!" => "Здесь ничего нет. Ваша корзина пуста!", +"Restore" => "Восстановить" ); diff --git a/apps/files_trashbin/l10n/ru_RU.php b/apps/files_trashbin/l10n/ru_RU.php index 8ef2658cf24..c5b1408e2cc 100644 --- a/apps/files_trashbin/l10n/ru_RU.php +++ b/apps/files_trashbin/l10n/ru_RU.php @@ -3,5 +3,6 @@ "1 folder" => "1 папка", "{count} folders" => "{количество} папок", "1 file" => "1 файл", -"{count} files" => "{количество} файлов" +"{count} files" => "{количество} файлов", +"Restore" => "Восстановить" ); diff --git a/apps/files_trashbin/l10n/sk_SK.php b/apps/files_trashbin/l10n/sk_SK.php index 81d43614d7b..759850783e2 100644 --- a/apps/files_trashbin/l10n/sk_SK.php +++ b/apps/files_trashbin/l10n/sk_SK.php @@ -1,5 +1,7 @@ <?php $TRANSLATIONS = array( +"Couldn't restore %s" => "Nemožno obnoviť %s", "perform restore operation" => "vykonať obnovu", +"delete file permanently" => "trvalo zmazať súbor", "Name" => "Meno", "Deleted" => "Zmazané", "1 folder" => "1 priečinok", diff --git a/apps/files_trashbin/l10n/sv.php b/apps/files_trashbin/l10n/sv.php index ca4dba04967..5bde85e7056 100644 --- a/apps/files_trashbin/l10n/sv.php +++ b/apps/files_trashbin/l10n/sv.php @@ -1,4 +1,5 @@ <?php $TRANSLATIONS = array( +"perform restore operation" => "utför återställning", "Name" => "Namn", "Deleted" => "Raderad", "1 folder" => "1 mapp", diff --git a/apps/files_trashbin/lib/hooks.php b/apps/files_trashbin/lib/hooks.php index d3bee105b51..d6a62d447b8 100644 --- a/apps/files_trashbin/lib/hooks.php +++ b/apps/files_trashbin/lib/hooks.php @@ -24,7 +24,7 @@ * This class contains all hooks. */ -namespace OCA_Trash; +namespace OCA\Files_Trashbin; class Hooks { diff --git a/apps/files_trashbin/lib/trash.php b/apps/files_trashbin/lib/trash.php index a7eff3d44e0..bc6562b2080 100644 --- a/apps/files_trashbin/lib/trash.php +++ b/apps/files_trashbin/lib/trash.php @@ -20,7 +20,7 @@ *
*/
-namespace OCA_Trash;
+namespace OCA\Files_Trashbin;
class Trashbin { @@ -65,7 +65,7 @@ class Trashbin { if ( \OCP\App::isEnabled('files_versions') ) {
if ( $view->is_dir('files_versions'.$file_path) ) {
$view->rename('files_versions'.$file_path, 'versions_trashbin/'. $deleted.'.d'.$timestamp);
- } else if ( $versions = \OCA_Versions\Storage::getVersions($file_path) ) {
+ } else if ( $versions = \OCA\Files_Versions\Storage::getVersions($file_path) ) {
foreach ($versions as $v) {
$view->rename('files_versions'.$v['path'].'.v'.$v['version'], 'versions_trashbin/'. $deleted.'.v'.$v['version'].'.d'.$timestamp);
}
@@ -151,6 +151,45 @@ class Trashbin { } /**
+ * delete file from trash bin permanently
+ * @param $filename path to the file + * @param $timestamp of deletion time
+ * @return true/false
+ */
+ public static function delete($filename, $timestamp=null) {
+
+ $user = \OCP\User::getUser();
+ $view = new \OC_FilesystemView('/'.$user);
+
+ if ( $timestamp ) {
+ $query = \OC_DB::prepare('DELETE FROM *PREFIX*files_trash WHERE user=? AND id=? AND timestamp=?');
+ $query->execute(array($user,$filename,$timestamp));
+ $file = $filename.'.d'.$timestamp; + } else { + $file = $filename; + } + + if ( \OCP\App::isEnabled('files_versions') ) { + if ($view->is_dir('versions_trashbin/'.$file)) { + $view->unlink('versions_trashbin/'.$file); + } else if ( $versions = self::getVersionsFromTrash($file, $timestamp) ) { + foreach ($versions as $v) { + if ($timestamp ) { + $view->unlink('versions_trashbin/'.$filename.'.v'.$v.'.d'.$timestamp); + } else { + $view->unlink('versions_trashbin/'.$file.'.v'.$v); + } + } + } + }
+ + $view->unlink('/files_trashbin/'.$file); +
+ return true;
+ } + + + /**
* clean up the trash bin
*/
private static function expire() { diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php index c3e51b4becd..24e4a0e6c69 100644 --- a/apps/files_trashbin/templates/index.php +++ b/apps/files_trashbin/templates/index.php @@ -9,7 +9,7 @@ <div id="emptyfolder"><?php echo $l->t('Nothing in here. Your trash bin is empty!')?></div> <?php endif; ?> -<table> +<table class="hascontrols"> <thead> <tr> <th id='headerName'> diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php index dc5a59cb4af..2970915ac63 100644 --- a/apps/files_versions/ajax/rollbackVersion.php +++ b/apps/files_versions/ajax/rollbackVersion.php @@ -11,6 +11,7 @@ $revision=(int)$_GET['revision']; if(OCA\Files_Versions\Storage::rollback( $file, $revision )) { OCP\JSON::success(array("data" => array( "revision" => $revision, "file" => $file ))); }else{ - OCP\JSON::error(array("data" => array( "message" => "Could not revert:" . $file ))); + $l = OC_L10N::get('files_versions'); + OCP\JSON::error(array("data" => array( "message" => $l->t("Could not revert: %s", array($file) )))); } diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index 1bd5cde44be..437a3fec065 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -24,6 +24,7 @@ OCP\User::checkLoggedIn( ); OCP\Util::addStyle('files_versions', 'versions'); $tmpl = new OCP\Template( 'files_versions', 'history', 'user' ); +$l = OC_L10N::get('files_versions'); if ( isset( $_GET['path'] ) ) { @@ -36,15 +37,21 @@ if ( isset( $_GET['path'] ) ) { if( $versions->rollback( $path, $_GET['revert'] ) ) { - $tmpl->assign( 'outcome_stat', 'success' ); + $tmpl->assign( 'outcome_stat', $l->t('success') ); - $tmpl->assign( 'outcome_msg', "File {$_GET['path']} was reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) ); + $message = $l->t('File %s was reverted to version %s', + array($_GET['path'], OCP\Util::formatDate( doubleval($_GET['revert']) ) ) ); + + $tmpl->assign( 'outcome_msg', $message); } else { - $tmpl->assign( 'outcome_stat', 'failure' ); + $tmpl->assign( 'outcome_stat', $l->t('failure') ); + + $message = $l->t('File %s could not be reverted to version %s', + array($_GET['path'], OCP\Util::formatDate( doubleval($_GET['revert']) ) ) ); - $tmpl->assign( 'outcome_msg', "File {$_GET['path']} could not be reverted to version ".OCP\Util::formatDate( doubleval($_GET['revert']) ) ); + $tmpl->assign( 'outcome_msg', $message); } @@ -58,12 +65,12 @@ if ( isset( $_GET['path'] ) ) { }else{ - $tmpl->assign( 'message', 'No old versions available' ); + $tmpl->assign( 'message', $l->t('No old versions available') ); } }else{ - $tmpl->assign( 'message', 'No path specified' ); + $tmpl->assign( 'message', $l->t('No path specified') ); } diff --git a/apps/files_versions/l10n/ca.php b/apps/files_versions/l10n/ca.php index 01e0a116873..fc900c47dc7 100644 --- a/apps/files_versions/l10n/ca.php +++ b/apps/files_versions/l10n/ca.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "No s'ha pogut revertir: %s", +"success" => "èxit", +"File %s was reverted to version %s" => "El fitxer %s s'ha revertit a la versió %s", +"failure" => "fallada", +"File %s could not be reverted to version %s" => "El fitxer %s no s'ha pogut revertir a la versió %s", +"No old versions available" => "No hi ha versións antigues disponibles", +"No path specified" => "No heu especificat el camí", "History" => "Historial", +"Revert a file to a previous version by clicking on its revert button" => "Reverteix un fitxer a una versió anterior fent clic en el seu botó de reverteix", "Files Versioning" => "Fitxers de Versions", "Enable" => "Habilita" ); diff --git a/apps/files_versions/l10n/cs_CZ.php b/apps/files_versions/l10n/cs_CZ.php index d219c3e68da..22d4a2ad827 100644 --- a/apps/files_versions/l10n/cs_CZ.php +++ b/apps/files_versions/l10n/cs_CZ.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Nelze navrátit: %s", +"success" => "úspěch", +"File %s was reverted to version %s" => "Soubor %s byl navrácen na verzi %s", +"failure" => "sehlhání", +"File %s could not be reverted to version %s" => "Soubor %s nemohl být navrácen na verzi %s", +"No old versions available" => "Nejsou dostupné žádné starší verze", +"No path specified" => "Nezadána cesta", "History" => "Historie", +"Revert a file to a previous version by clicking on its revert button" => "Navraťte soubor do předchozí verze kliknutím na tlačítko navrátit", "Files Versioning" => "Verzování souborů", "Enable" => "Povolit" ); diff --git a/apps/files_versions/l10n/de_DE.php b/apps/files_versions/l10n/de_DE.php index 2fcb996de7b..cf33bb071e6 100644 --- a/apps/files_versions/l10n/de_DE.php +++ b/apps/files_versions/l10n/de_DE.php @@ -1,4 +1,8 @@ <?php $TRANSLATIONS = array( +"success" => "Erfolgreich", +"failure" => "Fehlgeschlagen", +"No old versions available" => "keine älteren Versionen verfügbar", +"No path specified" => "Kein Pfad angegeben", "History" => "Historie", "Files Versioning" => "Dateiversionierung", "Enable" => "Aktivieren" diff --git a/apps/files_versions/l10n/es.php b/apps/files_versions/l10n/es.php index 4a8c34e5180..608e171a4b1 100644 --- a/apps/files_versions/l10n/es.php +++ b/apps/files_versions/l10n/es.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "No se puede revertir: %s", +"success" => "exitoso", +"File %s was reverted to version %s" => "El archivo %s fue revertido a la version %s", +"failure" => "fallo", +"File %s could not be reverted to version %s" => "El archivo %s no puede ser revertido a la version %s", +"No old versions available" => "No hay versiones antiguas disponibles", +"No path specified" => "Ruta no especificada", "History" => "Historial", +"Revert a file to a previous version by clicking on its revert button" => "Revertir un archivo a una versión anterior haciendo clic en el boton de revertir", "Files Versioning" => "Versionado de archivos", "Enable" => "Habilitar" ); diff --git a/apps/files_versions/l10n/fr.php b/apps/files_versions/l10n/fr.php index 2d26b98860a..6b2cf9ba6b5 100644 --- a/apps/files_versions/l10n/fr.php +++ b/apps/files_versions/l10n/fr.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Impossible de restaurer %s", +"success" => "succès", +"File %s was reverted to version %s" => "Le fichier %s a été restauré dans sa version %s", +"failure" => "échec", +"File %s could not be reverted to version %s" => "Le fichier %s ne peut être restauré dans sa version %s", +"No old versions available" => "Aucune ancienne version n'est disponible", +"No path specified" => "Aucun chemin spécifié", "History" => "Historique", +"Revert a file to a previous version by clicking on its revert button" => "Restaurez un fichier dans une version antérieure en cliquant sur son bouton de restauration", "Files Versioning" => "Versionnage des fichiers", "Enable" => "Activer" ); diff --git a/apps/files_versions/l10n/it.php b/apps/files_versions/l10n/it.php index c57b0930111..3289f7f68d1 100644 --- a/apps/files_versions/l10n/it.php +++ b/apps/files_versions/l10n/it.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Impossibild ripristinare: %s", +"success" => "completata", +"File %s was reverted to version %s" => "Il file %s è stato ripristinato alla versione %s", +"failure" => "non riuscita", +"File %s could not be reverted to version %s" => "Il file %s non può essere ripristinato alla versione %s", +"No old versions available" => "Non sono disponibili versioni precedenti", +"No path specified" => "Nessun percorso specificato", "History" => "Cronologia", +"Revert a file to a previous version by clicking on its revert button" => "Ripristina un file a una versione precedente facendo clic sul rispettivo pulsante di ripristino", "Files Versioning" => "Controllo di versione dei file", "Enable" => "Abilita" ); diff --git a/apps/files_versions/l10n/ja_JP.php b/apps/files_versions/l10n/ja_JP.php index c97ba3d00ee..16018765708 100644 --- a/apps/files_versions/l10n/ja_JP.php +++ b/apps/files_versions/l10n/ja_JP.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "元に戻せませんでした: %s", +"success" => "成功", +"File %s was reverted to version %s" => "ファイル %s をバージョン %s に戻しました", +"failure" => "失敗", +"File %s could not be reverted to version %s" => "ファイル %s をバージョン %s に戻せませんでした", +"No old versions available" => "利用可能な古いバージョンはありません", +"No path specified" => "パスが指定されていません", "History" => "履歴", +"Revert a file to a previous version by clicking on its revert button" => "もとに戻すボタンをクリックすると、ファイルを過去のバージョンに戻します", "Files Versioning" => "ファイルのバージョン管理", "Enable" => "有効化" ); diff --git a/apps/files_versions/l10n/lv.php b/apps/files_versions/l10n/lv.php index ae2ead12f4c..2203dc706b8 100644 --- a/apps/files_versions/l10n/lv.php +++ b/apps/files_versions/l10n/lv.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Nevarēja atgriezt — %s", +"success" => "veiksme", +"File %s was reverted to version %s" => "Datne %s tika atgriezt uz versiju %s", +"failure" => "neveiksme", +"File %s could not be reverted to version %s" => "Datni %s nevarēja atgriezt uz versiju %s", +"No old versions available" => "Nav pieejamu vecāku versiju", +"No path specified" => "Nav norādīts ceļš", "History" => "Vēsture", +"Revert a file to a previous version by clicking on its revert button" => "Atgriez datni uz iepriekšēju versiju, spiežot uz tās atgriešanas pogu", "Files Versioning" => "Datņu versiju izskošana", "Enable" => "Aktivēt" ); diff --git a/apps/files_versions/l10n/ru.php b/apps/files_versions/l10n/ru.php index 4c7fb501091..221d24ce8d1 100644 --- a/apps/files_versions/l10n/ru.php +++ b/apps/files_versions/l10n/ru.php @@ -1,5 +1,13 @@ <?php $TRANSLATIONS = array( +"Could not revert: %s" => "Не может быть возвращён: %s", +"success" => "успех", +"File %s was reverted to version %s" => "Файл %s был возвращён к версии %s", +"failure" => "провал", +"File %s could not be reverted to version %s" => "Файл %s не может быть возвращён к версии %s", +"No old versions available" => "Нет доступных старых версий", +"No path specified" => "Путь не указан", "History" => "История", +"Revert a file to a previous version by clicking on its revert button" => "Вернуть файл к предыдущей версии нажатием на кнопку возврата", "Files Versioning" => "Версии файлов", "Enable" => "Включить" ); diff --git a/apps/files_versions/l10n/sk_SK.php b/apps/files_versions/l10n/sk_SK.php index a3a3567cb4f..8a59286b5a5 100644 --- a/apps/files_versions/l10n/sk_SK.php +++ b/apps/files_versions/l10n/sk_SK.php @@ -1,4 +1,9 @@ <?php $TRANSLATIONS = array( +"success" => "uspech", +"File %s was reverted to version %s" => "Subror %s bol vrateny na verziu %s", +"failure" => "chyba", +"No old versions available" => "Nie sú dostupné žiadne staršie verzie", +"No path specified" => "Nevybrali ste cestu", "History" => "História", "Files Versioning" => "Vytváranie verzií súborov", "Enable" => "Zapnúť" diff --git a/apps/files_versions/templates/history.php b/apps/files_versions/templates/history.php index cc5a494f19e..850ece89c98 100644 --- a/apps/files_versions/templates/history.php +++ b/apps/files_versions/templates/history.php @@ -17,7 +17,7 @@ if( isset( $_['message'] ) ) { } echo( '<strong>Versions of '.$_['path'] ).'</strong><br>'; - echo('<p><em>Revert a file to a previous version by clicking on its revert button</em></p><br />'); + echo('<p><em>'.$l->t('Revert a file to a previous version by clicking on its revert button').'</em></p><br />'); foreach ( $_['versions'] as $v ) { echo ' '; diff --git a/apps/user_ldap/l10n/bn_BD.php b/apps/user_ldap/l10n/bn_BD.php index 6c347eab879..69dfc896179 100644 --- a/apps/user_ldap/l10n/bn_BD.php +++ b/apps/user_ldap/l10n/bn_BD.php @@ -18,7 +18,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "কোন স্থান ধারক ব্যতীত, উদাহরণঃ\"objectClass=posixGroup\"।", "Port" => "পোর্ট", "Use TLS" => "TLS ব্যবহার কর", -"Do not use it for SSL connections, it will fail." => "SSL সংযোগের জন্য এটি ব্যবহার করবেন না, তাহলে ব্যর্থ হবেনই।", "Case insensitve LDAP server (Windows)" => "বর্ণ অসংবেদী LDAP সার্ভার (উইন্ডোজ)", "Turn off SSL certificate validation." => "SSL সনদপত্র যাচাইকরণ বন্ধ রাক।", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "শুধুমাত্র যদি এই বিকল্পটি ব্যবহার করেই সংযোগ কার্যকরী হয় তবে আপনার ownCloud সার্ভারে LDAP সার্ভারের SSL সনদপত্রটি আমদানি করুন।", diff --git a/apps/user_ldap/l10n/ca.php b/apps/user_ldap/l10n/ca.php index 5cf03b6787b..e4f27e25a7f 100644 --- a/apps/user_ldap/l10n/ca.php +++ b/apps/user_ldap/l10n/ca.php @@ -43,7 +43,7 @@ "Disable Main Server" => "Desactiva el servidor principal", "When switched on, ownCloud will only connect to the replica server." => "Quan està connectat, ownCloud només es connecta al servidor de la rèplica.", "Use TLS" => "Usa TLS", -"Do not use it for SSL connections, it will fail." => "No ho useu en connexions SSL, fallarà.", +"Do not use it additionally for LDAPS connections, it will fail." => "No ho useu adicionalment per a conexions LDAPS, fallarà.", "Case insensitve LDAP server (Windows)" => "Servidor LDAP sense distinció entre majúscules i minúscules (Windows)", "Turn off SSL certificate validation." => "Desactiva la validació de certificat SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Si la connexió només funciona amb aquesta opció, importeu el certificat SSL del servidor LDAP en el vostre servidor ownCloud.", diff --git a/apps/user_ldap/l10n/cs_CZ.php b/apps/user_ldap/l10n/cs_CZ.php index 0aace1f7410..4c74f195cf4 100644 --- a/apps/user_ldap/l10n/cs_CZ.php +++ b/apps/user_ldap/l10n/cs_CZ.php @@ -43,7 +43,7 @@ "Disable Main Server" => "Zakázat hlavní serveru", "When switched on, ownCloud will only connect to the replica server." => "Při zapnutí se ownCloud připojí pouze k záložnímu serveru", "Use TLS" => "Použít TLS", -"Do not use it for SSL connections, it will fail." => "Nepoužívejte pro připojení pomocí SSL, připojení selže.", +"Do not use it additionally for LDAPS connections, it will fail." => "Nepoužívejte pro spojení LDAP, selže.", "Case insensitve LDAP server (Windows)" => "LDAP server nerozlišující velikost znaků (Windows)", "Turn off SSL certificate validation." => "Vypnout ověřování SSL certifikátu.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Pokud připojení pracuje pouze s touto možností, tak importujte SSL certifikát SSL serveru do Vašeho serveru ownCloud", diff --git a/apps/user_ldap/l10n/da.php b/apps/user_ldap/l10n/da.php index dd7fb8a1a0c..9329c4e8a24 100644 --- a/apps/user_ldap/l10n/da.php +++ b/apps/user_ldap/l10n/da.php @@ -14,7 +14,6 @@ "Defines the filter to apply, when retrieving groups." => "Definere filteret der bruges når der indlæses grupper.", "Port" => "Port", "Use TLS" => "Brug TLS", -"Do not use it for SSL connections, it will fail." => "Brug ikke til SSL forbindelser, da den vil fejle.", "Turn off SSL certificate validation." => "Deaktiver SSL certifikat validering", "Not recommended, use for testing only." => "Anbefales ikke, brug kun for at teste.", "User Display Name Field" => "User Display Name Field", diff --git a/apps/user_ldap/l10n/de.php b/apps/user_ldap/l10n/de.php index df680465c98..618e7a32457 100644 --- a/apps/user_ldap/l10n/de.php +++ b/apps/user_ldap/l10n/de.php @@ -23,7 +23,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "ohne Platzhalter, z.B.: \"objectClass=posixGroup\"", "Port" => "Port", "Use TLS" => "Nutze TLS", -"Do not use it for SSL connections, it will fail." => "Verwende dies nicht für SSL-Verbindungen, es wird fehlschlagen.", "Case insensitve LDAP server (Windows)" => "LDAP-Server (Windows: Groß- und Kleinschreibung bleibt unbeachtet)", "Turn off SSL certificate validation." => "Schalte die SSL-Zertifikatsprüfung aus.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Falls die Verbindung es erfordert, muss das SSL-Zertifikat des LDAP-Server importiert werden.", diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php index 1b47cfec2a6..7d3847f8a89 100644 --- a/apps/user_ldap/l10n/de_DE.php +++ b/apps/user_ldap/l10n/de_DE.php @@ -43,7 +43,6 @@ "Disable Main Server" => "Hauptserver deaktivieren", "When switched on, ownCloud will only connect to the replica server." => "Wenn eingeschaltet wird sich ownCloud nur mit dem Replilat-Server verbinden.", "Use TLS" => "Nutze TLS", -"Do not use it for SSL connections, it will fail." => "Verwenden Sie dies nicht für SSL-Verbindungen, es wird fehlschlagen.", "Case insensitve LDAP server (Windows)" => "LDAP-Server (Windows: Groß- und Kleinschreibung bleibt unbeachtet)", "Turn off SSL certificate validation." => "Schalten Sie die SSL-Zertifikatsprüfung aus.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Falls die Verbindung es erfordert, muss das SSL-Zertifikat des LDAP-Server importiert werden.", diff --git a/apps/user_ldap/l10n/el.php b/apps/user_ldap/l10n/el.php index 3951c94dfa7..7c0940dc09c 100644 --- a/apps/user_ldap/l10n/el.php +++ b/apps/user_ldap/l10n/el.php @@ -20,7 +20,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "χωρίς κάποια μεταβλητή, π.χ. \"objectClass=ΟμάδαPosix\".", "Port" => "Θύρα", "Use TLS" => "Χρήση TLS", -"Do not use it for SSL connections, it will fail." => "Μην χρησιμοποιείτε για συνδέσεις SSL, θα αποτύχει.", "Case insensitve LDAP server (Windows)" => "LDAP server (Windows) με διάκριση πεζών-ΚΕΦΑΛΑΙΩΝ", "Turn off SSL certificate validation." => "Απενεργοποίηση επικύρωσης πιστοποιητικού SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Εάν η σύνδεση δουλεύει μόνο με αυτή την επιλογή, εισάγετε το LDAP SSL πιστοποιητικό του διακομιστή στον ownCloud server σας.", diff --git a/apps/user_ldap/l10n/eo.php b/apps/user_ldap/l10n/eo.php index 2a2b70603c5..3ffcbddb3e3 100644 --- a/apps/user_ldap/l10n/eo.php +++ b/apps/user_ldap/l10n/eo.php @@ -17,7 +17,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "sen ajna referencilo, ekz.: \"objectClass=posixGroup\".", "Port" => "Pordo", "Use TLS" => "Uzi TLS-on", -"Do not use it for SSL connections, it will fail." => "Ne uzu ĝin por SSL-konektoj, ĝi malsukcesos.", "Case insensitve LDAP server (Windows)" => "LDAP-servilo blinda je litergrandeco (Vindozo)", "Turn off SSL certificate validation." => "Malkapabligi validkontrolon de SSL-atestiloj.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se la konekto nur funkcias kun ĉi tiu malnepro, enportu la SSL-atestilo de la LDAP-servilo en via ownCloud-servilo.", diff --git a/apps/user_ldap/l10n/es.php b/apps/user_ldap/l10n/es.php index 3740d13e224..c0a444c0c7d 100644 --- a/apps/user_ldap/l10n/es.php +++ b/apps/user_ldap/l10n/es.php @@ -43,7 +43,7 @@ "Disable Main Server" => "Deshabilitar servidor principal", "When switched on, ownCloud will only connect to the replica server." => "Cuando se inicie, ownCloud unicamente estara conectado al servidor replica", "Use TLS" => "Usar TLS", -"Do not use it for SSL connections, it will fail." => "No usarlo para SSL, habrá error.", +"Do not use it additionally for LDAPS connections, it will fail." => "No usar adicionalmente para conecciones LDAPS, estas fallaran", "Case insensitve LDAP server (Windows)" => "Servidor de LDAP sensible a mayúsculas/minúsculas (Windows)", "Turn off SSL certificate validation." => "Apagar la validación por certificado SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Si la conexión sólo funciona con esta opción, importe el certificado SSL del servidor LDAP en su servidor ownCloud.", diff --git a/apps/user_ldap/l10n/es_AR.php b/apps/user_ldap/l10n/es_AR.php index dce2321e6b1..a87444a270c 100644 --- a/apps/user_ldap/l10n/es_AR.php +++ b/apps/user_ldap/l10n/es_AR.php @@ -1,7 +1,17 @@ <?php $TRANSLATIONS = array( +"Failed to delete the server configuration" => "Fallo al borrar la configuración del servidor", +"The configuration is valid and the connection could be established!" => "La configuración es valida y la conexión pudo ser establecida.", "Deletion failed" => "Error al borrar", +"Keep settings?" => "¿Mantener preferencias?", +"Cannot add server configuration" => "No se pudo añadir la configuración del servidor", +"Connection test succeeded" => "El este de conexión ha sido completado satisfactoriamente", +"Connection test failed" => "Falló es test de conexión", +"Do you really want to delete the current Server Configuration?" => "¿Realmente desea borrar la configuración actual del servidor?", +"Confirm Deletion" => "Confirmar borrado", "<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Advertencia:</b> Los Apps user_ldap y user_webdavauth son incompatibles. Puede que experimente un comportamiento inesperado. Pregunte al administrador del sistema para desactivar uno de ellos.", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Atención:</b> El módulo PHP LDAP no está instalado, este elemento no va a funcionar. Por favor, pedile al administrador que lo instale.", +"Server configuration" => "Configuración del Servidor", +"Add Server Configuration" => "Añadir Configuración del Servidor", "Host" => "Servidor", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Podés omitir el protocolo, excepto si SSL es requerido. En ese caso, empezá con ldaps://", "Base DN" => "DN base", @@ -20,14 +30,17 @@ "Group Filter" => "Filtro de grupo", "Defines the filter to apply, when retrieving groups." => "Define el filtro a aplicar cuando se obtienen grupos.", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "Sin ninguna plantilla, p. ej.: \"objectClass=posixGroup\".", +"Connection Settings" => "Configuración de Conección", +"Configuration Active" => "Configuración activa", "Port" => "Puerto", +"Disable Main Server" => "Deshabilitar el Servidor Principal", "Use TLS" => "Usar TLS", -"Do not use it for SSL connections, it will fail." => "No usarlo para SSL, dará error.", "Case insensitve LDAP server (Windows)" => "Servidor de LDAP sensible a mayúsculas/minúsculas (Windows)", "Turn off SSL certificate validation." => "Desactivar la validación por certificado SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Si la conexión sólo funciona con esta opción, importá el certificado SSL del servidor LDAP en tu servidor ownCloud.", "Not recommended, use for testing only." => "No recomendado, sólo para pruebas.", "in seconds. A change empties the cache." => "en segundos. Cambiarlo vacía la cache.", +"Directory Settings" => "Configuración de Directorio", "User Display Name Field" => "Campo de nombre de usuario a mostrar", "The LDAP attribute to use to generate the user`s ownCloud name." => "El atributo LDAP a usar para generar el nombre de usuario de ownCloud.", "Base User Tree" => "Árbol base de usuario", @@ -37,6 +50,7 @@ "Base Group Tree" => "Árbol base de grupo", "One Group Base DN per line" => "Una DN base de grupo por línea", "Group-Member association" => "Asociación Grupo-Miembro", +"Special Attributes" => "Atributos Especiales", "in bytes" => "en bytes", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Vacío para el nombre de usuario (por defecto). En otro caso, especificá un atributo LDAP/AD.", "Help" => "Ayuda" diff --git a/apps/user_ldap/l10n/et_EE.php b/apps/user_ldap/l10n/et_EE.php index ba03a8a8093..91eb38c7c5f 100644 --- a/apps/user_ldap/l10n/et_EE.php +++ b/apps/user_ldap/l10n/et_EE.php @@ -19,7 +19,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "ilma ühegi kohatäitjata, nt. \"objectClass=posixGroup\".", "Port" => "Port", "Use TLS" => "Kasutaja TLS", -"Do not use it for SSL connections, it will fail." => "Ära kasuta seda SSL ühenduse jaoks, see ei toimi.", "Case insensitve LDAP server (Windows)" => "Mittetõstutundlik LDAP server (Windows)", "Turn off SSL certificate validation." => "Lülita SSL sertifikaadi kontrollimine välja.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Kui ühendus toimib ainult selle valikuga, siis impordi LDAP serveri SSL sertifikaat oma ownCloud serverisse.", diff --git a/apps/user_ldap/l10n/eu.php b/apps/user_ldap/l10n/eu.php index 2aad2363ce9..97c23f86480 100644 --- a/apps/user_ldap/l10n/eu.php +++ b/apps/user_ldap/l10n/eu.php @@ -22,7 +22,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "txantiloirik gabe, adb. \"objectClass=posixGroup\".", "Port" => "Portua", "Use TLS" => "Erabili TLS", -"Do not use it for SSL connections, it will fail." => "Ez erabili SSL konexioetan, huts egingo du.", "Case insensitve LDAP server (Windows)" => "Maiuskulak eta minuskulak ezberditzen ez dituen LDAP zerbitzaria (windows)", "Turn off SSL certificate validation." => "Ezgaitu SSL ziurtagirien egiaztapena.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Konexioa aukera hau ezinbestekoa badu, inportatu LDAP zerbitzariaren SSL ziurtagiria zure ownCloud zerbitzarian.", diff --git a/apps/user_ldap/l10n/fi_FI.php b/apps/user_ldap/l10n/fi_FI.php index 4f8fd3f2d17..1c2a92f844a 100644 --- a/apps/user_ldap/l10n/fi_FI.php +++ b/apps/user_ldap/l10n/fi_FI.php @@ -19,7 +19,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "ilman paikanvaraustermiä, ts. \"objectClass=posixGroup\".", "Port" => "Portti", "Use TLS" => "Käytä TLS:ää", -"Do not use it for SSL connections, it will fail." => "Älä käytä SSL-yhteyttä varten, se epäonnistuu. ", "Case insensitve LDAP server (Windows)" => "Kirjainkoosta piittamaton LDAP-palvelin (Windows)", "Turn off SSL certificate validation." => "Poista käytöstä SSL-varmenteen vahvistus", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Jos yhteys toimii vain tällä valinnalla, siirrä LDAP-palvelimen SSL-varmenne ownCloud-palvelimellesi.", diff --git a/apps/user_ldap/l10n/fr.php b/apps/user_ldap/l10n/fr.php index 9bb350ea23c..abe13635698 100644 --- a/apps/user_ldap/l10n/fr.php +++ b/apps/user_ldap/l10n/fr.php @@ -43,7 +43,7 @@ "Disable Main Server" => "Désactiver le serveur principal", "When switched on, ownCloud will only connect to the replica server." => "Lorsqu'activé, ownCloud ne se connectera qu'au serveur répliqué.", "Use TLS" => "Utiliser TLS", -"Do not use it for SSL connections, it will fail." => "Ne pas utiliser pour les connexions SSL, car cela échouera.", +"Do not use it additionally for LDAPS connections, it will fail." => "À ne pas utiliser pour les connexions LDAPS (cela échouera).", "Case insensitve LDAP server (Windows)" => "Serveur LDAP insensible à la casse (Windows)", "Turn off SSL certificate validation." => "Désactiver la validation du certificat SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Si la connexion ne fonctionne qu'avec cette option, importez le certificat SSL du serveur LDAP dans le serveur ownCloud.", diff --git a/apps/user_ldap/l10n/gl.php b/apps/user_ldap/l10n/gl.php index a2531a40a83..36c1f7af114 100644 --- a/apps/user_ldap/l10n/gl.php +++ b/apps/user_ldap/l10n/gl.php @@ -20,7 +20,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "sen ningunha marca de posición, como p.ex «objectClass=grupoPosix».", "Port" => "Porto", "Use TLS" => "Usar TLS", -"Do not use it for SSL connections, it will fail." => "Non empregalo para conexións SSL: fallará.", "Case insensitve LDAP server (Windows)" => "Servidor LDAP que non distingue entre maiúsculas e minúsculas (Windows)", "Turn off SSL certificate validation." => "Desactiva a validación do certificado SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se a conexión só funciona con esta opción importa o certificado SSL do servidor LDAP no seu servidor ownCloud.", diff --git a/apps/user_ldap/l10n/hu_HU.php b/apps/user_ldap/l10n/hu_HU.php index 64de16fa65f..48a0823a583 100644 --- a/apps/user_ldap/l10n/hu_HU.php +++ b/apps/user_ldap/l10n/hu_HU.php @@ -22,7 +22,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "itt ne használjunk változót, pl. \"objectClass=posixGroup\".", "Port" => "Port", "Use TLS" => "Használjunk TLS-t", -"Do not use it for SSL connections, it will fail." => "Ne használjuk SSL-kapcsolat esetén, mert nem fog működni!", "Case insensitve LDAP server (Windows)" => "Az LDAP-kiszolgáló nem tesz különbséget a kis- és nagybetűk között (Windows)", "Turn off SSL certificate validation." => "Ne ellenőrizzük az SSL-tanúsítvány érvényességét", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Ha a kapcsolat csak ezzel a beállítással működik, akkor importálja az LDAP-kiszolgáló SSL tanúsítványát az ownCloud kiszolgálóra!", diff --git a/apps/user_ldap/l10n/id.php b/apps/user_ldap/l10n/id.php index 33e8cc70e93..c07892386d6 100644 --- a/apps/user_ldap/l10n/id.php +++ b/apps/user_ldap/l10n/id.php @@ -6,7 +6,6 @@ "Group Filter" => "saringan grup", "Port" => "port", "Use TLS" => "gunakan TLS", -"Do not use it for SSL connections, it will fail." => "jangan gunakan untuk koneksi SSL, itu akan gagal.", "Turn off SSL certificate validation." => "matikan validasi sertivikat SSL", "Not recommended, use for testing only." => "tidak disarankan, gunakan hanya untuk pengujian.", "in seconds. A change empties the cache." => "dalam detik. perubahan mengosongkan cache", diff --git a/apps/user_ldap/l10n/it.php b/apps/user_ldap/l10n/it.php index 0220aa958ce..594529190d9 100644 --- a/apps/user_ldap/l10n/it.php +++ b/apps/user_ldap/l10n/it.php @@ -43,7 +43,7 @@ "Disable Main Server" => "Disabilita server principale", "When switched on, ownCloud will only connect to the replica server." => "Se abilitata, ownCloud si collegherà solo al server di replica.", "Use TLS" => "Usa TLS", -"Do not use it for SSL connections, it will fail." => "Non utilizzare per le connessioni SSL, fallirà.", +"Do not use it additionally for LDAPS connections, it will fail." => "Da non utilizzare per le connessioni LDAPS, non funzionerà.", "Case insensitve LDAP server (Windows)" => "Case insensitve LDAP server (Windows)", "Turn off SSL certificate validation." => "Disattiva il controllo del certificato SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se la connessione funziona esclusivamente con questa opzione, importa il certificato SSL del server LDAP nel tuo server ownCloud.", diff --git a/apps/user_ldap/l10n/ja_JP.php b/apps/user_ldap/l10n/ja_JP.php index 7706357cbf3..11ad6cc7a37 100644 --- a/apps/user_ldap/l10n/ja_JP.php +++ b/apps/user_ldap/l10n/ja_JP.php @@ -43,7 +43,7 @@ "Disable Main Server" => "メインサーバを無効にする", "When switched on, ownCloud will only connect to the replica server." => "有効にすると、ownCloudはレプリカサーバにのみ接続します。", "Use TLS" => "TLSを利用", -"Do not use it for SSL connections, it will fail." => "SSL接続に利用しないでください、失敗します。", +"Do not use it additionally for LDAPS connections, it will fail." => "LDAPS接続のために追加でそれを利用しないで下さい。失敗します。", "Case insensitve LDAP server (Windows)" => "大文字/小文字を区別しないLDAPサーバ(Windows)", "Turn off SSL certificate validation." => "SSL証明書の確認を無効にする。", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "接続がこのオプションでのみ動作する場合は、LDAPサーバのSSL証明書をownCloudサーバにインポートしてください。", diff --git a/apps/user_ldap/l10n/ko.php b/apps/user_ldap/l10n/ko.php index 9ff8ff99d08..419e2d0a690 100644 --- a/apps/user_ldap/l10n/ko.php +++ b/apps/user_ldap/l10n/ko.php @@ -22,7 +22,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "자리 비움자를 사용할 수 없습니다. 예제: \"objectClass=posixGroup\"", "Port" => "포트", "Use TLS" => "TLS 사용", -"Do not use it for SSL connections, it will fail." => "SSL 연결 시 사용하는 경우 연결되지 않습니다.", "Case insensitve LDAP server (Windows)" => "서버에서 대소문자를 구분하지 않음 (Windows)", "Turn off SSL certificate validation." => "SSL 인증서 유효성 검사를 해제합니다.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "이 옵션을 사용해야 연결할 수 있는 경우에는 LDAP 서버의 SSL 인증서를 ownCloud로 가져올 수 있습니다.", diff --git a/apps/user_ldap/l10n/lv.php b/apps/user_ldap/l10n/lv.php index 48cee737c74..34e9196b8d9 100644 --- a/apps/user_ldap/l10n/lv.php +++ b/apps/user_ldap/l10n/lv.php @@ -43,7 +43,7 @@ "Disable Main Server" => "Deaktivēt galveno serveri", "When switched on, ownCloud will only connect to the replica server." => "Kad ieslēgts, ownCloud savienosies tikai ar kopijas serveri.", "Use TLS" => "Lietot TLS", -"Do not use it for SSL connections, it will fail." => "Neizmanto to SSL savienojumiem, tas neizdosies.", +"Do not use it additionally for LDAPS connections, it will fail." => "Neizmanto papildu LDAPS savienojumus! Tas nestrādās.", "Case insensitve LDAP server (Windows)" => "Reģistrnejutīgs LDAP serveris (Windows)", "Turn off SSL certificate validation." => "Izslēgt SSL sertifikātu validēšanu.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Ja savienojums darbojas ar šo opciju, importē LDAP serveru SSL sertifikātu savā ownCloud serverī.", diff --git a/apps/user_ldap/l10n/nb_NO.php b/apps/user_ldap/l10n/nb_NO.php index 295166b0a50..8aab71354b0 100644 --- a/apps/user_ldap/l10n/nb_NO.php +++ b/apps/user_ldap/l10n/nb_NO.php @@ -4,7 +4,6 @@ "Group Filter" => "Gruppefilter", "Port" => "Port", "Use TLS" => "Bruk TLS", -"Do not use it for SSL connections, it will fail." => "Ikke bruk for SSL tilkoblinger, dette vil ikke fungere.", "Not recommended, use for testing only." => "Ikke anbefalt, bruk kun for testing", "in seconds. A change empties the cache." => "i sekunder. En endring tømmer bufferen.", "in bytes" => "i bytes", diff --git a/apps/user_ldap/l10n/nl.php b/apps/user_ldap/l10n/nl.php index cc5e85fc30b..6879a4c4b94 100644 --- a/apps/user_ldap/l10n/nl.php +++ b/apps/user_ldap/l10n/nl.php @@ -1,6 +1,7 @@ <?php $TRANSLATIONS = array( "Failed to delete the server configuration" => "Verwijderen serverconfiguratie mislukt", "The configuration is valid and the connection could be established!" => "De configuratie is geldig en de verbinding is geslaagd!", +"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "De configuratie is geldig, maar Bind mislukte. Controleer de serverinstellingen en inloggegevens.", "The configuration is invalid. Please look in the ownCloud log for further details." => "De configuratie is ongeldig. Controleer de ownCloud log voor meer details.", "Deletion failed" => "Verwijderen mislukt", "Take over settings from recent server configuration?" => "Overnemen instellingen van de recente serverconfiguratie?", @@ -32,29 +33,35 @@ "Group Filter" => "Groep Filter", "Defines the filter to apply, when retrieving groups." => "Definiëerd de toe te passen filter voor het ophalen van groepen.", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "zonder een placeholder, bijv. \"objectClass=posixGroup\"", +"Connection Settings" => "Verbindingsinstellingen", "Configuration Active" => "Configuratie actief", +"When unchecked, this configuration will be skipped." => "Als dit niet is ingeschakeld wordt deze configuratie overgeslagen.", "Port" => "Poort", "Backup (Replica) Host" => "Backup (Replica) Host", +"Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Opgeven optionele backup host. Het moet een replica van de hoofd LDAP/AD server.", "Backup (Replica) Port" => "Backup (Replica) Poort", "Disable Main Server" => "Deactiveren hoofdserver", "When switched on, ownCloud will only connect to the replica server." => "Wanneer ingeschakeld, zal ownCloud allen verbinden met de replicaserver.", "Use TLS" => "Gebruik TLS", -"Do not use it for SSL connections, it will fail." => "Gebruik niet voor SSL connecties, deze mislukken.", "Case insensitve LDAP server (Windows)" => "Niet-hoofdlettergevoelige LDAP server (Windows)", "Turn off SSL certificate validation." => "Schakel SSL certificaat validatie uit.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Als de connectie alleen werkt met deze optie, importeer dan het LDAP server SSL certificaat naar je ownCloud server.", "Not recommended, use for testing only." => "Niet aangeraden, gebruik alleen voor test doeleinden.", "in seconds. A change empties the cache." => "in seconden. Een verandering maakt de cache leeg.", +"Directory Settings" => "Mapinstellingen", "User Display Name Field" => "Gebruikers Schermnaam Veld", "The LDAP attribute to use to generate the user`s ownCloud name." => "Het te gebruiken LDAP attribuut voor het genereren van de ownCloud naam voor de gebruikers.", "Base User Tree" => "Basis Gebruikers Structuur", "One User Base DN per line" => "Een User Base DN per regel", +"User Search Attributes" => "Attributen voor gebruikerszoekopdrachten", "Optional; one attribute per line" => "Optioneel; één attribuut per regel", "Group Display Name Field" => "Groep Schermnaam Veld", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Het te gebruiken LDAP attribuut voor het genereren van de ownCloud naam voor de groepen.", "Base Group Tree" => "Basis Groupen Structuur", "One Group Base DN per line" => "Een Group Base DN per regel", +"Group Search Attributes" => "Attributen voor groepszoekopdrachten", "Group-Member association" => "Groepslid associatie", +"Special Attributes" => "Speciale attributen", "in bytes" => "in bytes", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Laat leeg voor de gebruikersnaam (standaard). Of, specificeer een LDAP/AD attribuut.", "Help" => "Help" diff --git a/apps/user_ldap/l10n/pl.php b/apps/user_ldap/l10n/pl.php index 83a8d1615ae..ef3f9140ef7 100644 --- a/apps/user_ldap/l10n/pl.php +++ b/apps/user_ldap/l10n/pl.php @@ -20,7 +20,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "bez żadnych symboli zastępczych np. \"objectClass=posixGroup\".", "Port" => "Port", "Use TLS" => "Użyj TLS", -"Do not use it for SSL connections, it will fail." => "Nie używaj SSL dla połączeń, jeśli się nie powiedzie.", "Case insensitve LDAP server (Windows)" => "Wielkość liter serwera LDAP (Windows)", "Turn off SSL certificate validation." => "Wyłączyć sprawdzanie poprawności certyfikatu SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Jeśli połączenie działa tylko z tą opcją, zaimportuj certyfikat SSL serwera LDAP w serwerze ownCloud.", diff --git a/apps/user_ldap/l10n/pt_BR.php b/apps/user_ldap/l10n/pt_BR.php index 79e56eeb652..514ceb7027e 100644 --- a/apps/user_ldap/l10n/pt_BR.php +++ b/apps/user_ldap/l10n/pt_BR.php @@ -19,7 +19,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "sem nenhum espaço reservado, ex. \"objectClass=posixGroup\"", "Port" => "Porta", "Use TLS" => "Usar TLS", -"Do not use it for SSL connections, it will fail." => "Não use-o para conexões SSL, pois falhará.", "Case insensitve LDAP server (Windows)" => "Servidor LDAP sensível à caixa alta (Windows)", "Turn off SSL certificate validation." => "Desligar validação de certificado SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se a conexão só funciona com essa opção, importe o certificado SSL do servidor LDAP no seu servidor ownCloud.", diff --git a/apps/user_ldap/l10n/pt_PT.php b/apps/user_ldap/l10n/pt_PT.php index 21735b497c6..058e7ba2532 100644 --- a/apps/user_ldap/l10n/pt_PT.php +++ b/apps/user_ldap/l10n/pt_PT.php @@ -33,6 +33,7 @@ "Group Filter" => "Filtrar por grupo", "Defines the filter to apply, when retrieving groups." => "Defina o filtro a aplicar, ao recuperar grupos.", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "Sem nenhuma variável. Exemplo: \"objectClass=posixGroup\".", +"Connection Settings" => "Definições de ligação", "Configuration Active" => "Configuração activa", "When unchecked, this configuration will be skipped." => "Se não estiver marcada, esta definição não será tida em conta.", "Port" => "Porto", @@ -42,12 +43,12 @@ "Disable Main Server" => "Desactivar servidor principal", "When switched on, ownCloud will only connect to the replica server." => "Se estiver ligado, o ownCloud vai somente ligar-se a este servidor de réplicas.", "Use TLS" => "Usar TLS", -"Do not use it for SSL connections, it will fail." => "Não use para ligações SSL, irá falhar.", "Case insensitve LDAP server (Windows)" => "Servidor LDAP (Windows) não sensível a maiúsculas.", "Turn off SSL certificate validation." => "Desligar a validação de certificado SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Se a ligação apenas funcionar com está opção, importe o certificado SSL do servidor LDAP para o seu servidor do ownCloud.", "Not recommended, use for testing only." => "Não recomendado, utilizado apenas para testes!", "in seconds. A change empties the cache." => "em segundos. Uma alteração esvazia a cache.", +"Directory Settings" => "Definições de directorias", "User Display Name Field" => "Mostrador do nome de utilizador.", "The LDAP attribute to use to generate the user`s ownCloud name." => "Atributo LDAP para gerar o nome de utilizador do ownCloud.", "Base User Tree" => "Base da árvore de utilizadores.", @@ -60,6 +61,7 @@ "One Group Base DN per line" => "Uma base de grupo DN por linha", "Group Search Attributes" => "Atributos de pesquisa de grupo", "Group-Member association" => "Associar utilizador ao grupo.", +"Special Attributes" => "Atributos especiais", "in bytes" => "em bytes", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Deixe vazio para nome de utilizador (padrão). De outro modo, especifique um atributo LDAP/AD.", "Help" => "Ajuda" diff --git a/apps/user_ldap/l10n/ro.php b/apps/user_ldap/l10n/ro.php index 3e7e7500429..8f55a35b491 100644 --- a/apps/user_ldap/l10n/ro.php +++ b/apps/user_ldap/l10n/ro.php @@ -22,7 +22,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "fără substituenți, d.e. \"objectClass=posixGroup\"", "Port" => "Portul", "Use TLS" => "Utilizează TLS", -"Do not use it for SSL connections, it will fail." => "A nu se utiliza pentru conexiuni SSL, va eșua.", "Case insensitve LDAP server (Windows)" => "Server LDAP insensibil la majuscule (Windows)", "Turn off SSL certificate validation." => "Oprește validarea certificatelor SSL ", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Dacă conexiunea lucrează doar cu această opțiune, importează certificatul SSL al serverului LDAP în serverul ownCloud.", diff --git a/apps/user_ldap/l10n/ru.php b/apps/user_ldap/l10n/ru.php index 45f6c171bf3..4c4b9708667 100644 --- a/apps/user_ldap/l10n/ru.php +++ b/apps/user_ldap/l10n/ru.php @@ -1,6 +1,18 @@ <?php $TRANSLATIONS = array( +"Failed to delete the server configuration" => "Не удалось удалить конфигурацию сервера", +"The configuration is valid and the connection could be established!" => "Конфигурация правильная и подключение может быть установлено!", +"The configuration is invalid. Please look in the ownCloud log for further details." => "Конфигурация не верна. Пожалуйста, посмотрите в журнале ownCloud детали.", "Deletion failed" => "Удаление не удалось", +"Take over settings from recent server configuration?" => "Принять настройки из последней конфигурации сервера?", +"Keep settings?" => "Сохранить настройки?", +"Cannot add server configuration" => "Не получилось добавить конфигурацию сервера", +"Connection test succeeded" => "Проверка соединения удалась", +"Connection test failed" => "Проверка соединения не удалась", +"Do you really want to delete the current Server Configuration?" => "Вы действительно хотите удалить существующую конфигурацию сервера?", +"Confirm Deletion" => "Подтверждение удаления", "<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Внимание:</b>Приложения user_ldap и user_webdavauth несовместимы. Вы можете столкнуться с неожиданным поведением. Пожалуйста, обратитесь к системному администратору, чтобы отключить одно из них.", +"Server configuration" => "Конфигурация сервера", +"Add Server Configuration" => "Добавить конфигурацию сервера", "Host" => "Сервер", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Можно опустить протокол, за исключением того, когда вам требуется SSL. Тогда начните с ldaps :/ /", "Base DN" => "Базовый DN", @@ -18,21 +30,27 @@ "Group Filter" => "Фильтр группы", "Defines the filter to apply, when retrieving groups." => "Определяет фильтр для применения при получении группы.", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "без заполнения, например \"objectClass=posixGroup\".", +"Connection Settings" => "Настройки подключения", +"Configuration Active" => "Конфигурация активна", "Port" => "Порт", +"Disable Main Server" => "Отключение главного сервера", "Use TLS" => "Использовать TLS", -"Do not use it for SSL connections, it will fail." => "Не используйте для соединений SSL", "Case insensitve LDAP server (Windows)" => "Нечувствительный к регистру сервер LDAP (Windows)", "Turn off SSL certificate validation." => "Отключить проверку сертификата SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Если соединение работает только с этой опцией, импортируйте на ваш сервер ownCloud сертификат SSL сервера LDAP.", "Not recommended, use for testing only." => "Не рекомендуется, используйте только для тестирования.", "in seconds. A change empties the cache." => "в секундах. Изменение очистит кэш.", +"Directory Settings" => "Настройки каталога", "User Display Name Field" => "Поле отображаемого имени пользователя", "The LDAP attribute to use to generate the user`s ownCloud name." => "Атрибут LDAP для генерации имени пользователя ownCloud.", "Base User Tree" => "База пользовательского дерева", +"User Search Attributes" => "Поисковые атрибуты пользователя", +"Optional; one attribute per line" => "Опционально; один атрибут на линию", "Group Display Name Field" => "Поле отображаемого имени группы", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Атрибут LDAP для генерации имени группы ownCloud.", "Base Group Tree" => "База группового дерева", "Group-Member association" => "Ассоциация Группа-Участник", +"Special Attributes" => "Специальные атрибуты", "in bytes" => "в байтах", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Оставьте имя пользователя пустым (по умолчанию). Иначе укажите атрибут LDAP/AD.", "Help" => "Помощь" diff --git a/apps/user_ldap/l10n/ru_RU.php b/apps/user_ldap/l10n/ru_RU.php index f62d2cd4eaf..a4ed503b1d1 100644 --- a/apps/user_ldap/l10n/ru_RU.php +++ b/apps/user_ldap/l10n/ru_RU.php @@ -22,7 +22,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "без каких-либо заполнителей, например, \"objectClass=posixGroup\".", "Port" => "Порт", "Use TLS" => "Использовать TLS", -"Do not use it for SSL connections, it will fail." => "Не используйте это SSL-соединений, это не будет выполнено.", "Case insensitve LDAP server (Windows)" => "Нечувствительный к регистру LDAP-сервер (Windows)", "Turn off SSL certificate validation." => "Выключить проверку сертификата SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Если соединение работает только с этой опцией, импортируйте SSL-сертификат LDAP сервера в ваш ownCloud сервер.", diff --git a/apps/user_ldap/l10n/sk_SK.php b/apps/user_ldap/l10n/sk_SK.php index 77cb039c7ed..af8ff0307a7 100644 --- a/apps/user_ldap/l10n/sk_SK.php +++ b/apps/user_ldap/l10n/sk_SK.php @@ -43,7 +43,6 @@ "Disable Main Server" => "Zakázať hlavný server", "When switched on, ownCloud will only connect to the replica server." => "Pri zapnutí sa ownCloud pripojí len k záložnému serveru.", "Use TLS" => "Použi TLS", -"Do not use it for SSL connections, it will fail." => "Nepoužívajte pre pripojenie SSL, pripojenie zlyhá.", "Case insensitve LDAP server (Windows)" => "LDAP server nerozlišuje veľkosť znakov (Windows)", "Turn off SSL certificate validation." => "Vypnúť overovanie SSL certifikátu.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Ak pripojenie pracuje len s touto možnosťou, tak importujte SSL certifikát LDAP serveru do vášho servera ownCloud.", diff --git a/apps/user_ldap/l10n/sl.php b/apps/user_ldap/l10n/sl.php index 133d7ee9119..e1734a90780 100644 --- a/apps/user_ldap/l10n/sl.php +++ b/apps/user_ldap/l10n/sl.php @@ -20,7 +20,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "Brez katerekoli vsebnika, npr. \"objectClass=posixGroup\".", "Port" => "Vrata", "Use TLS" => "Uporabi TLS", -"Do not use it for SSL connections, it will fail." => "Uporaba SSL za povezave bo spodletela.", "Case insensitve LDAP server (Windows)" => "Strežnik LDAP ne upošteva velikosti črk (Windows)", "Turn off SSL certificate validation." => "Onemogoči potrditev veljavnosti potrdila SSL.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "V primeru, da povezava deluje le s to možnostjo, uvozite potrdilo SSL iz strežnika LDAP na vaš strežnik ownCloud.", diff --git a/apps/user_ldap/l10n/sr.php b/apps/user_ldap/l10n/sr.php index 418d94afca5..52569a08ef8 100644 --- a/apps/user_ldap/l10n/sr.php +++ b/apps/user_ldap/l10n/sr.php @@ -18,7 +18,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "без икаквог чувара места, нпр. „objectClass=posixGroup“.", "Port" => "Порт", "Use TLS" => "Користи TLS", -"Do not use it for SSL connections, it will fail." => "Не користите за SSL везе јер неће радити.", "Case insensitve LDAP server (Windows)" => "LDAP сервер осетљив на велика и мала слова (Windows)", "Turn off SSL certificate validation." => "Искључите потврду SSL сертификата.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Увезите SSL сертификат LDAP сервера у свој ownCloud ако веза ради само са овом опцијом.", diff --git a/apps/user_ldap/l10n/sv.php b/apps/user_ldap/l10n/sv.php index 509906934cb..c100fc94afe 100644 --- a/apps/user_ldap/l10n/sv.php +++ b/apps/user_ldap/l10n/sv.php @@ -43,7 +43,6 @@ "Disable Main Server" => "Inaktivera huvudserver", "When switched on, ownCloud will only connect to the replica server." => "När denna är påkopplad kommer ownCloud att koppla upp till replika-servern, endast.", "Use TLS" => "Använd TLS", -"Do not use it for SSL connections, it will fail." => "Använd inte för SSL-anslutningar, det kommer inte att fungera.", "Case insensitve LDAP server (Windows)" => "LDAP-servern är okänslig för gemener och versaler (Windows)", "Turn off SSL certificate validation." => "Stäng av verifiering av SSL-certifikat.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Om anslutningen bara fungerar med det här alternativet, importera LDAP-serverns SSL-certifikat i din ownCloud-server.", diff --git a/apps/user_ldap/l10n/ta_LK.php b/apps/user_ldap/l10n/ta_LK.php index d617f49700f..f6beb3c4863 100644 --- a/apps/user_ldap/l10n/ta_LK.php +++ b/apps/user_ldap/l10n/ta_LK.php @@ -9,7 +9,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "எந்த ஒதுக்கீடும் இல்லாமல், உதாரணம். \"objectClass=posixGroup\".", "Port" => "துறை ", "Use TLS" => "TLS ஐ பயன்படுத்தவும்", -"Do not use it for SSL connections, it will fail." => "SSL இணைப்பிற்கு பயன்படுத்தவேண்டாம், அது தோல்வியடையும்.", "Case insensitve LDAP server (Windows)" => "உணர்ச்சியான LDAP சேவையகம் (சாளரங்கள்)", "Turn off SSL certificate validation." => "SSL சான்றிதழின் செல்லுபடியை நிறுத்திவிடவும்", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "இந்த தெரிவுகளில் மட்டும் இணைப்பு வேலைசெய்தால், உங்களுடைய owncloud சேவையகத்திலிருந்து LDAP சேவையகத்தின் SSL சான்றிதழை இறக்குமதி செய்யவும்", diff --git a/apps/user_ldap/l10n/th_TH.php b/apps/user_ldap/l10n/th_TH.php index 07dbc835b31..802badb2f03 100644 --- a/apps/user_ldap/l10n/th_TH.php +++ b/apps/user_ldap/l10n/th_TH.php @@ -36,7 +36,6 @@ "Port" => "พอร์ต", "Disable Main Server" => "ปิดใช้งานเซิร์ฟเวอร์หลัก", "Use TLS" => "ใช้ TLS", -"Do not use it for SSL connections, it will fail." => "กรุณาอย่าใช้การเชื่อมต่อแบบ SSL การเชื่อมต่อจะเกิดการล้มเหลว", "Case insensitve LDAP server (Windows)" => "เซิร์ฟเวอร์ LDAP ประเภท Case insensitive (วินโดวส์)", "Turn off SSL certificate validation." => "ปิดใช้งานการตรวจสอบความถูกต้องของใบรับรองความปลอดภัย SSL", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "หากการเชื่อมต่อสามารถทำงานได้เฉพาะกับตัวเลือกนี้เท่านั้น, ให้นำเข้าข้อมูลใบรับรองความปลอดภัยแบบ SSL ของเซิร์ฟเวอร์ LDAP ดังกล่าวเข้าไปไว้ในเซิร์ฟเวอร์ ownCloud", diff --git a/apps/user_ldap/l10n/tr.php b/apps/user_ldap/l10n/tr.php index 8ded27a2952..1bed9e246c9 100644 --- a/apps/user_ldap/l10n/tr.php +++ b/apps/user_ldap/l10n/tr.php @@ -12,7 +12,6 @@ "Group Filter" => "Grup Süzgeci", "Port" => "Port", "Use TLS" => "TLS kullan", -"Do not use it for SSL connections, it will fail." => "SSL bağlantıları ile kullanmayın, başarısız olacaktır.", "Turn off SSL certificate validation." => "SSL sertifika doğrulamasını kapat.", "Not recommended, use for testing only." => "Önerilmez, sadece test için kullanın.", "in seconds. A change empties the cache." => "saniye cinsinden. Bir değişiklik önbelleği temizleyecektir.", diff --git a/apps/user_ldap/l10n/uk.php b/apps/user_ldap/l10n/uk.php index 4dd1256ee33..643a7495890 100644 --- a/apps/user_ldap/l10n/uk.php +++ b/apps/user_ldap/l10n/uk.php @@ -1,9 +1,24 @@ <?php $TRANSLATIONS = array( +"Failed to delete the server configuration" => "Не вдалося видалити конфігурацію сервера", +"The configuration is valid and the connection could be established!" => "Конфігурація вірна і зв'язок може бути встановлений !", +"The configuration is valid, but the Bind failed. Please check the server settings and credentials." => "Конфігурація вірна, але встановити зв'язок не вдалося. Будь ласка, перевірте налаштування сервера і облікові дані.", +"The configuration is invalid. Please look in the ownCloud log for further details." => "Конфігурація невірна. Подробиці подивіться, будь ласка, в журналі ownCloud.", "Deletion failed" => "Видалення не було виконано", +"Take over settings from recent server configuration?" => "Застосувати налаштування з останньої конфігурації сервера ?", +"Keep settings?" => "Зберегти налаштування ?", +"Cannot add server configuration" => "Неможливо додати конфігурацію сервера", +"Connection test succeeded" => "Перевірка з'єднання пройшла успішно", +"Connection test failed" => "Перевірка з'єднання завершилась неуспішно", +"Do you really want to delete the current Server Configuration?" => "Ви дійсно бажаєте видалити поточну конфігурацію сервера ?", +"Confirm Deletion" => "Підтвердіть Видалення", "<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "<b>Увага:</b> Застосунки user_ldap та user_webdavauth не сумісні. Ви можете зіткнутися з несподіваною поведінкою. Будь ласка, зверніться до системного адміністратора, щоб відключити одну з них.", +"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Увага:</ b> Потрібний модуль PHP LDAP не встановлено, базова програма працювати не буде. Будь ласка, зверніться до системного адміністратора, щоб встановити його.", +"Server configuration" => "Налаштування Сервера", +"Add Server Configuration" => "Додати налаштування Сервера", "Host" => "Хост", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Можна не вказувати протокол, якщо вам не потрібен SSL. Тоді почніть з ldaps://", "Base DN" => "Базовий DN", +"One Base DN per line" => "Один Base DN на одній строчці", "You can specify Base DN for users and groups in the Advanced tab" => "Ви можете задати Базовий DN для користувачів і груп на вкладинці Додатково", "User DN" => "DN Користувача", "The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty." => "DN клієнтського користувача для прив'язки, наприклад: uid=agent,dc=example,dc=com. Для анонімного доступу, залиште DN і Пароль порожніми.", @@ -18,9 +33,10 @@ "Group Filter" => "Фільтр Груп", "Defines the filter to apply, when retrieving groups." => "Визначає фільтр, який застосовується при отриманні груп.", "without any placeholder, e.g. \"objectClass=posixGroup\"." => "без будь-якого заповнювача, наприклад: \"objectClass=posixGroup\".", +"Configuration Active" => "Налаштування Активне", +"When unchecked, this configuration will be skipped." => "Якщо \"галочка\" знята, ця конфігурація буде пропущена.", "Port" => "Порт", "Use TLS" => "Використовуйте TLS", -"Do not use it for SSL connections, it will fail." => "Не використовуйте його для SSL з'єднань, це не буде виконано.", "Case insensitve LDAP server (Windows)" => "Нечутливий до регістру LDAP сервер (Windows)", "Turn off SSL certificate validation." => "Вимкнути перевірку SSL сертифіката.", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Якщо з'єднання працює лише з цією опцією, імпортуйте SSL сертифікат LDAP сервера у ваший ownCloud сервер.", @@ -29,9 +45,11 @@ "User Display Name Field" => "Поле, яке відображає Ім'я Користувача", "The LDAP attribute to use to generate the user`s ownCloud name." => "Атрибут LDAP, який використовується для генерації імен користувачів ownCloud.", "Base User Tree" => "Основне Дерево Користувачів", +"One User Base DN per line" => "Один Користувач Base DN на одній строчці", "Group Display Name Field" => "Поле, яке відображає Ім'я Групи", "The LDAP attribute to use to generate the groups`s ownCloud name." => "Атрибут LDAP, який використовується для генерації імен груп ownCloud.", "Base Group Tree" => "Основне Дерево Груп", +"One Group Base DN per line" => "Одна Група Base DN на одній строчці", "Group-Member association" => "Асоціація Група-Член", "in bytes" => "в байтах", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Залиште порожнім для імені користувача (за замовчанням). Інакше, вкажіть атрибут LDAP/AD.", diff --git a/apps/user_ldap/l10n/vi.php b/apps/user_ldap/l10n/vi.php index 76ff6fe33a4..46054e4a4e2 100644 --- a/apps/user_ldap/l10n/vi.php +++ b/apps/user_ldap/l10n/vi.php @@ -19,7 +19,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "mà không giữ chỗ nào, ví dụ như \"objectClass = osixGroup\".", "Port" => "Cổng", "Use TLS" => "Sử dụng TLS", -"Do not use it for SSL connections, it will fail." => "Kết nối SSL bị lỗi. ", "Case insensitve LDAP server (Windows)" => "Trường hợp insensitve LDAP máy chủ (Windows)", "Turn off SSL certificate validation." => "Tắt xác thực chứng nhận SSL", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "Nếu kết nối chỉ hoạt động với tùy chọn này, vui lòng import LDAP certificate SSL trong máy chủ ownCloud của bạn.", diff --git a/apps/user_ldap/l10n/zh_CN.GB2312.php b/apps/user_ldap/l10n/zh_CN.GB2312.php index 91b059afd0b..f5bc41fd46b 100644 --- a/apps/user_ldap/l10n/zh_CN.GB2312.php +++ b/apps/user_ldap/l10n/zh_CN.GB2312.php @@ -19,7 +19,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "不能使用占位符,例如 \"objectClass=posixGroup\"。", "Port" => "端口", "Use TLS" => "使用 TLS", -"Do not use it for SSL connections, it will fail." => "不要使用它进行 SSL 连接,会失败的。", "Case insensitve LDAP server (Windows)" => "大小写不敏感的 LDAP 服务器 (Windows)", "Turn off SSL certificate validation." => "关闭 SSL 证书校验。", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "如果只有使用此选项才能连接,请导入 LDAP 服务器的 SSL 证书到您的 ownCloud 服务器。", diff --git a/apps/user_ldap/l10n/zh_CN.php b/apps/user_ldap/l10n/zh_CN.php index d0c32e94e08..d494945e2e4 100644 --- a/apps/user_ldap/l10n/zh_CN.php +++ b/apps/user_ldap/l10n/zh_CN.php @@ -20,7 +20,6 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "无需占位符,例如\"objectClass=posixGroup\"", "Port" => "端口", "Use TLS" => "使用TLS", -"Do not use it for SSL connections, it will fail." => "不要在SSL链接中使用此选项,会导致失败。", "Case insensitve LDAP server (Windows)" => "大小写敏感LDAP服务器(Windows)", "Turn off SSL certificate validation." => "关闭SSL证书验证", "If connection only works with this option, import the LDAP server's SSL certificate in your ownCloud server." => "如果链接仅在此选项时可用,在您的ownCloud服务器中导入LDAP服务器的SSL证书。", diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index acc33e047c6..f92779b1cad 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -409,6 +409,11 @@ class Connection { $this->config[$key] = array(); } } + if((strpos($this->config['ldapHost'], 'ldaps') === 0) + && $this->config['ldapTLS']) { + $this->config['ldapTLS'] = false; + \OCP\Util::writeLog('user_ldap', 'LDAPS (already using secure connection) and TLS do not work together. Switched off TLS.', \OCP\Util::INFO); + } @@ -523,7 +528,7 @@ class Connection { if(!$this->config['ldapOverrideMainServer'] && !$this->getFromCache('overrideMainServer')) { $this->doConnect($this->config['ldapHost'], $this->config['ldapPort']); $bindStatus = $this->bind(); - $error = ldap_errno($this->ldapConnectionRes); + $error = is_resource($this->ldapConnectionRes) ? ldap_errno($this->ldapConnectionRes) : -1; } else { $bindStatus = false; $error = null; @@ -547,6 +552,9 @@ class Connection { } private function doConnect($host, $port) { + if(empty($host)) { + return false; + } $this->ldapConnectionRes = ldap_connect($host, $port); if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_PROTOCOL_VERSION, 3)) { if(ldap_set_option($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) { @@ -564,9 +572,13 @@ class Connection { if(!$this->config['ldapConfigurationActive']) { return false; } - $ldapLogin = @ldap_bind($this->getConnectionResource(), $this->config['ldapAgentName'], $this->config['ldapAgentPassword']); + $cr = $this->getConnectionResource(); + if(!is_resource($cr)) { + return false; + } + $ldapLogin = @ldap_bind($cr, $this->config['ldapAgentName'], $this->config['ldapAgentPassword']); if(!$ldapLogin) { - \OCP\Util::writeLog('user_ldap', 'Bind failed: ' . ldap_errno($this->ldapConnectionRes) . ': ' . ldap_error($this->ldapConnectionRes), \OCP\Util::ERROR); + \OCP\Util::writeLog('user_ldap', 'Bind failed: ' . ldap_errno($cr) . ': ' . ldap_error($cr), \OCP\Util::ERROR); $this->ldapConnectionRes = null; return false; } diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index eb3840a611b..c6f1834e013 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -35,7 +35,7 @@ <p><label for="ldap_backup_host"><?php echo $l->t('Backup (Replica) Host');?></label><input type="text" id="ldap_backup_host" name="ldap_backup_host" data-default="<?php echo $_['ldap_backup_host_default']; ?>" title="<?php echo $l->t('Give an optional backup host. It must be a replica of the main LDAP/AD server.');?>"></p> <p><label for="ldap_backup_port"><?php echo $l->t('Backup (Replica) Port');?></label><input type="number" id="ldap_backup_port" name="ldap_backup_port" data-default="<?php echo $_['ldap_backup_port_default']; ?>" /></p> <p><label for="ldap_override_main_server"><?php echo $l->t('Disable Main Server');?></label><input type="checkbox" id="ldap_override_main_server" name="ldap_override_main_server" value="1" data-default="<?php echo $_['ldap_override_main_server_default']; ?>" title="<?php echo $l->t('When switched on, ownCloud will only connect to the replica server.');?>" /></p> - <p><label for="ldap_tls"><?php echo $l->t('Use TLS');?></label><input type="checkbox" id="ldap_tls" name="ldap_tls" value="1" data-default="<?php echo $_['ldap_tls_default']; ?>" title="<?php echo $l->t('Do not use it for SSL connections, it will fail.');?>" /></p> + <p><label for="ldap_tls"><?php echo $l->t('Use TLS');?></label><input type="checkbox" id="ldap_tls" name="ldap_tls" value="1" data-default="<?php echo $_['ldap_tls_default']; ?>" title="<?php echo $l->t('Do not use it additionally for LDAPS connections, it will fail.');?>" /></p> <p><label for="ldap_nocase"><?php echo $l->t('Case insensitve LDAP server (Windows)');?></label><input type="checkbox" id="ldap_nocase" name="ldap_nocase" data-default="<?php echo $_['ldap_nocase_default']; ?>" value="1"<?php if (isset($_['ldap_nocase']) && ($_['ldap_nocase'])) echo ' checked'; ?>></p> <p><label for="ldap_turn_off_cert_check"><?php echo $l->t('Turn off SSL certificate validation.');?></label><input type="checkbox" id="ldap_turn_off_cert_check" name="ldap_turn_off_cert_check" title="<?php echo $l->t('If connection only works with this option, import the LDAP server\'s SSL certificate in your ownCloud server.');?>" data-default="<?php echo $_['ldap_turn_off_cert_check_default']; ?>" value="1"><br/><small><?php echo $l->t('Not recommended, use for testing only.');?></small></p> <p><label for="ldap_cache_ttl">Cache Time-To-Live</label><input type="number" id="ldap_cache_ttl" name="ldap_cache_ttl" title="<?php echo $l->t('in seconds. A change empties the cache.');?>" data-default="<?php echo $_['ldap_cache_ttl_default']; ?>" /></p> |