Merge branch 'master' into move-datadirectory-checks

This commit is contained in:
Michael Gapczynski 2013-01-18 23:31:06 -05:00
commit 9e28f924c2
622 changed files with 6396 additions and 6771 deletions

View file

@ -21,8 +21,20 @@ foreach($files as $file) {
}
}
// updated max file size after upload
$l=new OC_L10N('files');
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize;
if($success) {
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files )));
OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files,
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize
)));
} else {
OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError )));
OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError,
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize
)));
}

View file

@ -0,0 +1,16 @@
<?php
// only need filesystem apps
$RUNTIME_APPTYPES = array('filesystem');
OCP\JSON::checkLoggedIn();
$l=new OC_L10N('files');
$maxUploadFilesize = OCP\Util::maxUploadFilesize($dir);
$maxHumanFilesize = OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
// send back json
OCP\JSON::success(array('data' => array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize
)));

View file

@ -6,13 +6,14 @@ $force=isset($_GET['force']) and $_GET['force']=='true';
$dir=isset($_GET['dir'])?$_GET['dir']:'';
$checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true';
$eventSource=false;
if(!$checkOnly) {
$eventSource=new OC_EventSource();
}
session_write_close();
//create the file cache if necesary
//create the file cache if necessary
if($force or !OC_FileCache::inCache('')) {
if(!$checkOnly) {
OCP\DB::beginTransaction();

View file

@ -10,8 +10,17 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$l=OC_L10N::get('files');
// current max upload size
$l=new OC_L10N('files');
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize;
if (!isset($_FILES['files'])) {
OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' ))));
OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' ),
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize
)));
exit();
}
@ -28,7 +37,10 @@ foreach ($_FILES['files']['error'] as $error) {
UPLOAD_ERR_NO_TMP_DIR=>$l->t('Missing a temporary folder'),
UPLOAD_ERR_CANT_WRITE=>$l->t('Failed to write to disk'),
);
OCP\JSON::error(array('data' => array( 'message' => $errors[$error] )));
OCP\JSON::error(array('data' => array( 'message' => $errors[$error],
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize
)));
exit();
}
}
@ -42,7 +54,9 @@ foreach($files['size'] as $size) {
$totalSize+=$size;
}
if($totalSize>OC_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 space available' ),
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize)));
exit();
}
@ -56,11 +70,19 @@ if(strpos($dir, '..') === false) {
if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) {
$meta = OC_FileCache::get($target);
$id = OC_FileCache::getId($target);
// updated max file size after upload
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize);
$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize;
$result[]=array( 'status' => 'success',
'mime'=>$meta['mimetype'],
'size'=>$meta['size'],
'id'=>$id,
'name'=>basename($target));
'name'=>basename($target),
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize
);
}
}
OCP\JSON::encodedPrint($result);
@ -69,4 +91,7 @@ if(strpos($dir, '..') === false) {
$error=$l->t( 'Invalid directory.' );
}
OCP\JSON::error(array('data' => array('message' => $error )));
OCP\JSON::error(array('data' => array('message' => $error,
'uploadMaxFilesize'=>$maxUploadFilesize,
'maxHumanFilesize'=>$maxHumanFilesize
)));

View file

@ -28,6 +28,7 @@ OCP\User::checkLoggedIn();
OCP\Util::addStyle('files', 'files');
OCP\Util::addscript('files', 'jquery.iframe-transport');
OCP\Util::addscript('files', 'jquery.fileupload');
OCP\Util::addscript('files', 'jquery-visibility');
OCP\Util::addscript('files', 'files');
OCP\Util::addscript('files', 'filelist');
OCP\Util::addscript('files', 'fileactions');
@ -38,36 +39,36 @@ OCP\App::setActiveNavigationEntry('files_index');
$dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
// Redirect if directory does not exist
if (!OC_Filesystem::is_dir($dir . '/')) {
header('Location: ' . $_SERVER['SCRIPT_NAME'] . '');
exit();
header('Location: ' . $_SERVER['SCRIPT_NAME'] . '');
exit();
}
$files = array();
foreach (OC_Files::getdirectorycontent($dir) as $i) {
$i['date'] = OCP\Util::formatDate($i['mtime']);
if ($i['type'] == 'file') {
$fileinfo = pathinfo($i['name']);
$i['basename'] = $fileinfo['filename'];
if (!empty($fileinfo['extension'])) {
$i['extension'] = '.' . $fileinfo['extension'];
} else {
$i['extension'] = '';
}
}
if ($i['directory'] == '/') {
$i['directory'] = '';
}
$files[] = $i;
$i['date'] = OCP\Util::formatDate($i['mtime']);
if ($i['type'] == 'file') {
$fileinfo = pathinfo($i['name']);
$i['basename'] = $fileinfo['filename'];
if (!empty($fileinfo['extension'])) {
$i['extension'] = '.' . $fileinfo['extension'];
} else {
$i['extension'] = '';
}
}
if ($i['directory'] == '/') {
$i['directory'] = '';
}
$files[] = $i;
}
// Make breadcrumb
$breadcrumb = array();
$pathtohere = '';
foreach (explode('/', $dir) as $i) {
if ($i != '') {
$pathtohere .= '/' . $i;
$breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
}
if ($i != '') {
$pathtohere .= '/' . $i;
$breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
}
}
// make breadcrumb und filelist markup
@ -79,23 +80,17 @@ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false);
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$freeSpace = OC_Filesystem::free_space($dir);
$freeSpace = max($freeSpace, 0);
$maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$permissions = OCP\PERMISSION_READ;
if (OC_Filesystem::isUpdatable($dir . '/')) {
$permissions |= OCP\PERMISSION_UPDATE;
$permissions |= OCP\PERMISSION_UPDATE;
}
if (OC_Filesystem::isDeletable($dir . '/')) {
$permissions |= OCP\PERMISSION_DELETE;
$permissions |= OCP\PERMISSION_DELETE;
}
if (OC_Filesystem::isSharable($dir . '/')) {
$permissions |= OCP\PERMISSION_SHARE;
$permissions |= OCP\PERMISSION_SHARE;
}
$tmpl = new OCP\Template('files', 'index', 'user');

View file

@ -26,6 +26,23 @@ Files={
});
procesSelection();
},
updateMaxUploadFilesize:function(response) {
if(response == undefined) {
return;
}
if(response.data !== undefined && response.data.uploadMaxFilesize !== undefined) {
$('#max_upload').val(response.data.uploadMaxFilesize);
$('#data-upload-form a').attr('original-title', response.data.maxHumanFilesize);
}
if(response[0] == undefined) {
return;
}
if(response[0].uploadMaxFilesize !== undefined) {
$('#max_upload').val(response[0].uploadMaxFilesize);
$('#data-upload-form a').attr('original-title', response[0].maxHumanFilesize);
}
},
isFileNameValid:function (name) {
if (name === '.') {
$('#notification').text(t('files', '\'.\' is an invalid file name.'));
@ -87,8 +104,8 @@ $(document).ready(function() {
// Sets the file link behaviour :
$('td.filename a').live('click',function(event) {
event.preventDefault();
if (event.ctrlKey || event.shiftKey) {
event.preventDefault();
if (event.shiftKey) {
var last = $(lastChecked).parent().parent().prevAll().length;
var first = $(this).parent().parent().prevAll().length;
@ -130,6 +147,7 @@ $(document).ready(function() {
var permissions = $(this).parent().parent().data('permissions');
var action=FileActions.getDefault(mime,type, permissions);
if(action){
event.preventDefault();
action(filename);
}
}
@ -316,6 +334,7 @@ $(document).ready(function() {
$('#notification').text(t('files', response.data.message));
$('#notification').fadeIn();
}
Files.updateMaxUploadFilesize(response);
var file=response[0];
// TODO: this doesn't work if the file name has been changed server side
delete uploadingFiles[dirName][file.name];
@ -368,6 +387,8 @@ $(document).ready(function() {
.success(function(result, textStatus, jqXHR) {
var response;
response=jQuery.parseJSON(result);
Files.updateMaxUploadFilesize(response);
if(response[0] != undefined && response[0].status == 'success') {
var file=response[0];
delete uploadingFiles[file.name];
@ -401,6 +422,7 @@ $(document).ready(function() {
data.submit().success(function(data, status) {
// in safari data is a string
response = jQuery.parseJSON(typeof data === 'string' ? data : data[0].body.innerText);
Files.updateMaxUploadFilesize(response);
if(response[0] != undefined && response[0].status == 'success') {
var file=response[0];
delete uploadingFiles[file.name];
@ -711,6 +733,32 @@ $(document).ready(function() {
});
resizeBreadcrumbs(true);
// file space size sync
function update_storage_statistics() {
$.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) {
Files.updateMaxUploadFilesize(response);
});
}
// start on load - we ask the server every 5 minutes
var update_storage_statistics_interval = 5*60*1000;
var update_storage_statistics_interval_id = setInterval(update_storage_statistics, update_storage_statistics_interval);
// Use jquery-visibility to de-/re-activate file stats sync
if ($.support.pageVisibility) {
$(document).on({
'show.visibility': function() {
if (!update_storage_statistics_interval_id) {
update_storage_statistics_interval_id = setInterval(update_storage_statistics, update_storage_statistics_interval);
}
},
'hide.visibility': function() {
clearInterval(update_storage_statistics_interval_id);
update_storage_statistics_interval_id = 0;
}
});
}
});
function scanFiles(force,dir){
@ -740,6 +788,7 @@ scanFiles.scanning=false;
function boolOperationFinished(data, callback) {
result = jQuery.parseJSON(data.responseText);
Files.updateMaxUploadFilesize(result);
if(result.status == 'success'){
callback.call();
} else {

32
apps/files/js/jquery-visibility.js vendored Normal file
View file

@ -0,0 +1,32 @@
/*! http://mths.be/visibility v1.0.5 by @mathias */
(function (window, document, $, undefined) {
var prefix,
property,
// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior
eventName = 'onfocusin' in document && 'hasFocus' in document ? 'focusin focusout' : 'focus blur',
prefixes = ['', 'moz', 'ms', 'o', 'webkit'],
$support = $.support,
$event = $.event;
while ((property = prefix = prefixes.pop()) != undefined) {
property = (prefix ? prefix + 'H' : 'h') + 'idden';
if ($support.pageVisibility = typeof document[property] == 'boolean') {
eventName = prefix + 'visibilitychange';
break;
}
}
$(/blur$/.test(eventName) ? window : document).on(eventName, function (event) {
var type = event.type,
originalEvent = event.originalEvent,
toElement = originalEvent.toElement;
// If its a `{focusin,focusout}` event (IE), `fromElement` and `toElement` should both be `null` or `undefined`;
// else, the page visibility hasnt changed, but the user just clicked somewhere in the doc.
// In IE9, we need to check the `relatedTarget` property instead.
if (!/^focus./.test(type) || (toElement == undefined && originalEvent.fromElement == undefined && originalEvent.relatedTarget == undefined)) {
$event.trigger((property && document[property] || /^(?:blur|focusout)$/.test(type) ? 'hide' : 'show') + '.visibility');
}
});
}(this, document, jQuery));

View file

@ -1,4 +1,8 @@
<?php $TRANSLATIONS = array(
"Upload" => "Αποστολή",
"Could not move %s - File with this name already exists" => "Αδυναμία μετακίνησης του %s - υπάρχει ήδη αρχείο με αυτό το όνομα",
"Could not move %s" => "Αδυναμία μετακίνησης του %s",
"Unable to rename file" => "Αδυναμία μετονομασίας αρχείου",
"No file was uploaded. Unknown error" => "Δεν ανέβηκε κάποιο αρχείο. Άγνωστο σφάλμα",
"There is no error, the file uploaded with success" => "Δεν υπάρχει σφάλμα, το αρχείο εστάλει επιτυχώς",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Το απεσταλμένο αρχείο ξεπερνά την οδηγία upload_max_filesize στο php.ini:",
@ -7,6 +11,8 @@
"No file was uploaded" => "Κανένα αρχείο δεν στάλθηκε",
"Missing a temporary folder" => "Λείπει ο προσωρινός φάκελος",
"Failed to write to disk" => "Αποτυχία εγγραφής στο δίσκο",
"Not enough space available" => "Δεν υπάρχει αρκετός διαθέσιμος χώρος",
"Invalid directory." => "Μη έγκυρος φάκελος.",
"Files" => "Αρχεία",
"Unshare" => "Διακοπή κοινής χρήσης",
"Delete" => "Διαγραφή",
@ -20,6 +26,8 @@
"replaced {new_name} with {old_name}" => "αντικαταστάθηκε το {new_name} με {old_name}",
"unshared {files}" => "μη διαμοιρασμένα {files}",
"deleted {files}" => "διαγραμμένα {files}",
"'.' is an invalid file name." => "'.' είναι μη έγκυρο όνομα αρχείου.",
"File name cannot be empty." => "Το όνομα αρχείου δεν πρέπει να είναι κενό.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Μη έγκυρο όνομα, '\\', '/', '<', '>', ':', '\"', '|', '?' και '*' δεν επιτρέπονται.",
"generating ZIP-file, it may take some time." => "παραγωγή αρχείου ZIP, ίσως διαρκέσει αρκετά.",
"Unable to upload your file as it is a directory or has 0 bytes" => "Αδυναμία στην αποστολή του αρχείου σας αφού είναι φάκελος ή έχει 0 bytes",
@ -31,6 +39,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" => "Μη έγκυρο όνομα φακέλου. Η χρήση του 'Κοινόχρηστος' χρησιμοποιείται από ο Owncloud",
"{count} files scanned" => "{count} αρχεία ανιχνεύτηκαν",
"error while scanning" => "σφάλμα κατά την ανίχνευση",
"Name" => "Όνομα",
@ -52,7 +61,6 @@
"Text file" => "Αρχείο κειμένου",
"Folder" => "Φάκελος",
"From link" => "Από σύνδεσμο",
"Upload" => "Αποστολή",
"Cancel upload" => "Ακύρωση αποστολής",
"Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Ανέβασε κάτι!",
"Download" => "Λήψη",

View file

@ -1,4 +1,7 @@
<?php $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "No se pudo mover %s - Un archivo con este nombre ya existe",
"Could not move %s" => "No se pudo mover %s ",
"Unable to rename file" => "No fue posible cambiar el nombre al archivo",
"No file was uploaded. Unknown error" => "El archivo no fue subido. Error desconocido",
"There is no error, the file uploaded with success" => "No se han producido errores, el archivo se ha subido con éxito",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo que intentás subir excede el tamaño definido por upload_max_filesize en el php.ini:",
@ -22,6 +25,8 @@
"replaced {new_name} with {old_name}" => "reemplazado {new_name} con {old_name}",
"unshared {files}" => "{files} se dejaron de compartir",
"deleted {files}" => "{files} borrados",
"'.' 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.",
"generating ZIP-file, it may take some time." => "generando un archivo ZIP, puede llevar un tiempo.",
"Unable to upload your file as it is a directory or has 0 bytes" => "No fue posible subir el archivo porque es un directorio o porque su tamaño es 0 bytes",
@ -33,6 +38,7 @@
"Upload cancelled." => "La subida fue cancelada",
"File upload is in progress. Leaving the page now will cancel the upload." => "La subida del archivo está en proceso. Si salís de la página ahora, la subida se cancelará.",
"URL cannot be empty." => "La URL no puede estar vacía",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nombre de carpeta inválido. El uso de 'Shared' está reservado por ownCloud",
"{count} files scanned" => "{count} archivos escaneados",
"error while scanning" => "error mientras se escaneaba",
"Name" => "Nombre",

View file

@ -1,4 +1,7 @@
<?php $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Non se moveu %s - Xa existe un ficheiro con ese nome.",
"Could not move %s" => "Non se puido mover %s",
"Unable to rename file" => "Non se pode renomear o ficheiro",
"No file was uploaded. Unknown error" => "Non se subiu ningún ficheiro. Erro descoñecido.",
"There is no error, the file uploaded with success" => "Non hai erros. O ficheiro enviouse correctamente",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "O ficheiro subido excede a directiva indicada polo tamaño_máximo_de_subida de php.ini",
@ -22,6 +25,8 @@
"replaced {new_name} with {old_name}" => "substituír {new_name} polo {old_name}",
"unshared {files}" => "{files} sen compartir",
"deleted {files}" => "{files} eliminados",
"'.' is an invalid file name." => "'.' é un nonme de ficheiro non válido",
"File name cannot be empty." => "O nome de ficheiro non pode estar baldeiro",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non válido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non se permiten.",
"generating ZIP-file, it may take some time." => "xerando un ficheiro ZIP, o que pode levar un anaco.",
"Unable to upload your file as it is a directory or has 0 bytes" => "Non se puido subir o ficheiro pois ou é un directorio ou ten 0 bytes",
@ -33,6 +38,7 @@
"Upload cancelled." => "Subida cancelada.",
"File upload is in progress. Leaving the page now will cancel the upload." => "A subida do ficheiro está en curso. Saír agora da páxina cancelará a subida.",
"URL cannot be empty." => "URL non pode quedar baleiro.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome de cartafol non válido. O uso de 'Shared' está reservado por Owncloud",
"{count} files scanned" => "{count} ficheiros escaneados",
"error while scanning" => "erro mentres analizaba",
"Name" => "Nome",

View file

@ -1,4 +1,7 @@
<?php $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Kon %s niet verplaatsen - Er bestaat al een bestand met deze naam",
"Could not move %s" => "Kon %s niet verplaatsen",
"Unable to rename file" => "Kan bestand niet hernoemen",
"No file was uploaded. Unknown error" => "Er was geen bestand geladen. Onbekende fout",
"There is no error, the file uploaded with success" => "Geen fout opgetreden, bestand successvol geupload.",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Het geüploade bestand overscheidt de upload_max_filesize optie in php.ini:",
@ -35,6 +38,7 @@
"Upload cancelled." => "Uploaden geannuleerd.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Bestandsupload is bezig. Wanneer de pagina nu verlaten wordt, stopt de upload.",
"URL cannot be empty." => "URL kan niet leeg zijn.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ongeldige mapnaam. Gebruik van'Gedeeld' is voorbehouden aan Owncloud",
"{count} files scanned" => "{count} bestanden gescanned",
"error while scanning" => "Fout tijdens het scannen",
"Name" => "Naam",

View file

@ -1,4 +1,7 @@
<?php $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Nie można było przenieść %s - Plik o takiej nazwie już istnieje",
"Could not move %s" => "Nie można było przenieść %s",
"Unable to rename file" => "Nie można zmienić nazwy pliku",
"No file was uploaded. Unknown error" => "Plik nie został załadowany. Nieznany błąd",
"There is no error, the file uploaded with success" => "Przesłano plik",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Wgrany plik przekracza wartość upload_max_filesize zdefiniowaną w php.ini: ",

View file

@ -37,6 +37,7 @@
"Upload cancelled." => "Încărcare anulată.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.",
"URL cannot be empty." => "Adresa URL nu poate fi goală.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Invalid folder name. Usage of 'Shared' is reserved by Ownclou",
"{count} files scanned" => "{count} fisiere scanate",
"error while scanning" => "eroare la scanarea",
"Name" => "Nume",

View file

@ -1,4 +1,7 @@
<?php $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "无法移动 %s - 同名文件已存在",
"Could not move %s" => "无法移动 %s",
"Unable to rename file" => "无法重命名文件",
"No file was uploaded. Unknown error" => "没有文件被上传。未知错误",
"There is no error, the file uploaded with success" => "没有发生错误,文件上传成功。",
"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "上传文件大小已超过php.ini中upload_max_filesize所规定的值",
@ -7,6 +10,8 @@
"No file was uploaded" => "文件没有上传",
"Missing a temporary folder" => "缺少临时目录",
"Failed to write to disk" => "写入磁盘失败",
"Not enough space available" => "没有足够可用空间",
"Invalid directory." => "无效文件夹。",
"Files" => "文件",
"Unshare" => "取消分享",
"Delete" => "删除",
@ -20,6 +25,8 @@
"replaced {new_name} with {old_name}" => "已将 {old_name}替换成 {new_name}",
"unshared {files}" => "取消了共享 {files}",
"deleted {files}" => "删除了 {files}",
"'.' is an invalid file name." => "'.' 是一个无效的文件名。",
"File name cannot be empty." => "文件名不能为空。",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "无效名称,'\\', '/', '<', '>', ':', '\"', '|', '?' 和 '*' 不被允许使用。",
"generating ZIP-file, it may take some time." => "正在生成 ZIP 文件,可能需要一些时间",
"Unable to upload your file as it is a directory or has 0 bytes" => "无法上传文件,因为它是一个目录或者大小为 0 字节",
@ -31,6 +38,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" => "无效文件夹名。'共享' 是 Owncloud 预留的文件夹名。",
"{count} files scanned" => "{count} 个文件已扫描。",
"error while scanning" => "扫描时出错",
"Name" => "名称",

View file

@ -1,10 +1,10 @@
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
$crumb = $_["breadcrumb"][$i];
$dir = str_replace('+', '%20', urlencode($crumb["dir"]));
$dir = str_replace('%2F', '/', $dir); ?>
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg"
data-dir='<?php echo $dir;?>'
style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'>
<a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a>
</div>
<?php endfor;
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
$crumb = $_["breadcrumb"][$i];
$dir = str_replace('+', '%20', urlencode($crumb["dir"]));
$dir = str_replace('%2F', '/', $dir); ?>
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg"
data-dir='<?php echo $dir;?>'
style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'>
<a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a>
</div>
<?php endfor;

View file

@ -1,70 +1,70 @@
<script type="text/javascript">
<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?>
var publicListView = true;
<?php else: ?>
var publicListView = false;
<?php endif; ?>
</script>
<script type="text/javascript">
<?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?>
var publicListView = true;
<?php else: ?>
var publicListView = false;
<?php endif; ?>
</script>
<?php foreach($_['files'] as $file):
$simple_file_size = OCP\simple_file_size($file['size']);
// the bigger the file, the darker the shade of grey; megabytes*2
$simple_size_color = intval(200-$file['size']/(1024*1024)*2);
if($simple_size_color<0) $simple_size_color = 0;
$relative_modified_date = OCP\relative_modified_date($file['mtime']);
// the older the file, the brighter the shade of grey; days*14
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
if($relative_date_color>200) $relative_date_color = 200;
$name = str_replace('+', '%20', urlencode($file['name']));
$name = str_replace('%2F', '/', $name);
$directory = str_replace('+', '%20', urlencode($file['directory']));
$directory = str_replace('%2F', '/', $directory); ?>
<tr data-id="<?php echo $file['id']; ?>"
data-file="<?php echo $name;?>"
data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>"
data-mime="<?php echo $file['mimetype']?>"
data-size='<?php echo $file['size'];?>'
data-permissions='<?php echo $file['permissions']; ?>'>
<td class="filename svg"
<?php if($file['type'] == 'dir'): ?>
style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)"
<?php else: ?>
style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)"
<?php endif; ?>
>
<?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
<?php if($file['type'] == 'dir'): ?>
<a class="name" href="<?php $_['baseURL'].$directory.'/'.$name; ?>)" title="">
<?php else: ?>
<a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">
<?php endif; ?>
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
<?php echo htmlspecialchars($file['name']);?>
<?php else:?>
<?php echo htmlspecialchars($file['basename']);?><span
class='extension'><?php echo $file['extension'];?></span>
<?php endif;?>
</span>
<?php if($file['type'] == 'dir'):?>
<span class="uploadtext" currentUploads="0">
</span>
<?php endif;?>
</a>
</td>
<td class="filesize"
title="<?php echo OCP\human_file_size($file['size']); ?>"
style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)">
<?php echo $simple_file_size; ?>
</td>
<td class="date">
<span class="modified"
title="<?php echo $file['date']; ?>"
style="color:rgb(<?php echo $relative_date_color.','
.$relative_date_color.','
.$relative_date_color ?>)">
<?php echo $relative_modified_date; ?>
</span>
</td>
</tr>
<?php endforeach;
<?php foreach($_['files'] as $file):
$simple_file_size = OCP\simple_file_size($file['size']);
// the bigger the file, the darker the shade of grey; megabytes*2
$simple_size_color = intval(200-$file['size']/(1024*1024)*2);
if($simple_size_color<0) $simple_size_color = 0;
$relative_modified_date = OCP\relative_modified_date($file['mtime']);
// the older the file, the brighter the shade of grey; days*14
$relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
if($relative_date_color>200) $relative_date_color = 200;
$name = str_replace('+', '%20', urlencode($file['name']));
$name = str_replace('%2F', '/', $name);
$directory = str_replace('+', '%20', urlencode($file['directory']));
$directory = str_replace('%2F', '/', $directory); ?>
<tr data-id="<?php echo $file['id']; ?>"
data-file="<?php echo $name;?>"
data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>"
data-mime="<?php echo $file['mimetype']?>"
data-size='<?php echo $file['size'];?>'
data-permissions='<?php echo $file['permissions']; ?>'>
<td class="filename svg"
<?php if($file['type'] == 'dir'): ?>
style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)"
<?php else: ?>
style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)"
<?php endif; ?>
>
<?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
<?php if($file['type'] == 'dir'): ?>
<a class="name" href="<?php $_['baseURL'].$directory.'/'.$name; ?>)" title="">
<?php else: ?>
<a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">
<?php endif; ?>
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
<?php echo htmlspecialchars($file['name']);?>
<?php else:?>
<?php echo htmlspecialchars($file['basename']);?><span
class='extension'><?php echo $file['extension'];?></span>
<?php endif;?>
</span>
<?php if($file['type'] == 'dir'):?>
<span class="uploadtext" currentUploads="0">
</span>
<?php endif;?>
</a>
</td>
<td class="filesize"
title="<?php echo OCP\human_file_size($file['size']); ?>"
style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)">
<?php echo $simple_file_size; ?>
</td>
<td class="date">
<span class="modified"
title="<?php echo $file['date']; ?>"
style="color:rgb(<?php echo $relative_date_color.','
.$relative_date_color.','
.$relative_date_color ?>)">
<?php echo $relative_modified_date; ?>
</span>
</td>
</tr>
<?php endforeach;

View file

@ -2,7 +2,7 @@
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Encryption');?></strong></legend>
<input type='checkbox'<?php if ($_['encryption_enabled']): ?> checked="checked"<?php endif; ?>
id='enable_encryption' ></input>
id='enable_encryption' />
<label for='enable_encryption'><?php echo $l->t('Enable Encryption')?></label><br />
<select id='encryption_blacklist' title="<?php echo $l->t('None')?>" multiple="multiple">
<?php foreach ($_['blacklist'] as $type): ?>

View file

@ -234,12 +234,11 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
try {
$response=$this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
$this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
return true;
} catch(Exception $e) {
echo $e;
echo 'fail';
var_dump($response);
return false;
}
}
@ -248,12 +247,11 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
try {
$response=$this->client->request('COPY', $path1, null, array('Destination'=>$path2));
$this->client->request('COPY', $path1, null, array('Destination'=>$path2));
return true;
} catch(Exception $e) {
echo $e;
echo 'fail';
var_dump($response);
return false;
}
}

View file

@ -1,7 +1,7 @@
<form id="files_external">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('External Storage'); ?></strong></legend>
<?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) echo ''.$_['dependencies'].''; ?>
<?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) echo ''.$_['dependencies'].''; ?>
<table id="externalStorage" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
<thead>
<tr>

View file

@ -1,44 +0,0 @@
<?php
/**
* ownCloud - user_migrate
*
* @author Sam Tuke
* @copyright 2012 Sam Tuke samtuke@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/>.
*
*/
// TODO: Allow admins to expire versions of any user
// TODO: Provide feedback as to how many versions were deleted
// Check user and app status
OCP\JSON::checkLoggedIn();
OCP\App::checkAppEnabled('files_versions');
OCP\JSON::callCheck();
$versions = new OCA_Versions\Storage();
if( $versions->expireAll() ) {
OCP\JSON::success();
die();
} else {
OCP\JSON::error();
die();
}

View file

@ -4,10 +4,9 @@ OCP\JSON::checkAppEnabled('files_versions');
$userDirectory = "/".OCP\USER::getUser()."/files";
$source = $_GET['source'];
if( OCA_Versions\Storage::isversioned( $source ) ) {
$count = 5; //show the newest revisions
if( ($versions = OCA_Versions\Storage::getVersions( $source, $count)) ) {
$count=5; //show the newest revisions
$versions = OCA_Versions\Storage::getVersions( $source, $count);
$versionsFormatted = array();
foreach ( $versions AS $version ) {

View file

@ -8,10 +8,9 @@ $userDirectory = "/".OCP\USER::getUser()."/files";
$file = $_GET['file'];
$revision=(int)$_GET['revision'];
if( OCA_Versions\Storage::isversioned( $file ) ) {
if(OCA_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 )));
}
if(OCA_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 )));
}

View file

@ -28,7 +28,6 @@ $tmpl = new OCP\Template( 'files_versions', 'history', 'user' );
if ( isset( $_GET['path'] ) ) {
$path = $_GET['path'];
$path = $path;
$tmpl->assign( 'path', $path );
$versions = new OCA_Versions\Storage();
@ -52,10 +51,8 @@ if ( isset( $_GET['path'] ) ) {
}
// show the history only if there is something to show
if( OCA_Versions\Storage::isversioned( $path ) ) {
$count = 999; //show the newest revisions
$versions = OCA_Versions\Storage::getVersions( $path, $count);
$count = 999; //show the newest revisions
if( ($versions = OCA_Versions\Storage::getVersions( $path, $count)) ) {
$tmpl->assign( 'versions', array_reverse( $versions ) );

View file

@ -1,39 +0,0 @@
// TODO: allow the button to be clicked only once
$( document ).ready(function(){
//
$( '#expireAllBtn' ).click(
function( event ) {
// Prevent page from reloading
event.preventDefault();
// Show loading gif
$('.expireAllLoading').show();
$.getJSON(
OC.filePath('files_versions','ajax','expireAll.php'),
function(result){
if (result.status == 'success') {
$('.expireAllLoading').hide();
$('#expireAllBtn').html('Expiration successful');
} else {
// Cancel loading
$('#expireAllBtn').html('Expiration failed');
// Show Dialog
OC.dialogs.alert(
'Something went wrong, your files may not have been expired',
'An error has occurred',
function(){
$('#expireAllBtn').html(t('files_versions', 'Expire all versions')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />');
}
);
}
}
);
}
);
});

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "إنهاء تاريخ الإنتهاء لجميع الإصدارات",
"History" => "السجل الزمني",
"Versions" => "الإصدارات",
"This will delete all existing backup versions of your files" => "هذه العملية ستقوم بإلغاء جميع إصدارات النسخ الاحتياطي للملفات",
"Files Versioning" => "أصدرة الملفات",
"Enable" => "تفعيل"
);

View file

@ -1,6 +1,4 @@
<?php $TRANSLATIONS = array(
"History" => "История",
"Versions" => "Версии",
"This will delete all existing backup versions of your files" => "Това действие ще изтрие всички налични архивни версии на Вашите файлове",
"Enable" => "Включено"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "সমস্ত ভার্সন মেয়াদোত্তীর্ণ",
"History" => "ইতিহাস",
"Versions" => "ভার্সন",
"This will delete all existing backup versions of your files" => "এটি আপনার বিদ্যমান ফাইলের সমস্ত ব্যাক-আপ ভার্সন মুছে ফেলবে।",
"Files Versioning" => "ফাইল ভার্সন করা",
"Enable" => "সক্রিয় "
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expira totes les versions",
"History" => "Historial",
"Versions" => "Versions",
"This will delete all existing backup versions of your files" => "Això eliminarà totes les versions de còpia de seguretat dels vostres fitxers",
"Files Versioning" => "Fitxers de Versions",
"Enable" => "Habilita"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Vypršet všechny verze",
"History" => "Historie",
"Versions" => "Verze",
"This will delete all existing backup versions of your files" => "Odstraní všechny existující zálohované verze Vašich souborů",
"Files Versioning" => "Verzování souborů",
"Enable" => "Povolit"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Lad alle versioner udløbe",
"History" => "Historik",
"Versions" => "Versioner",
"This will delete all existing backup versions of your files" => "Dette vil slette alle eksisterende backupversioner af dine filer",
"Files Versioning" => "Versionering af filer",
"Enable" => "Aktiver"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Alle Versionen löschen",
"History" => "Historie",
"Versions" => "Versionen",
"This will delete all existing backup versions of your files" => "Dies löscht alle vorhandenen Sicherungsversionen Deiner Dateien.",
"Files Versioning" => "Dateiversionierung",
"Enable" => "Aktivieren"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Alle Versionen löschen",
"History" => "Historie",
"Versions" => "Versionen",
"This will delete all existing backup versions of your files" => "Dies löscht alle vorhandenen Sicherungsversionen Ihrer Dateien.",
"Files Versioning" => "Dateiversionierung",
"Enable" => "Aktivieren"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Λήξη όλων των εκδόσεων",
"History" => "Ιστορικό",
"Versions" => "Εκδόσεις",
"This will delete all existing backup versions of your files" => "Αυτό θα διαγράψει όλες τις υπάρχουσες εκδόσεις των αντιγράφων ασφαλείας των αρχείων σας",
"Files Versioning" => "Εκδόσεις Αρχείων",
"Enable" => "Ενεργοποίηση"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Eksvalidigi ĉiujn eldonojn",
"History" => "Historio",
"Versions" => "Eldonoj",
"This will delete all existing backup versions of your files" => "Ĉi tio forigos ĉiujn estantajn sekurkopiajn eldonojn de viaj dosieroj",
"Files Versioning" => "Dosiereldonigo",
"Enable" => "Kapabligi"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expirar todas las versiones",
"History" => "Historial",
"Versions" => "Versiones",
"This will delete all existing backup versions of your files" => "Esto eliminará todas las versiones guardadas como copia de seguridad de tus archivos",
"Files Versioning" => "Versionado de archivos",
"Enable" => "Habilitar"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expirar todas las versiones",
"History" => "Historia",
"Versions" => "Versiones",
"This will delete all existing backup versions of your files" => "Hacer estom borrará todas las versiones guardadas como copia de seguridad de tus archivos",
"Files Versioning" => "Versionado de archivos",
"Enable" => "Activar"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Kõikide versioonide aegumine",
"History" => "Ajalugu",
"Versions" => "Versioonid",
"This will delete all existing backup versions of your files" => "See kustutab kõik sinu failidest tehtud varuversiooni",
"Files Versioning" => "Failide versioonihaldus",
"Enable" => "Luba"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Iraungi bertsio guztiak",
"History" => "Historia",
"Versions" => "Bertsioak",
"This will delete all existing backup versions of your files" => "Honek zure fitxategien bertsio guztiak ezabatuko ditu",
"Files Versioning" => "Fitxategien Bertsioak",
"Enable" => "Gaitu"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Vanhenna kaikki versiot",
"History" => "Historia",
"Versions" => "Versiot",
"This will delete all existing backup versions of your files" => "Tämä poistaa kaikki tiedostojesi olemassa olevat varmuuskopioversiot",
"Files Versioning" => "Tiedostojen versiointi",
"Enable" => "Käytä"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Supprimer les versions intermédiaires",
"History" => "Historique",
"Versions" => "Versions",
"This will delete all existing backup versions of your files" => "Cette opération va effacer toutes les versions intermédiaires de vos fichiers (et ne garder que la dernière version en date).",
"Files Versioning" => "Versionnage des fichiers",
"Enable" => "Activer"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Caducan todas as versións",
"History" => "Historial",
"Versions" => "Versións",
"This will delete all existing backup versions of your files" => "Isto eliminará todas as copias de seguranza que haxa dos seus ficheiros",
"Files Versioning" => "Sistema de versión de ficheiros",
"Enable" => "Activar"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "הפגת תוקף כל הגרסאות",
"History" => "היסטוריה",
"Versions" => "גרסאות",
"This will delete all existing backup versions of your files" => "פעולה זו תמחק את כל גיבויי הגרסאות הקיימים של הקבצים שלך",
"Files Versioning" => "שמירת הבדלי גרסאות של קבצים",
"Enable" => "הפעלה"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Az összes korábbi változat törlése",
"History" => "Korábbi változatok",
"Versions" => "Az állományok korábbi változatai",
"This will delete all existing backup versions of your files" => "Itt törölni tudja állományainak összes korábbi verzióját",
"Files Versioning" => "Az állományok verzionálása",
"Enable" => "engedélyezve"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "kadaluarsakan semua versi",
"History" => "riwayat",
"Versions" => "versi",
"This will delete all existing backup versions of your files" => "ini akan menghapus semua versi backup yang ada dari file anda",
"Files Versioning" => "pembuatan versi file",
"Enable" => "aktifkan"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Úrelda allar útgáfur",
"History" => "Saga",
"Versions" => "Útgáfur",
"This will delete all existing backup versions of your files" => "Þetta mun eyða öllum afritum af skránum þínum",
"Files Versioning" => "Útgáfur af skrám",
"Enable" => "Virkja"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Scadenza di tutte le versioni",
"History" => "Cronologia",
"Versions" => "Versioni",
"This will delete all existing backup versions of your files" => "Ciò eliminerà tutte le versioni esistenti dei tuoi file",
"Files Versioning" => "Controllo di versione dei file",
"Enable" => "Abilita"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "すべてのバージョンを削除する",
"History" => "履歴",
"Versions" => "バージョン",
"This will delete all existing backup versions of your files" => "これは、あなたのファイルのすべてのバックアップバージョンを削除します",
"Files Versioning" => "ファイルのバージョン管理",
"Enable" => "有効化"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "모든 버전 삭제",
"History" => "역사",
"Versions" => "버전",
"This will delete all existing backup versions of your files" => "이 파일의 모든 백업 버전을 삭제합니다",
"Files Versioning" => "파일 버전 관리",
"Enable" => "사용함"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "وه‌شانه‌کان گشتیان به‌سه‌رده‌چن",
"History" => "مێژوو",
"Versions" => "وه‌شان",
"This will delete all existing backup versions of your files" => "ئه‌مه‌ سه‌رجه‌م پاڵپشتی وه‌شانه‌ هه‌بووه‌کانی په‌ڕگه‌کانت ده‌سڕینته‌وه",
"Files Versioning" => "وه‌شانی په‌ڕگه",
"Enable" => "چالاککردن"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Panaikinti visų versijų galiojimą",
"History" => "Istorija",
"Versions" => "Versijos",
"This will delete all existing backup versions of your files" => "Tai ištrins visas esamas failo versijas",
"Files Versioning" => "Failų versijos",
"Enable" => "Įjungti"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Истечи ги сите верзии",
"History" => "Историја",
"Versions" => "Версии",
"This will delete all existing backup versions of your files" => "Ова ќе ги избрише сите постоечки резервни копии од вашите датотеки",
"Files Versioning" => "Верзии на датотеки",
"Enable" => "Овозможи"
);

View file

@ -1,7 +1,5 @@
<?php $TRANSLATIONS = array(
"History" => "Historie",
"Versions" => "Versjoner",
"This will delete all existing backup versions of your files" => "Dette vil slette alle tidligere versjoner av alle filene dine",
"Files Versioning" => "Fil versjonering",
"Enable" => "Aktiver"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Alle versies laten verlopen",
"History" => "Geschiedenis",
"Versions" => "Versies",
"This will delete all existing backup versions of your files" => "Dit zal alle bestaande backup versies van uw bestanden verwijderen",
"Files Versioning" => "Bestand versies",
"Enable" => "Activeer"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Wygasają wszystkie wersje",
"History" => "Historia",
"Versions" => "Wersje",
"This will delete all existing backup versions of your files" => "Spowoduje to usunięcie wszystkich istniejących wersji kopii zapasowych plików",
"Files Versioning" => "Wersjonowanie plików",
"Enable" => "Włącz"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expirar todas as versões",
"History" => "Histórico",
"Versions" => "Versões",
"This will delete all existing backup versions of your files" => "Isso removerá todas as versões de backup existentes dos seus arquivos",
"Files Versioning" => "Versionamento de Arquivos",
"Enable" => "Habilitar"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expirar todas as versões",
"History" => "Histórico",
"Versions" => "Versões",
"This will delete all existing backup versions of your files" => "Isto irá apagar todas as versões de backup do seus ficheiros",
"Files Versioning" => "Versionamento de Ficheiros",
"Enable" => "Activar"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expiră toate versiunile",
"History" => "Istoric",
"Versions" => "Versiuni",
"This will delete all existing backup versions of your files" => "Această acțiune va șterge toate versiunile salvate ale fișierelor tale",
"Files Versioning" => "Versionare fișiere",
"Enable" => "Activare"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Просрочить все версии",
"History" => "История",
"Versions" => "Версии",
"This will delete all existing backup versions of your files" => "Очистить список версий ваших файлов",
"Files Versioning" => "Версии файлов",
"Enable" => "Включить"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Срок действия всех версий истекает",
"History" => "История",
"Versions" => "Версии",
"This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии Ваших файлов",
"Files Versioning" => "Файлы управления версиями",
"Enable" => "Включить"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "සියලු අනුවාද අවලංගු කරන්න",
"History" => "ඉතිහාසය",
"Versions" => "අනුවාද",
"This will delete all existing backup versions of your files" => "මෙයින් ඔබගේ ගොනුවේ රක්ශිත කරනු ලැබු අනුවාද සියල්ල මකා දමනු ලැබේ",
"Files Versioning" => "ගොනු අනුවාදයන්",
"Enable" => "සක්‍රිය කරන්න"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Expirovať všetky verzie",
"History" => "História",
"Versions" => "Verzie",
"This will delete all existing backup versions of your files" => "Budú zmazané všetky zálohované verzie vašich súborov",
"Files Versioning" => "Vytváranie verzií súborov",
"Enable" => "Zapnúť"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Zastaraj vse različice",
"History" => "Zgodovina",
"Versions" => "Različice",
"This will delete all existing backup versions of your files" => "S tem bodo izbrisane vse obstoječe različice varnostnih kopij vaših datotek",
"Files Versioning" => "Sledenje različicam",
"Enable" => "Omogoči"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Upphör alla versioner",
"History" => "Historik",
"Versions" => "Versioner",
"This will delete all existing backup versions of your files" => "Detta kommer att radera alla befintliga säkerhetskopior av dina filer",
"Files Versioning" => "Versionshantering av filer",
"Enable" => "Aktivera"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "எல்லா பதிப்புகளும் காலாவதியாகிவிட்டது",
"History" => "வரலாறு",
"Versions" => "பதிப்புகள்",
"This will delete all existing backup versions of your files" => "உங்களுடைய கோப்புக்களில் ஏற்கனவே உள்ள ஆதாரநகல்களின் பதிப்புக்களை இவை அழித்துவிடும்",
"Files Versioning" => "கோப்பு பதிப்புகள்",
"Enable" => "இயலுமைப்படுத்துக"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "หมดอายุทุกรุ่น",
"History" => "ประวัติ",
"Versions" => "รุ่น",
"This will delete all existing backup versions of your files" => "นี่จะเป็นลบทิ้งไฟล์รุ่นที่ทำการสำรองข้อมูลทั้งหมดที่มีอยู่ของคุณทิ้งไป",
"Files Versioning" => "การกำหนดเวอร์ชั่นของไฟล์",
"Enable" => "เปิดใช้งาน"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Tüm sürümleri sona erdir",
"History" => "Geçmiş",
"Versions" => "Sürümler",
"This will delete all existing backup versions of your files" => "Bu dosyalarınızın tüm yedek sürümlerini silecektir",
"Files Versioning" => "Dosya Sürümleri",
"Enable" => "Etkinleştir"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Термін дії всіх версій",
"History" => "Історія",
"Versions" => "Версії",
"This will delete all existing backup versions of your files" => "Це призведе до знищення всіх існуючих збережених версій Ваших файлів",
"Files Versioning" => "Версії файлів",
"Enable" => "Включити"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Hết hạn tất cả các phiên bản",
"History" => "Lịch sử",
"Versions" => "Phiên bản",
"This will delete all existing backup versions of your files" => "Khi bạn thực hiện thao tác này sẽ xóa tất cả các phiên bản sao lưu hiện có ",
"Files Versioning" => "Phiên bản tập tin",
"Enable" => "Bật "
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "作废所有版本",
"History" => "历史",
"Versions" => "版本",
"This will delete all existing backup versions of your files" => "这将删除所有您现有文件的备份版本",
"Files Versioning" => "文件版本",
"Enable" => "启用"
);

View file

@ -1,8 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "过期所有版本",
"History" => "历史",
"Versions" => "版本",
"This will delete all existing backup versions of your files" => "将会删除您的文件的所有备份版本",
"Files Versioning" => "文件版本",
"Enable" => "开启"
);

View file

@ -1,7 +1,5 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "所有逾期的版本",
"History" => "歷史",
"Versions" => "版本",
"Files Versioning" => "檔案版本化中...",
"Enable" => "啟用"
);

View file

@ -39,14 +39,14 @@ class Hooks {
* cleanup the versions directory if the actual file gets deleted
*/
public static function remove_hook($params) {
$versions_fileview = \OCP\Files::getStorage('files_versions');
$rel_path = $params['path'];
$abs_path = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$rel_path.'.v';
if(Storage::isversioned($rel_path)) {
$versions = Storage::getVersions($rel_path);
foreach ($versions as $v) {
unlink($abs_path . $v['version']);
}
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
$versions = new Storage( new \OC_FilesystemView('') );
$path = $params[\OC_Filesystem::signal_param_path];
if($path<>'') $versions->delete( $path );
}
}
@ -58,17 +58,15 @@ class Hooks {
* of the stored versions along the actual file
*/
public static function rename_hook($params) {
$versions_fileview = \OCP\Files::getStorage('files_versions');
$rel_oldpath = $params['oldpath'];
$abs_oldpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$rel_oldpath.'.v';
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$params['newpath'].'.v';
if(Storage::isversioned($rel_oldpath)) {
$info=pathinfo($abs_newpath);
if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true);
$versions = Storage::getVersions($rel_oldpath);
foreach ($versions as $v) {
rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
}
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
$versions = new Storage( new \OC_FilesystemView('') );
$oldpath = $params['oldpath'];
$newpath = $params['newpath'];
if($oldpath<>'' && $newpath<>'') $versions->rename( $oldpath, $newpath );
}
}

View file

@ -1,6 +1,7 @@
<?php
/**
* Copyright (c) 2012 Frank Karlitschek <frank@owncloud.org>
* 2013 Bjoern Schiessle <schiessle@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
@ -16,24 +17,23 @@ namespace OCA_Versions;
class Storage {
// config.php configuration:
// - files_versions
// - files_versionsfolder
// - files_versionsblacklist
// - files_versionsmaxfilesize
// - files_versionsinterval
// - files_versionmaxversions
//
// todo:
// - finish porting to OC_FilesystemView to enable network transparency
// - add transparent compression. first test if it´s worth it.
const DEFAULTENABLED=true;
const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp';
const DEFAULTMAXFILESIZE=1048576; // 10MB
const DEFAULTMININTERVAL=60; // 1 min
const DEFAULTMAXVERSIONS=50;
const DEFAULTMAXSIZE=50; // unit: percentage; 50% of available disk space/quota
private static $max_versions_per_interval = array(
1 => array('intervalEndsAfter' => 10, //first 10sec, one version every 2sec
'step' => 2),
2 => array('intervalEndsAfter' => 60, //next minute, one version every 10sec
'step' => 10),
3 => array('intervalEndsAfter' => 3600, //next hour, one version every minute
'step' => 60),
4 => array('intervalEndsAfter' => 86400, //next 24h, one version every hour
'step' => 3600),
5 => array('intervalEndsAfter' => 2592000, //next 30days, one version per day
'step' => 86400),
6 => array('intervalEndsAfter' => -1, //until the end one version per week
'step' => 604800),
);
private static function getUidAndFilename($filename)
{
@ -72,55 +72,77 @@ class Storage {
return false;
}
// check filetype blacklist
$blacklist=explode(' ', \OCP\Config::getSystemValue('files_versionsblacklist', Storage::DEFAULTBLACKLIST));
foreach($blacklist as $bl) {
$parts=explode('.', $filename);
$ext=end($parts);
if(strtolower($ext)==$bl) {
return false;
}
}
// we should have a source file to work with
if (!$files_view->file_exists($filename)) {
return false;
}
// check filesize
if($files_view->filesize($filename)>\OCP\Config::getSystemValue('files_versionsmaxfilesize', Storage::DEFAULTMAXFILESIZE)) {
return false;
}
// check mininterval if the file is being modified by the owner (all shared files should be versioned despite mininterval)
if ($uid == \OCP\User::getUser()) {
$versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
$versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
$matches=glob($versionsName.'.v*');
sort($matches);
$parts=explode('.v', end($matches));
if((end($parts)+Storage::DEFAULTMININTERVAL)>time()) {
return false;
}
}
// create all parent folders
$info=pathinfo($filename);
$versionsFolderName=\OCP\Config::getSystemValue('datadirectory').$users_view->getAbsolutePath('files_versions/');
if(!file_exists($versionsFolderName.'/'.$info['dirname'])) {
mkdir($versionsFolderName.'/'.$info['dirname'], 0750, true);
}
// store a new version of a file
$users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.time());
$result = $users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename));
if ( ($versionsSize = \OCP\Config::getAppValue('files_versions', 'size')) === null ) {
$versionsSize = self::calculateSize($uid);
}
$versionsSize += $users_view->filesize('files'.$filename);
// expire old revisions if necessary
Storage::expire($filename);
$newSize = self::expire($filename, $versionsSize);
if ( $newSize != $versionsSize ) {
\OCP\Config::setAppValue('files_versions', 'size', $versionsSize);
}
}
}
/**
* Delete versions of a file
*/
public static function delete($filename) {
list($uid, $filename) = self::getUidAndFilename($filename);
$versions_fileview = new \OC_FilesystemView('/'.$uid .'/files_versions');
$abs_path = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('').$filename.'.v';
if( ($versions = self::getVersions($filename)) ) {
if ( ($versionsSize = \OCP\Config::getAppValue('files_versions', 'size')) === null ) {
$versionsSize = self::calculateSize($uid);
}
foreach ($versions as $v) {
unlink($abs_path . $v['version']);
$versionsSize -= $v['size'];
}
\OCP\Config::setAppValue('files_versions', 'size', $versionsSize);
}
}
/**
* rename versions of a file
*/
public static function rename($oldpath, $newpath) {
list($uid, $oldpath) = self::getUidAndFilename($oldpath);
list($uidn, $newpath) = self::getUidAndFilename($newpath);
$versions_view = new \OC_FilesystemView('/'.$uid .'/files_versions');
$files_view = new \OC_FilesystemView('/'.$uid .'/files');
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').$versions_view->getAbsolutePath('').$newpath;
if ( $files_view->is_dir($oldpath) && $versions_view->is_dir($oldpath) ) {
$versions_view->rename($oldpath, $newpath);
} else if ( ($versions = Storage::getVersions($oldpath)) ) {
$info=pathinfo($abs_newpath);
if(!file_exists($info['dirname'])) mkdir($info['dirname'], 0750, true);
$versions = Storage::getVersions($oldpath);
foreach ($versions as $v) {
$versions_view->rename($oldpath.'.v'.$v['version'], $newpath.'.v'.$v['version']);
}
}
}
/**
* rollback to an old version of a file.
*/
@ -129,45 +151,29 @@ class Storage {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
$users_view = new \OC_FilesystemView('/'.$uid);
$versionCreated = false;
//first create a new version
$version = 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename);
if ( !$users_view->file_exists($version)) {
$users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename));
$versionCreated = true;
}
// rollback
if( @$users_view->copy('files_versions'.$filename.'.v'.$revision, 'files'.$filename) ) {
$users_view->touch('files'.$filename, $revision);
Storage::expire($filename);
return true;
}else{
return false;
}else if ( $versionCreated ) {
$users_view->unlink($version);
}
}
return false;
}
/**
* check if old versions of a file exist.
*/
public static function isversioned($filename) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
$versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
// check for old versions
$matches=glob($versionsName.'.v*');
if(count($matches)>0) {
return true;
}else{
return false;
}
}else{
return(false);
}
}
/**
* @brief get a list of all available versions of a file in descending chronological order
@ -187,92 +193,232 @@ class Storage {
sort( $matches );
$i = 0;
$files_view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files');
$files_view = new \OC_FilesystemView('/'.$uid.'/files');
$local_file = $files_view->getLocalFile($filename);
foreach( $matches as $ma ) {
$i++;
$versions[$i]['cur'] = 0;
foreach( $matches as $ma ) {
$parts = explode( '.v', $ma );
$versions[$i]['version'] = ( end( $parts ) );
$version = ( end( $parts ) );
$key = $version.'#'.$filename;
$versions[$key]['cur'] = 0;
$versions[$key]['version'] = $version;
$versions[$key]['path'] = $filename;
$versions[$key]['size'] = $versions_fileview->filesize($filename.'.v'.$version);
// if file with modified date exists, flag it in array as currently enabled version
( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$key]['fileMatch'] = 1 : $versions[$key]['fileMatch'] = 0 );
}
$versions = array_reverse( $versions );
foreach( $versions as $key => $value ) {
// flag the first matched file in array (which will have latest modification date) as current version
if ( $value['fileMatch'] ) {
$value['cur'] = 1;
break;
}
}
$versions = array_reverse( $versions );
// only show the newest commits
if( $count != 0 and ( count( $versions )>$count ) ) {
$versions = array_slice( $versions, count( $versions ) - $count );
}
return( $versions );
} else {
// if versioning isn't enabled then return an empty array
return( array() );
}
}
/**
* @brief get the size of all stored versions from a given user
* @param $uid id from the user
* @return size of vesions
*/
private static function calculateSize($uid) {
if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
$versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsRoot = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($versionsRoot), \RecursiveIteratorIterator::CHILD_FIRST);
$size = 0;
foreach ($iterator as $path) {
if ( preg_match('/^.+\.v(\d+)$/', $path, $match) ) {
$relpath = substr($path, strlen($versionsRoot)-1);
$size += $versions_fileview->filesize($relpath);
}
}
return $size;
}
}
/**
* @brief returns all stored file versions from a given user
* @param $uid id to the user
* @return array with contains two arrays 'all' which contains all versions sorted by age and 'by_file' which contains all versions sorted by filename
*/
private static function getAllVersions($uid) {
if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) {
$versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsRoot = \OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath('');
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($versionsRoot), \RecursiveIteratorIterator::CHILD_FIRST);
$versions = array();
foreach ($iterator as $path) {
if ( preg_match('/^.+\.v(\d+)$/', $path, $match) ) {
$relpath = substr($path, strlen($versionsRoot)-1);
$versions[$match[1].'#'.$relpath] = array('path' => $relpath, 'timestamp' => $match[1]);
}
}
ksort($versions);
$i = 0;
$result = array();
foreach( $versions as $key => $value ) {
$i++;
$size = $versions_fileview->filesize($value['path']);
$filename = substr($value['path'], 0, -strlen($value['timestamp'])-2);
$result['all'][$key]['version'] = $value['timestamp'];
$result['all'][$key]['path'] = $filename;
$result['all'][$key]['size'] = $size;
$filename = substr($value['path'], 0, -strlen($value['timestamp'])-2);
$result['by_file'][$filename][$key]['version'] = $value['timestamp'];
$result['by_file'][$filename][$key]['path'] = $filename;
$result['by_file'][$filename][$key]['size'] = $size;
}
return $result;
}
}
/**
* @brief Erase a file's versions which exceed the set quota
*/
public static function expire($filename) {
private static function expire($filename, $versionsSize = null) {
if(\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true') {
list($uid, $filename) = self::getUidAndFilename($filename);
$versions_fileview = new \OC_FilesystemView('/'.$uid.'/files_versions');
$versionsName=\OCP\Config::getSystemValue('datadirectory').$versions_fileview->getAbsolutePath($filename);
// check for old versions
$matches = glob( $versionsName.'.v*' );
if( count( $matches ) > \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS ) ) {
$numberToDelete = count($matches) - \OCP\Config::getSystemValue( 'files_versionmaxversions', Storage::DEFAULTMAXVERSIONS );
// delete old versions of a file
$deleteItems = array_slice( $matches, 0, $numberToDelete );
foreach( $deleteItems as $de ) {
unlink( $versionsName.'.v'.$de );
// get available disk space for user
$quota = \OCP\Util::computerFileSize(\OC_Preferences::getValue($uid, 'files', 'quota'));
if ( $quota == null ) {
$quota = \OCP\Util::computerFileSize(\OC_Appconfig::getValue('files', 'default_quota'));
}
if ( $quota == null ) {
$quota = \OC_Filesystem::free_space('/');
}
// make sure that we have the current size of the version history
if ( $versionsSize === null ) {
if ( ($versionsSize = \OCP\Config::getAppValue('files_versions', 'size')) === null ) {
$versionsSize = self::calculateSize($uid);
}
}
}
}
/**
* @brief Erase all old versions of all user files
* @return true/false
*/
public function expireAll() {
$view = \OCP\Files::getStorage('files_versions');
return $view->deleteAll('', true);
// calculate available space for version history
$rootInfo = \OC_FileCache::get('', '/'. $uid . '/files');
$free = $quota-$rootInfo['size']; // remaining free space for user
if ( $free > 0 ) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $versionsSize; // how much space can be used for versions
} else {
$availableSpace = $free-$versionsSize;
}
// after every 1000s run reduce the number of all versions not only for the current file
$random = rand(0, 1000);
if ($random == 0) {
$result = Storage::getAllVersions($uid);
$versions_by_file = $result['by_file'];
$all_versions = $result['all'];
} else {
$all_versions = Storage::getVersions($filename);
$versions_by_file[$filename] = $all_versions;
}
$time = time();
// it is possible to expire versions from more than one file
// iterate through all given files
foreach ($versions_by_file as $filename => $versions) {
$versions = array_reverse($versions); // newest version first
$interval = 1;
$step = Storage::$max_versions_per_interval[$interval]['step'];
if (Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1) {
$nextInterval = -1;
} else {
$nextInterval = $time - Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'];
}
$firstVersion = reset($versions);
$firstKey = key($versions);
$prevTimestamp = $firstVersion['version'];
$nextVersion = $firstVersion['version'] - $step;
$remaining_versions[$firstKey] = $firstVersion;
unset($versions[$firstKey]);
foreach ($versions as $key => $version) {
$newInterval = true;
while ( $newInterval ) {
if ( $nextInterval == -1 || $version['version'] >= $nextInterval ) {
if ( $version['version'] > $nextVersion ) {
//distance between two version too small, delete version
$versions_fileview->unlink($version['path'].'.v'.$version['version']);
$availableSpace += $version['size'];
$versionsSize -= $version['size'];
unset($all_versions[$key]); // update array with all versions
} else {
$nextVersion = $version['version'] - $step;
}
$newInterval = false; // version checked so we can move to the next one
} else { // time to move on to the next interval
$interval++;
$step = Storage::$max_versions_per_interval[$interval]['step'];
$nextVersion = $prevTimestamp - $step;
if ( Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'] == -1 ) {
$nextInterval = -1;
} else {
$nextInterval = $time - Storage::$max_versions_per_interval[$interval]['intervalEndsAfter'];
}
$newInterval = true; // we changed the interval -> check same version with new interval
}
}
$prevTimestamp = $version['version'];
}
}
// check if enough space is available after versions are rearranged.
// if not we delete the oldest versions until we meet the size limit for versions
$numOfVersions = count($all_versions);
$i = 0;
while ($availableSpace < 0) {
if ($i = $numOfVersions-2) break; // keep at least the last version
$versions_fileview->unlink($all_versions[$i]['path'].'.v'.$all_versions[$i]['version']);
$versionsSize -= $all_versions[$i]['size'];
$availableSpace += $all_versions[$i]['size'];
$i++;
}
return $versionsSize; // finally return the new size of the version history
}
return false;
}
}

View file

@ -1,7 +0,0 @@
<?php
$tmpl = new OCP\Template( 'files_versions', 'settings-personal');
OCP\Util::addscript('files_versions', 'settings-personal');
return $tmpl->fetchPage();

View file

@ -1,12 +0,0 @@
<form id="versions">
<fieldset class="personalblock">
<legend>
<strong><?php echo $l->t('Versions'); ?></strong>
</legend>
<button id="expireAllBtn">
<?php echo $l->t('Expire all versions'); ?>
<img style="display: none;" class="expireAllLoading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" />
</button>
<br /><em><?php echo $l->t('This will delete all existing backup versions of your files'); ?></em>
</fieldset>
</form>

View file

@ -1,6 +1,6 @@
<form id="versionssettings">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Files Versioning');?></strong></legend>
<input type="checkbox" name="versions" id="versions" value="1" <?php if (OCP\Config::getSystemValue('versions', 'true')=='true') echo ' checked="checked"'; ?> /> <label for="versions"><?php echo $l->t('Enable'); ?></label> <br/>
</fieldset>
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('Files Versioning');?></strong></legend>
<input type="checkbox" name="versions" id="versions" value="1" <?php if (OCP\Config::getSystemValue('versions', 'true')=='true') echo ' checked="checked"'; ?> /> <label for="versions"><?php echo $l->t('Enable'); ?></label> <br/>
</fieldset>
</form>

View file

@ -2,9 +2,11 @@
width: 20%;
max-width: 200px;
display: inline-block;
vertical-align: top;
padding-top: 9px;
}
#ldap fieldset input {
#ldap fieldset input, #ldap fieldset textarea {
width: 70%;
display: inline-block;
}

View file

@ -1,3 +1,4 @@
<?php $TRANSLATIONS = array(
"Password" => "كلمة المرور"
"Password" => "كلمة المرور",
"Help" => "المساعدة"
);

View file

@ -1,9 +1,10 @@
<?php $TRANSLATIONS = array(
"<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>Avís:</b> Les aplicacions user_ldap i user_webdavauth són incompatibles. Podeu experimentar comportaments no desitjats. Demaneu a l'administrador del sistema que en desactivi una.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avís:</b> El mòdul PHP LDAP necessari no està instal·lat, el dorsal no funcionarà. Demaneu a l'administrador del sistema que l'instal·li.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avís:</b> El mòdul PHP LDAP no està instal·lat, el dorsal no funcionarà. Demaneu a l'administrador del sistema que l'instal·li.",
"Host" => "Màquina",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Podeu ometre el protocol, excepte si requeriu SSL. Llavors comenceu amb ldaps://",
"Base DN" => "DN Base",
"One Base DN per line" => "Una DN Base per línia",
"You can specify Base DN for users and groups in the Advanced tab" => "Podeu especificar DN Base per usuaris i grups a la pestanya Avançat",
"User DN" => "DN Usuari",
"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." => "La DN de l'usuari client amb la que s'haurà de fer, per exemple uid=agent,dc=exemple,dc=com. Per un accés anònim, deixeu la DN i la contrasenya en blanc.",
@ -20,7 +21,9 @@
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "sense cap paràmetre de substitució, per exemple \"objectClass=grupPosix\".",
"Port" => "Port",
"Base User Tree" => "Arbre base d'usuaris",
"One User Base DN per line" => "Una DN Base d'Usuari per línia",
"Base Group Tree" => "Arbre base de grups",
"One Group Base DN per line" => "Una DN Base de Grup per línia",
"Group-Member association" => "Associació membres-grup",
"Use TLS" => "Usa TLS",
"Do not use it for SSL connections, it will fail." => "No ho useu en connexions SSL, fallarà.",

View file

@ -1,9 +1,10 @@
<?php $TRANSLATIONS = array(
"<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>Varování:</b> Aplikace user_ldap a user_webdavauth nejsou kompatibilní. Může nastávat neočekávané chování. Požádejte, prosím, správce systému aby jednu z nich zakázal.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Varování:</b> není nainstalován LDAP modul pro PHP, podpůrná vrstva nebude fungovat. Požádejte, prosím, správce systému aby jej nainstaloval.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Varování:</b> není nainstalován LDAP modul pro PHP, podpůrná vrstva nebude fungovat. Požádejte, prosím, správce systému aby jej nainstaloval.",
"Host" => "Počítač",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Můžete vynechat protokol, vyjma pokud požadujete SSL. Tehdy začněte s ldaps://",
"Base DN" => "Základní DN",
"One Base DN per line" => "Jedna základní DN na řádku",
"You can specify Base DN for users and groups in the Advanced tab" => "V rozšířeném nastavení můžete určit základní DN pro uživatele a skupiny",
"User DN" => "Uživatelské 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 klentského uživatele ke kterému tvoříte vazbu, např. uid=agent,dc=example,dc=com. Pro anonymní přístup ponechte údaje DN and Heslo prázdné.",
@ -20,7 +21,9 @@
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "bez zástupných znaků, např. \"objectClass=posixGroup\".",
"Port" => "Port",
"Base User Tree" => "Základní uživatelský strom",
"One User Base DN per line" => "Jedna uživatelská základní DN na řádku",
"Base Group Tree" => "Základní skupinový strom",
"One Group Base DN per line" => "Jedna skupinová základní DN na řádku",
"Group-Member association" => "Asociace člena skupiny",
"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.",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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>Warnung:</b> Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwarteten Verhalten kommen. Bitte Deinen Systemadministator eine der beiden Anwendungen zu deaktivieren.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Warnung:</b> Das PHP-Modul, das LDAP benöntigt, ist nicht installiert. Das Backend wird nicht funktionieren. Bitte deinen Systemadministrator das Modul zu installieren.",
"Host" => "Host",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Du kannst das Protokoll auslassen, außer wenn Du SSL benötigst. Beginne dann mit ldaps://",
"Base DN" => "Basis-DN",

View file

@ -1,9 +1,10 @@
<?php $TRANSLATIONS = array(
"<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>Warnung:</b> Die Anwendungen user_ldap und user_webdavauth sind inkompatibel. Es kann demzufolge zu unerwarteten Verhalten kommen. Bitten Sie Ihren Systemadministator eine der beiden Anwendungen zu deaktivieren.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Warnung:</b> Das PHP-Modul, das LDAP benöntigt, ist nicht installiert. Das Backend wird nicht funktionieren. Bitten Sie Ihren Systemadministrator das Modul zu installieren.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Warnung:</b> Da das PHP-Modul für LDAP nicht installiert ist, wird das Backend nicht funktionieren. Bitten Sie Ihren Systemadministrator das Modul zu installieren.",
"Host" => "Host",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Sie können das Protokoll auslassen, außer wenn Sie SSL benötigen. Beginnen Sie dann mit ldaps://",
"Base DN" => "Basis-DN",
"One Base DN per line" => "Ein Base DN pro Zeile",
"You can specify Base DN for users and groups in the Advanced tab" => "Sie können Basis-DN für Benutzer und Gruppen in dem \"Erweitert\"-Reiter konfigurieren",
"User DN" => "Benutzer-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." => "Der DN des Benutzers für LDAP-Bind, z.B.: uid=agent,dc=example,dc=com. Für anonymen Zugriff lassen Sie DN und Passwort leer.",
@ -20,7 +21,9 @@
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "ohne Platzhalter, z.B.: \"objectClass=posixGroup\"",
"Port" => "Port",
"Base User Tree" => "Basis-Benutzerbaum",
"One User Base DN per line" => "Ein Benutzer Base DN pro Zeile",
"Base Group Tree" => "Basis-Gruppenbaum",
"One Group Base DN per line" => "Ein Gruppen Base DN pro Zeile",
"Group-Member association" => "Assoziation zwischen Gruppe und Benutzer",
"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.",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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 needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Προσοχή:</b> Το PHP LDAP module που απαιτείται δεν είναι εγκατεστημένο και ο μηχανισμός δεν θα λειτουργήσει. Παρακαλώ ζητήστε από τον διαχειριστή του συστήματος να το εγκαταστήσει.",
"Host" => "Διακομιστής",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Μπορείτε να παραλείψετε το πρωτόκολλο, εκτός αν απαιτείται SSL. Σε αυτή την περίπτωση ξεκινήστε με ldaps://",
"Base DN" => "Base DN",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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 needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Advertencia:</b> El módulo PHP LDAP necesario no está instalado, el sistema no funcionará. Pregunte al administrador del sistema para instalarlo.",
"Host" => "Servidor",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Puede omitir el protocolo, excepto si requiere SSL. En ese caso, empiece con ldaps://",
"Base DN" => "DN base",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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 needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Advertencia:</b> El módulo PHP LDAP necesario no está instalado, el sistema no funcionará. Pregunte al administrador del sistema para instalarlo.",
"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",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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>Abisua:</b> user_ldap eta user_webdavauth aplikazioak bateraezinak dira. Portaera berezia izan dezakezu. Mesedez eskatu zure sistema kudeatzaileari bietako bat desgaitzeko.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Abisua:</b> PHPk behar duen LDAP modulua ez dago instalaturik, motorrak ez du funtzionatuko. Mesedez eskatu zure sistema kudeatzaileari instala dezan.",
"Host" => "Hostalaria",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokoloa ez da beharrezkoa, SSL behar baldin ez baduzu. Honela bada hasi ldaps://",
"Base DN" => "Oinarrizko DN",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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>Avertissement:</b> Les applications user_ldap et user_webdavauth sont incompatibles. Des disfonctionnements peuvent survenir. Contactez votre administrateur système pour qu'il désactive l'une d'elles.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avertissement:</b> Le module PHP LDAP requis n'est pas installé, l'application ne marchera pas. Contactez votre administrateur système pour qu'il l'installe.",
"Host" => "Hôte",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Vous pouvez omettre le protocole, sauf si vous avez besoin de SSL. Dans ce cas préfixez avec ldaps://",
"Base DN" => "DN Racine",

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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>Aviso:</b> Os aplicativos user_ldap e user_webdavauth son incompatíbeis. Pode acontecer un comportamento estraño. Consulte co administrador do sistema para desactivar un deles.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Aviso:</b> O módulo PHP LDAP é necesario e non está instalado, a infraestrutura non funcionará. Consulte co administrador do sistema para instalalo.",
"Host" => "Servidor",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Pode omitir o protocolo agás que precise de SSL. Nese caso comece con ldaps://",
"Base DN" => "DN base",

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "Pomoć"
);

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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>Figyelem:</b> a user_ldap és user_webdavauth alkalmazások nem kompatibilisek. Együttes használatuk váratlan eredményekhez vezethet. Kérje meg a rendszergazdát, hogy a kettő közül kapcsolja ki az egyiket.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Figyelem:</b> a szükséges PHP LDAP modul nincs telepítve. Enélkül az LDAP azonosítás nem fog működni. Kérje meg a rendszergazdát, hogy telepítse a szükséges modult!",
"Host" => "Kiszolgáló",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "A protokoll előtag elhagyható, kivéve, ha SSL-t kíván használni. Ebben az esetben kezdje így: ldaps://",
"Base DN" => "DN-gyökér",

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "Adjuta"
);

View file

@ -1,9 +1,10 @@
<?php $TRANSLATIONS = array(
"<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>Avviso:</b> le applicazioni user_ldap e user_webdavauth sono incompatibili. Potresti riscontrare un comportamento inatteso. Chiedi al tuo amministratore di sistema di disabilitarne uno.",
"<b>Warning:</b> The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avviso:</b> il modulo PHP LDAP richiesto non è installato, il motore non funzionerà. Chiedi al tuo amministratore di sistema di installarlo.",
"<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Avviso:</b> il modulo PHP LDAP non è installato, il motore non funzionerà. Chiedi al tuo amministratore di sistema di installarlo.",
"Host" => "Host",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "È possibile omettere il protocollo, ad eccezione se è necessario SSL. Quindi inizia con ldaps://",
"Base DN" => "DN base",
"One Base DN per line" => "Un DN base per riga",
"You can specify Base DN for users and groups in the Advanced tab" => "Puoi specificare una DN base per gli utenti ed i gruppi nella scheda Avanzate",
"User DN" => "DN utente",
"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." => "Il DN per il client dell'utente con cui deve essere associato, ad esempio uid=agent,dc=example,dc=com. Per l'accesso anonimo, lasciare vuoti i campi DN e Password",
@ -20,7 +21,9 @@
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "senza nessun segnaposto, per esempio \"objectClass=posixGroup\".",
"Port" => "Porta",
"Base User Tree" => "Struttura base dell'utente",
"One User Base DN per line" => "Un DN base utente per riga",
"Base Group Tree" => "Struttura base del gruppo",
"One Group Base DN per line" => "Un DN base gruppo per riga",
"Group-Member association" => "Associazione gruppo-utente ",
"Use TLS" => "Usa TLS",
"Do not use it for SSL connections, it will fail." => "Non utilizzare per le connessioni SSL, fallirà.",

View file

@ -1,9 +1,10 @@
<?php $TRANSLATIONS = array(
"<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 needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>警告:</b> PHP LDAP モジュールがインストールされていません。バックエンドが正しくどうさしません。システム管理者にインストールするよう問い合わせてください。",
"<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 モジュールがインストールされていません。バックエンドが正しく動作しません。システム管理者にインストールするよう問い合わせてください。",
"Host" => "ホスト",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "SSL通信しない場合には、プロトコル名を省略することができます。そうでない場合には、ldaps:// から始めてください。",
"Base DN" => "ベースDN",
"One Base DN per line" => "1行に1つのベース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とパスワードは空のままです。",
@ -20,7 +21,9 @@
"without any placeholder, e.g. \"objectClass=posixGroup\"." => "プレースホルダーを利用しないでください。例 \"objectClass=posixGroup\"",
"Port" => "ポート",
"Base User Tree" => "ベースユーザツリー",
"One User Base DN per line" => "1行に1つのユーザベースDN",
"Base Group Tree" => "ベースグループツリー",
"One Group Base DN per line" => "1行に1つのグループベースDN",
"Group-Member association" => "グループとメンバーの関連付け",
"Use TLS" => "TLSを利用",
"Do not use it for SSL connections, it will fail." => "SSL接続に利用しないでください、失敗します。",

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "დახმარება"
);

View file

@ -1,6 +1,5 @@
<?php $TRANSLATIONS = array(
"<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 needs is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>경고</b>PHP LDAP 모듈이 설치되지 않았습니다. 백엔드가 동작하지 않을 것 입니다. 시스템관리자에게 요청하여 해당 모듈을 설치하시기 바랍니다.",
"Host" => "호스트",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "SSL을 사용하는 경우가 아니라면 프로토콜을 입력하지 않아도 됩니다. SSL을 사용하려면 ldaps://를 입력하십시오.",
"Base DN" => "기본 DN",

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "یارمەتی"
);

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "Hëllef"
);

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "Palīdzība"
);

View file

@ -1,5 +1,6 @@
<?php $TRANSLATIONS = array(
"Host" => "Домаќин",
"You can omit the protocol, except you require SSL. Then start with ldaps://" => "Може да го скокнете протколот освен ако не ви треба SSL. Тогаш ставете ldaps://",
"Password" => "Лозинка"
"Password" => "Лозинка",
"Help" => "Помош"
);

View file

@ -0,0 +1,3 @@
<?php $TRANSLATIONS = array(
"Help" => "Bantuan"
);

Some files were not shown because too many files have changed in this diff Show more