diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..1021eae0f6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +## Submitting issues + +If you have questions about how to use ownCloud, please direct these to the [mailing list][mailinglist] or our [forum][forum]. We are also available on [IRC][irc]. + +### Guidelines +* Report the issue using our [template][template], it includes all the informations we need to track down the issue. +* This repository is *only* for issues within the ownCloud core code. Issues in other compontents should be reported in their own repositores: + - [Android client](https://github.com/owncloud/android/issues) + - [iOS client](https://github.com/owncloud/ios-issues/issues) + - [Desktop client](https://github.com/owncloud/mirall/issues) + - [ownCloud apps](https://github.com/owncloud/apps/issues) (e.g. Calendar, Contacts...) +* Search the existing issues first, it's likely that your issue was already reported. + +If your issue appears to be a bug, and hasn't been reported, open a new issue. + +Help us to maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues. + +[template]: https://raw.github.com/owncloud/core/master/issue_template.md +[mailinglist]: https://mail.kde.org/mailman/listinfo/owncloud +[forum]: http://forum.owncloud.org/ +[irc]: http://webchat.freenode.net/?channels=owncloud&uio=d4 + +## Contributing to Source Code + +Thanks for wanting to contribute source code to ownCloud. That's great! + +Before we're able to merge your code into the ownCloud core, you need to sign our [Contributor Agreement][agreement]. + +Please read the [Developer Manuals][devmanual] to get useful infos like how to create your first application or how to test the ownCloud code with phpunit. + +[agreement]: http://owncloud.org/about/contributor-agreement/ +[devmanual]: http://owncloud.org/dev/ + +## Translations +Please submit translations via [Transifex][transifex]. + +[transifex]: https://www.transifex.com/projects/p/owncloud/ diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 6532b76df2..293543c547 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -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 + ))); } diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php new file mode 100644 index 0000000000..e55e346ed6 --- /dev/null +++ b/apps/files/ajax/getstoragestats.php @@ -0,0 +1,16 @@ +t('Upload') . ' max. ' . $maxHumanFilesize; + +// send back json +OCP\JSON::success(array('data' => array('uploadMaxFilesize' => $maxUploadFilesize, + 'maxHumanFilesize' => $maxHumanFilesize +))); diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index 5cd9572d7f..a819578e30 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -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(); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index b6705db671..8f0084e2bc 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -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 storage available' )))); + OCP\JSON::error(array('data' => array( 'message' => $l->t( 'Not enough storage 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 +))); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 36a1e5c954..0c97b009b8 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -23,7 +23,7 @@ #new>ul>li>p { cursor:pointer; } #new>ul>li>form>input { padding:0.3em; margin:-0.3em; } -#upload { +#upload { height:27px; padding:0; margin-left:0.2em; overflow:hidden; } #upload a { @@ -35,7 +35,7 @@ } .file_upload_target { display:none; } .file_upload_form { display:inline; float:left; margin:0; padding:0; cursor:pointer; overflow:visible; } -#file_upload_start { +#file_upload_start { left:0; top:0; width:28px; height:27px; padding:0; font-size:1em; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; diff --git a/apps/files/index.php b/apps/files/index.php index 9d3eb41079..2c6b689b0c 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -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; } // information about storage capacities diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 80b9c01f83..f5ee363a4c 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -70,23 +70,23 @@ var FileActions = { } parent.children('a.name').append(''); var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); - + var actionHandler = function (event) { event.stopPropagation(); event.preventDefault(); FileActions.currentFile = event.data.elem; var file = FileActions.getCurrentFile(); - + event.data.actionFunc(file); }; - + $.each(actions, function (name, action) { // NOTE: Temporary fix to prevent rename action in root of Shared directory if (name === 'Rename' && $('#dir').val() === '/Shared') { return true; } - + if ((name === 'Download' || action !== defaultAction) && name !== 'Delete') { var img = FileActions.icons[name]; if (img.call) { @@ -97,16 +97,16 @@ var FileActions = { html += ' '; } html += t('files', name) + ''; - + var element = $(html); element.data('action', name); //alert(element); element.on('click',{a:null, elem:parent, actionFunc:actions[name]},actionHandler); parent.find('a.name>span.fileactions').append(element); } - + }); - + if (actions['Delete']) { var img = FileActions.icons['Delete']; if (img.call) { diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 426f91c792..f4d572b695 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -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 === '.') { OC.Notification.show(t('files', '\'.\' is an invalid file name.')); @@ -47,19 +64,19 @@ Files={ OC.Notification.hide(); return true; }, - displayStorageWarnings: function() { - var usedSpacePercent = $('#usedSpacePercent').val(); - if (usedSpacePercent > 98) { + displayStorageWarnings: function() { + var usedSpacePercent = $('#usedSpacePercent').val(); + if (usedSpacePercent > 98) { OC.Notification.show(t('files', 'Your storage is full, files can not be updated or synced anymore!')); return; - } - if (usedSpacePercent > 90) { + } + if (usedSpacePercent > 90) { OC.Notification.show(t('files', 'Your storage is almost full ({usedSpacePercent}%)', {usedSpacePercent: usedSpacePercent})); - } - } + } + } }; $(document).ready(function() { - Files.bindKeyboardShortcuts(document, jQuery); + Files.bindKeyboardShortcuts(document, jQuery); $('#fileList tr').each(function(){ //little hack to set unescape filenames in attribute $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); @@ -94,8 +111,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; @@ -137,6 +154,7 @@ $(document).ready(function() { var permissions = $(this).parent().parent().data('permissions'); var action=FileActions.getDefault(mime,type, permissions); if(action){ + event.preventDefault(); action(filename); } } @@ -319,8 +337,9 @@ $(document).ready(function() { var response; response=jQuery.parseJSON(result); if(response[0] == undefined || response[0].status != 'success') { - OC.Notification.show(t('files', response.data.message)); + OC.Notification.show(t('files', response.data.message)); } + 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]; @@ -371,6 +390,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]; @@ -382,18 +403,18 @@ $(document).ready(function() { //TODO update file upload size limit FileList.loadingDone(file.name, file.id); } else { - Files.cancelUpload(this.files[0].name); + Files.cancelUpload(this.files[0].name); OC.Notification.show(t('files', response.data.message)); $('#fileList > tr').not('[data-mime]').fadeOut(); $('#fileList > tr').not('[data-mime]').remove(); } - }) - .error(function(jqXHR, textStatus, errorThrown) { - if(errorThrown === 'abort') { - Files.cancelUpload(this.files[0].name); - OC.Notification.show(t('files', 'Upload cancelled.')); - } - }); + }) + .error(function(jqXHR, textStatus, errorThrown) { + if(errorThrown === 'abort') { + Files.cancelUpload(this.files[0].name); + OC.Notification.show(t('files', 'Upload cancelled.')); + } + }); uploadingFiles[uniqueName] = jqXHR; } } @@ -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]; @@ -412,7 +434,7 @@ $(document).ready(function() { //TODO update file upload size limit FileList.loadingDone(file.name, file.id); } else { - //TODO Files.cancelUpload(/*where do we get the filename*/); + //TODO Files.cancelUpload(/*where do we get the filename*/); OC.Notification.show(t('files', response.data.message)); $('#fileList > tr').not('[data-mime]').fadeOut(); $('#fileList > tr').not('[data-mime]').remove(); @@ -713,6 +735,32 @@ $(document).ready(function() { // display storage warnings setTimeout ( "Files.displayStorageWarnings()", 100 ); OC.Notification.setDefault(Files.displayStorageWarnings); + + // 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){ @@ -742,6 +790,7 @@ scanFiles.scanning=false; function boolOperationFinished(data, callback) { result = jQuery.parseJSON(data.responseText); + Files.updateMaxUploadFilesize(result); if(result.status == 'success'){ callback.call(); } else { diff --git a/apps/files/js/jquery-visibility.js b/apps/files/js/jquery-visibility.js new file mode 100644 index 0000000000..a824bf6873 --- /dev/null +++ b/apps/files/js/jquery-visibility.js @@ -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 it’s a `{focusin,focusout}` event (IE), `fromElement` and `toElement` should both be `null` or `undefined`; +// else, the page visibility hasn’t 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)); diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 1c0af30be5..089ce1c0a2 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -1,4 +1,7 @@ "Konnte %s nicht verschieben - Datei mit diesem Namen existiert bereits.", +"Could not move %s" => "Konnte %s nicht verschieben", +"Unable to rename file" => "Konnte Datei nicht umbenennen", "No file was uploaded. Unknown error" => "Keine Datei hochgeladen. Unbekannter Fehler", "There is no error, the file uploaded with success" => "Datei fehlerfrei hochgeladen.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Die hochgeladene Datei überschreitet die upload_max_filesize Vorgabe in php.ini", @@ -8,7 +11,7 @@ "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.", +"Invalid directory." => "Ungültiges Verzeichnis", "Files" => "Dateien", "Unshare" => "Nicht mehr freigeben", "Delete" => "Löschen", @@ -22,8 +25,8 @@ "replaced {new_name} with {old_name}" => "{old_name} ersetzt durch {new_name}", "unshared {files}" => "Freigabe von {files} aufgehoben", "deleted {files}" => "{files} gelöscht", -"'.' is an invalid file name." => "'.' ist kein gültiger Dateiname.", -"File name cannot be empty." => "Der Dateiname darf nicht leer sein.", +"'.' is an invalid file name." => "'.' ist kein gültiger Dateiname", +"File name cannot be empty." => "Der Dateiname darf nicht leer sein", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Deine Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", @@ -34,7 +37,8 @@ "{count} files uploading" => "{count} Dateien werden hochgeladen", "Upload cancelled." => "Upload abgebrochen.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dateiupload läuft. Wenn Du die Seite jetzt verlässt, wird der Upload abgebrochen.", -"URL cannot be empty." => "Die URL darf nicht leer sein.", +"URL cannot be empty." => "Die URL darf nicht leer sein", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ungültiger Verzeichnisname. Die Nutzung von \"Shared\" ist ownCloud vorbehalten.", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", "Name" => "Name", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index a7526d3564..5cd4ef7042 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -1,4 +1,7 @@ "Konnte %s nicht verschieben - Datei mit diesem Namen existiert bereits", +"Could not move %s" => "Konnte %s nicht verschieben", +"Unable to rename file" => "Konnte Datei nicht umbenennen", "No file was uploaded. Unknown error" => "Keine Datei hochgeladen. Unbekannter Fehler", "There is no error, the file uploaded with success" => "Es sind keine Fehler aufgetreten. Die Datei wurde erfolgreich hochgeladen.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Die hochgeladene Datei überschreitet die upload_max_filesize Vorgabe in php.ini", @@ -35,6 +38,7 @@ "Upload cancelled." => "Upload abgebrochen.", "File upload is in progress. Leaving the page now will cancel the upload." => "Der Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.", "URL cannot be empty." => "Die URL darf nicht leer sein.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ungültiger Verzeichnisname. Die Nutzung von \"Shared\" ist ownCloud vorbehalten", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", "Name" => "Name", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 7489d3b555..885ed3770e 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -1,4 +1,7 @@ "No se puede mover %s - Ya existe un archivo con ese nombre", +"Could not move %s" => "No se puede mover %s", +"Unable to rename file" => "No se puede renombrar el archivo", "No file was uploaded. Unknown error" => "Fallo no se subió el fichero", "There is no error, the file uploaded with success" => "No se ha producido ningún error, el archivo se ha subido con éxito", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo que intentas subir sobrepasa el tamaño definido por la variable upload_max_filesize en php.ini", diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php index 6863f701e6..650a3149e4 100644 --- a/apps/files/l10n/es_AR.php +++ b/apps/files/l10n/es_AR.php @@ -1,4 +1,7 @@ "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", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index 5bd30e95d1..c15066163c 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -1,4 +1,7 @@ "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", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index dd7df1c086..928b7cbb7e 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -1,4 +1,7 @@ "%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보다 큽니다:", @@ -35,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" => "폴더 이름이 유효하지 않습니다. ", "{count} files scanned" => "파일 {count}개 검색됨", "error while scanning" => "검색 중 오류 발생", "Name" => "이름", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 77219abcf2..48c4ac74c2 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -1,4 +1,7 @@ "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", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index b96048cf00..226dae896c 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -1,4 +1,7 @@ "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: ", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index b816311fac..afa41da521 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -1,4 +1,6 @@ "Nu s-a putut muta %s", +"Unable to rename file" => "Nu s-a putut redenumi fișierul", "No file was uploaded. Unknown error" => "Nici un fișier nu a fost încărcat. Eroare necunoscută", "There is no error, the file uploaded with success" => "Nicio eroare, fișierul a fost încărcat cu succes", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Fisierul incarcat depaseste upload_max_filesize permisi in php.ini: ", @@ -7,6 +9,8 @@ "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", "Delete" => "Șterge", @@ -20,6 +24,8 @@ "replaced {new_name} with {old_name}" => "{new_name} inlocuit cu {old_name}", "unshared {files}" => "nedistribuit {files}", "deleted {files}" => "Sterse {files}", +"'.' is an invalid file name." => "'.' este un nume invalid de fișier.", +"File name cannot be empty." => "Numele fișierului nu poate rămâne gol.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nume invalid, '\\', '/', '<', '>', ':', '\"', '|', '?' si '*' nu sunt permise.", "generating ZIP-file, it may take some time." => "se generază fișierul ZIP, va dura ceva timp.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nu s-a putut încărca fișierul tău deoarece pare să fie un director sau are 0 bytes.", @@ -31,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", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index bbbeebc93d..49ead61f67 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -1,4 +1,7 @@ "Невозможно переместить %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 +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}" => "заменено {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 байт в каталог", @@ -31,6 +38,7 @@ "Upload cancelled." => "Загрузка отменена.", "File upload is in progress. Leaving the page now will cancel the upload." => "Файл в процессе загрузки. Покинув страницу вы прервёте загрузку.", "URL cannot be empty." => "Ссылка не может быть пустой.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Неправильное имя каталога. Имя 'Shared' зарезервировано.", "{count} files scanned" => "{count} файлов просканировано", "error while scanning" => "ошибка во время санирования", "Name" => "Название", diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php index 0b26a4b174..124bb2c3b6 100644 --- a/apps/files/l10n/zh_CN.php +++ b/apps/files/l10n/zh_CN.php @@ -1,4 +1,7 @@ "无法移动 %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" => "名称", diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index a298f1ccc4..7df2afc1f5 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,10 +1,10 @@ - -
svg" - data-dir='' - style='background-image:url("")'> - -
- +
svg" + data-dir='' + style='background-image:url("")'> + +
+ - - var publicListView = true; - - var publicListView = false; - - + - 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); ?> - ' - data-permissions=''> - - style="background-image:url()" - - style="background-image:url()" - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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); ?> + ' + data-permissions=''> + + style="background-image:url()" + + style="background-image:url()" + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + t('Encryption');?> checked="checked" - id='enable_encryption' > + id='enable_encryption' />
checked="checked" + checked="checked" /> class="remove" style="visibility:hidden;" - ><?php echo $l->t('Delete'); ?>><?php echo $l->t('Delete'); ?> diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 8a546d6216..a46d017980 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,7 +1,7 @@ $(document).ready(function() { if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !publicListView) { - + FileActions.register('all', 'Share', OC.PERMISSION_READ, OC.imagePath('core', 'actions/share'), function(filename) { if ($('#dir').val() == '/') { var item = $('#dir').val() + filename; diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 487b9e7996..efd977a1b6 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -66,12 +66,12 @@ if (isset($_GET['t'])) { $type = $linkItem['item_type']; $fileSource = $linkItem['file_source']; $shareOwner = $linkItem['uid_owner']; - + if (OCP\User::userExists($shareOwner) && $fileSource != -1 ) { - + $pathAndUser = getPathAndUser($linkItem['file_source']); $fileOwner = $pathAndUser['user']; - + //if this is a reshare check the file owner also exists if ($shareOwner != $fileOwner && ! OCP\User::userExists($fileOwner)) { OCP\Util::writeLog('share', 'original file owner '.$fileOwner @@ -81,7 +81,7 @@ if (isset($_GET['t'])) { $tmpl->printPage(); exit(); } - + //mount filesystem of file owner OC_Util::setupFS($fileOwner); } @@ -104,7 +104,7 @@ if (isset($_GET['t'])) { } } $shareOwner = substr($path, 1, strpos($path, '/', 1) - 1); - + if (OCP\User::userExists($shareOwner)) { OC_Util::setupFS($shareOwner); $fileSource = getId($path); @@ -159,7 +159,7 @@ if ($linkItem) { $tmpl->printPage(); exit(); } - + } else { // Check if item id is set in session if (!isset($_SESSION['public_link_authenticated']) diff --git a/apps/files_versions/ajax/expireAll.php b/apps/files_versions/ajax/expireAll.php deleted file mode 100644 index 5c95885ffb..0000000000 --- a/apps/files_versions/ajax/expireAll.php +++ /dev/null @@ -1,44 +0,0 @@ -. - * - */ - -// 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(); - -} \ No newline at end of file diff --git a/apps/files_versions/ajax/getVersions.php b/apps/files_versions/ajax/getVersions.php index 8476e5e8a5..600e69cf79 100644 --- a/apps/files_versions/ajax/getVersions.php +++ b/apps/files_versions/ajax/getVersions.php @@ -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 ) { diff --git a/apps/files_versions/ajax/rollbackVersion.php b/apps/files_versions/ajax/rollbackVersion.php index f1b02eb4b9..f2c211d9c1 100644 --- a/apps/files_versions/ajax/rollbackVersion.php +++ b/apps/files_versions/ajax/rollbackVersion.php @@ -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 ))); } + diff --git a/apps/files_versions/history.php b/apps/files_versions/history.php index d4c278ebd8..6071240e58 100644 --- a/apps/files_versions/history.php +++ b/apps/files_versions/history.php @@ -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 ) ); diff --git a/apps/files_versions/js/settings-personal.js b/apps/files_versions/js/settings-personal.js deleted file mode 100644 index 1e6b036fda..0000000000 --- a/apps/files_versions/js/settings-personal.js +++ /dev/null @@ -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')+''); - } - ); - } - } - ); - } - ); -}); \ No newline at end of file diff --git a/apps/files_versions/l10n/ar.php b/apps/files_versions/l10n/ar.php index fea7f1c756..1f1f310040 100644 --- a/apps/files_versions/l10n/ar.php +++ b/apps/files_versions/l10n/ar.php @@ -1,8 +1,5 @@ "إنهاء تاريخ الإنتهاء لجميع الإصدارات", "History" => "السجل الزمني", -"Versions" => "الإصدارات", -"This will delete all existing backup versions of your files" => "هذه العملية ستقوم بإلغاء جميع إصدارات النسخ الاحتياطي للملفات", "Files Versioning" => "أصدرة الملفات", "Enable" => "تفعيل" ); diff --git a/apps/files_versions/l10n/bg_BG.php b/apps/files_versions/l10n/bg_BG.php index 98b5f4113a..6ecf12d0b0 100644 --- a/apps/files_versions/l10n/bg_BG.php +++ b/apps/files_versions/l10n/bg_BG.php @@ -1,6 +1,4 @@ "История", -"Versions" => "Версии", -"This will delete all existing backup versions of your files" => "Това действие ще изтрие всички налични архивни версии на Вашите файлове", "Enable" => "Включено" ); diff --git a/apps/files_versions/l10n/bn_BD.php b/apps/files_versions/l10n/bn_BD.php index 88349342fa..dffa4d79a0 100644 --- a/apps/files_versions/l10n/bn_BD.php +++ b/apps/files_versions/l10n/bn_BD.php @@ -1,8 +1,5 @@ "সমস্ত ভার্সন মেয়াদোত্তীর্ণ", "History" => "ইতিহাস", -"Versions" => "ভার্সন", -"This will delete all existing backup versions of your files" => "এটি আপনার বিদ্যমান ফাইলের সমস্ত ব্যাক-আপ ভার্সন মুছে ফেলবে।", "Files Versioning" => "ফাইল ভার্সন করা", "Enable" => "সক্রিয় " ); diff --git a/apps/files_versions/l10n/ca.php b/apps/files_versions/l10n/ca.php index 0076d02992..01e0a11687 100644 --- a/apps/files_versions/l10n/ca.php +++ b/apps/files_versions/l10n/ca.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/cs_CZ.php b/apps/files_versions/l10n/cs_CZ.php index 3995334d9e..d219c3e68d 100644 --- a/apps/files_versions/l10n/cs_CZ.php +++ b/apps/files_versions/l10n/cs_CZ.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/da.php b/apps/files_versions/l10n/da.php index bc02b47f2a..9857974764 100644 --- a/apps/files_versions/l10n/da.php +++ b/apps/files_versions/l10n/da.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/de.php b/apps/files_versions/l10n/de.php index 092bbfbff7..2fcb996de7 100644 --- a/apps/files_versions/l10n/de.php +++ b/apps/files_versions/l10n/de.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/de_DE.php b/apps/files_versions/l10n/de_DE.php index a568112d02..2fcb996de7 100644 --- a/apps/files_versions/l10n/de_DE.php +++ b/apps/files_versions/l10n/de_DE.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/el.php b/apps/files_versions/l10n/el.php index f6b9a5b299..6b189c2cdd 100644 --- a/apps/files_versions/l10n/el.php +++ b/apps/files_versions/l10n/el.php @@ -1,8 +1,5 @@ "Λήξη όλων των εκδόσεων", "History" => "Ιστορικό", -"Versions" => "Εκδόσεις", -"This will delete all existing backup versions of your files" => "Αυτό θα διαγράψει όλες τις υπάρχουσες εκδόσεις των αντιγράφων ασφαλείας των αρχείων σας", "Files Versioning" => "Εκδόσεις Αρχείων", "Enable" => "Ενεργοποίηση" ); diff --git a/apps/files_versions/l10n/eo.php b/apps/files_versions/l10n/eo.php index 0c3835373e..87b314655c 100644 --- a/apps/files_versions/l10n/eo.php +++ b/apps/files_versions/l10n/eo.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/es.php b/apps/files_versions/l10n/es.php index f6b63df7c2..4a8c34e518 100644 --- a/apps/files_versions/l10n/es.php +++ b/apps/files_versions/l10n/es.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/es_AR.php b/apps/files_versions/l10n/es_AR.php index a78264de03..74d8907fc3 100644 --- a/apps/files_versions/l10n/es_AR.php +++ b/apps/files_versions/l10n/es_AR.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/et_EE.php b/apps/files_versions/l10n/et_EE.php index f1296f23fc..ff119d5374 100644 --- a/apps/files_versions/l10n/et_EE.php +++ b/apps/files_versions/l10n/et_EE.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/eu.php b/apps/files_versions/l10n/eu.php index d84d901170..c6b4cd7692 100644 --- a/apps/files_versions/l10n/eu.php +++ b/apps/files_versions/l10n/eu.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/fi_FI.php b/apps/files_versions/l10n/fi_FI.php index 3cec4c04bf..bdce8e9fe5 100644 --- a/apps/files_versions/l10n/fi_FI.php +++ b/apps/files_versions/l10n/fi_FI.php @@ -1,8 +1,5 @@ "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ä" ); diff --git a/apps/files_versions/l10n/fr.php b/apps/files_versions/l10n/fr.php index e6dbc27445..2d26b98860 100644 --- a/apps/files_versions/l10n/fr.php +++ b/apps/files_versions/l10n/fr.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/gl.php b/apps/files_versions/l10n/gl.php index f10c1e1626..7e44b8898b 100644 --- a/apps/files_versions/l10n/gl.php +++ b/apps/files_versions/l10n/gl.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/he.php b/apps/files_versions/l10n/he.php index 061e88b0db..9eb4df6485 100644 --- a/apps/files_versions/l10n/he.php +++ b/apps/files_versions/l10n/he.php @@ -1,8 +1,5 @@ "הפגת תוקף כל הגרסאות", "History" => "היסטוריה", -"Versions" => "גרסאות", -"This will delete all existing backup versions of your files" => "פעולה זו תמחק את כל גיבויי הגרסאות הקיימים של הקבצים שלך", "Files Versioning" => "שמירת הבדלי גרסאות של קבצים", "Enable" => "הפעלה" ); diff --git a/apps/files_versions/l10n/hu_HU.php b/apps/files_versions/l10n/hu_HU.php index 1575eda3f3..95d37ad06e 100644 --- a/apps/files_versions/l10n/hu_HU.php +++ b/apps/files_versions/l10n/hu_HU.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/id.php b/apps/files_versions/l10n/id.php index d8ac66c976..6c553327c4 100644 --- a/apps/files_versions/l10n/id.php +++ b/apps/files_versions/l10n/id.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/is.php b/apps/files_versions/l10n/is.php index f63939d3af..ccb8287b71 100644 --- a/apps/files_versions/l10n/is.php +++ b/apps/files_versions/l10n/is.php @@ -1,8 +1,5 @@ "Ú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" ); diff --git a/apps/files_versions/l10n/it.php b/apps/files_versions/l10n/it.php index 0b1e70823d..c57b093011 100644 --- a/apps/files_versions/l10n/it.php +++ b/apps/files_versions/l10n/it.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/ja_JP.php b/apps/files_versions/l10n/ja_JP.php index 367152c074..c97ba3d00e 100644 --- a/apps/files_versions/l10n/ja_JP.php +++ b/apps/files_versions/l10n/ja_JP.php @@ -1,8 +1,5 @@ "すべてのバージョンを削除する", "History" => "履歴", -"Versions" => "バージョン", -"This will delete all existing backup versions of your files" => "これは、あなたのファイルのすべてのバックアップバージョンを削除します", "Files Versioning" => "ファイルのバージョン管理", "Enable" => "有効化" ); diff --git a/apps/files_versions/l10n/ko.php b/apps/files_versions/l10n/ko.php index 688babb112..f40925e1be 100644 --- a/apps/files_versions/l10n/ko.php +++ b/apps/files_versions/l10n/ko.php @@ -1,8 +1,5 @@ "모든 버전 삭제", "History" => "역사", -"Versions" => "버전", -"This will delete all existing backup versions of your files" => "이 파일의 모든 백업 버전을 삭제합니다", "Files Versioning" => "파일 버전 관리", "Enable" => "사용함" ); diff --git a/apps/files_versions/l10n/ku_IQ.php b/apps/files_versions/l10n/ku_IQ.php index 5fa3b9080d..db5dbad49f 100644 --- a/apps/files_versions/l10n/ku_IQ.php +++ b/apps/files_versions/l10n/ku_IQ.php @@ -1,8 +1,5 @@ "وه‌شانه‌کان گشتیان به‌سه‌رده‌چن", "History" => "مێژوو", -"Versions" => "وه‌شان", -"This will delete all existing backup versions of your files" => "ئه‌مه‌ سه‌رجه‌م پاڵپشتی وه‌شانه‌ هه‌بووه‌کانی په‌ڕگه‌کانت ده‌سڕینته‌وه", "Files Versioning" => "وه‌شانی په‌ڕگه", "Enable" => "چالاککردن" ); diff --git a/apps/files_versions/l10n/lt_LT.php b/apps/files_versions/l10n/lt_LT.php index 3250ddc7c3..adf4893020 100644 --- a/apps/files_versions/l10n/lt_LT.php +++ b/apps/files_versions/l10n/lt_LT.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/mk.php b/apps/files_versions/l10n/mk.php index 60a06ad338..d3ec233fe4 100644 --- a/apps/files_versions/l10n/mk.php +++ b/apps/files_versions/l10n/mk.php @@ -1,8 +1,5 @@ "Истечи ги сите верзии", "History" => "Историја", -"Versions" => "Версии", -"This will delete all existing backup versions of your files" => "Ова ќе ги избрише сите постоечки резервни копии од вашите датотеки", "Files Versioning" => "Верзии на датотеки", "Enable" => "Овозможи" ); diff --git a/apps/files_versions/l10n/nb_NO.php b/apps/files_versions/l10n/nb_NO.php index b441008db0..18c7250610 100644 --- a/apps/files_versions/l10n/nb_NO.php +++ b/apps/files_versions/l10n/nb_NO.php @@ -1,7 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/nl.php b/apps/files_versions/l10n/nl.php index f9b5507621..cd147ca693 100644 --- a/apps/files_versions/l10n/nl.php +++ b/apps/files_versions/l10n/nl.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/pl.php b/apps/files_versions/l10n/pl.php index 46c28d4590..a0247b8abc 100644 --- a/apps/files_versions/l10n/pl.php +++ b/apps/files_versions/l10n/pl.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/pt_BR.php b/apps/files_versions/l10n/pt_BR.php index 3d39a533d6..854a30e6be 100644 --- a/apps/files_versions/l10n/pt_BR.php +++ b/apps/files_versions/l10n/pt_BR.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/pt_PT.php b/apps/files_versions/l10n/pt_PT.php index 2ddf70cc6c..dc1bde08ca 100644 --- a/apps/files_versions/l10n/pt_PT.php +++ b/apps/files_versions/l10n/pt_PT.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/ro.php b/apps/files_versions/l10n/ro.php index e23e771e39..7dfaee3672 100644 --- a/apps/files_versions/l10n/ro.php +++ b/apps/files_versions/l10n/ro.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/ru.php b/apps/files_versions/l10n/ru.php index d698e90b8b..4c7fb50109 100644 --- a/apps/files_versions/l10n/ru.php +++ b/apps/files_versions/l10n/ru.php @@ -1,8 +1,5 @@ "Просрочить все версии", "History" => "История", -"Versions" => "Версии", -"This will delete all existing backup versions of your files" => "Очистить список версий ваших файлов", "Files Versioning" => "Версии файлов", "Enable" => "Включить" ); diff --git a/apps/files_versions/l10n/ru_RU.php b/apps/files_versions/l10n/ru_RU.php index 557c2f8e6d..8656e346eb 100644 --- a/apps/files_versions/l10n/ru_RU.php +++ b/apps/files_versions/l10n/ru_RU.php @@ -1,8 +1,5 @@ "Срок действия всех версий истекает", "History" => "История", -"Versions" => "Версии", -"This will delete all existing backup versions of your files" => "Это приведет к удалению всех существующих версий резервной копии Ваших файлов", "Files Versioning" => "Файлы управления версиями", "Enable" => "Включить" ); diff --git a/apps/files_versions/l10n/si_LK.php b/apps/files_versions/l10n/si_LK.php index dbddf6dc2e..37debf869b 100644 --- a/apps/files_versions/l10n/si_LK.php +++ b/apps/files_versions/l10n/si_LK.php @@ -1,8 +1,5 @@ "සියලු අනුවාද අවලංගු කරන්න", "History" => "ඉතිහාසය", -"Versions" => "අනුවාද", -"This will delete all existing backup versions of your files" => "මෙයින් ඔබගේ ගොනුවේ රක්ශිත කරනු ලැබු අනුවාද සියල්ල මකා දමනු ලැබේ", "Files Versioning" => "ගොනු අනුවාදයන්", "Enable" => "සක්‍රිය කරන්න" ); diff --git a/apps/files_versions/l10n/sk_SK.php b/apps/files_versions/l10n/sk_SK.php index 132c6c0968..a3a3567cb4 100644 --- a/apps/files_versions/l10n/sk_SK.php +++ b/apps/files_versions/l10n/sk_SK.php @@ -1,8 +1,5 @@ "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úť" ); diff --git a/apps/files_versions/l10n/sl.php b/apps/files_versions/l10n/sl.php index 22b890a042..7f386c9eda 100644 --- a/apps/files_versions/l10n/sl.php +++ b/apps/files_versions/l10n/sl.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/sv.php b/apps/files_versions/l10n/sv.php index e36164e30a..6788d1fb0f 100644 --- a/apps/files_versions/l10n/sv.php +++ b/apps/files_versions/l10n/sv.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/ta_LK.php b/apps/files_versions/l10n/ta_LK.php index f1215b3ecc..aca76dcc26 100644 --- a/apps/files_versions/l10n/ta_LK.php +++ b/apps/files_versions/l10n/ta_LK.php @@ -1,8 +1,5 @@ "எல்லா பதிப்புகளும் காலாவதியாகிவிட்டது", "History" => "வரலாறு", -"Versions" => "பதிப்புகள்", -"This will delete all existing backup versions of your files" => "உங்களுடைய கோப்புக்களில் ஏற்கனவே உள்ள ஆதாரநகல்களின் பதிப்புக்களை இவை அழித்துவிடும்", "Files Versioning" => "கோப்பு பதிப்புகள்", "Enable" => "இயலுமைப்படுத்துக" ); diff --git a/apps/files_versions/l10n/th_TH.php b/apps/files_versions/l10n/th_TH.php index 89b9f62691..e1e996903a 100644 --- a/apps/files_versions/l10n/th_TH.php +++ b/apps/files_versions/l10n/th_TH.php @@ -1,8 +1,5 @@ "หมดอายุทุกรุ่น", "History" => "ประวัติ", -"Versions" => "รุ่น", -"This will delete all existing backup versions of your files" => "นี่จะเป็นลบทิ้งไฟล์รุ่นที่ทำการสำรองข้อมูลทั้งหมดที่มีอยู่ของคุณทิ้งไป", "Files Versioning" => "การกำหนดเวอร์ชั่นของไฟล์", "Enable" => "เปิดใช้งาน" ); diff --git a/apps/files_versions/l10n/tr.php b/apps/files_versions/l10n/tr.php index 73f207d502..e9a4c4702e 100644 --- a/apps/files_versions/l10n/tr.php +++ b/apps/files_versions/l10n/tr.php @@ -1,8 +1,5 @@ "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" ); diff --git a/apps/files_versions/l10n/uk.php b/apps/files_versions/l10n/uk.php index 7532f755c8..49acda8107 100644 --- a/apps/files_versions/l10n/uk.php +++ b/apps/files_versions/l10n/uk.php @@ -1,8 +1,5 @@ "Термін дії всіх версій", "History" => "Історія", -"Versions" => "Версії", -"This will delete all existing backup versions of your files" => "Це призведе до знищення всіх існуючих збережених версій Ваших файлів", "Files Versioning" => "Версії файлів", "Enable" => "Включити" ); diff --git a/apps/files_versions/l10n/vi.php b/apps/files_versions/l10n/vi.php index 260c3b6b39..bb7163f6b1 100644 --- a/apps/files_versions/l10n/vi.php +++ b/apps/files_versions/l10n/vi.php @@ -1,8 +1,5 @@ "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 " ); diff --git a/apps/files_versions/l10n/zh_CN.GB2312.php b/apps/files_versions/l10n/zh_CN.GB2312.php index 107805221b..d9e788033a 100644 --- a/apps/files_versions/l10n/zh_CN.GB2312.php +++ b/apps/files_versions/l10n/zh_CN.GB2312.php @@ -1,8 +1,5 @@ "作废所有版本", "History" => "历史", -"Versions" => "版本", -"This will delete all existing backup versions of your files" => "这将删除所有您现有文件的备份版本", "Files Versioning" => "文件版本", "Enable" => "启用" ); diff --git a/apps/files_versions/l10n/zh_CN.php b/apps/files_versions/l10n/zh_CN.php index 48e7157c98..14301ff0c0 100644 --- a/apps/files_versions/l10n/zh_CN.php +++ b/apps/files_versions/l10n/zh_CN.php @@ -1,8 +1,5 @@ "过期所有版本", "History" => "历史", -"Versions" => "版本", -"This will delete all existing backup versions of your files" => "将会删除您的文件的所有备份版本", "Files Versioning" => "文件版本", "Enable" => "开启" ); diff --git a/apps/files_versions/l10n/zh_TW.php b/apps/files_versions/l10n/zh_TW.php index a21fdc85f8..a7b496b37d 100644 --- a/apps/files_versions/l10n/zh_TW.php +++ b/apps/files_versions/l10n/zh_TW.php @@ -1,7 +1,5 @@ "所有逾期的版本", "History" => "歷史", -"Versions" => "版本", "Files Versioning" => "檔案版本化中...", "Enable" => "啟用" ); diff --git a/apps/files_versions/lib/hooks.php b/apps/files_versions/lib/hooks.php index e897a81f7a..5fb9dc3c3c 100644 --- a/apps/files_versions/lib/hooks.php +++ b/apps/files_versions/lib/hooks.php @@ -39,15 +39,15 @@ 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,18 +58,16 @@ 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 ); + } } - + } diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 0ccaaf1095..48be5e223a 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -1,6 +1,7 @@ + * 2013 Bjoern Schiessle * 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); + 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; } } diff --git a/apps/files_versions/settings-personal.php b/apps/files_versions/settings-personal.php deleted file mode 100644 index 6555bc99c3..0000000000 --- a/apps/files_versions/settings-personal.php +++ /dev/null @@ -1,7 +0,0 @@ -fetchPage(); diff --git a/apps/files_versions/templates/settings-personal.php b/apps/files_versions/templates/settings-personal.php deleted file mode 100644 index 2b313a07c8..0000000000 --- a/apps/files_versions/templates/settings-personal.php +++ /dev/null @@ -1,12 +0,0 @@ -
-
- - t('Versions'); ?> - - -
t('This will delete all existing backup versions of your files'); ?> -
-
diff --git a/apps/files_versions/templates/settings.php b/apps/files_versions/templates/settings.php index 88063cb075..bfca8366f5 100644 --- a/apps/files_versions/templates/settings.php +++ b/apps/files_versions/templates/settings.php @@ -1,6 +1,6 @@
-
- t('Files Versioning');?> - />
-
+
+ t('Files Versioning');?> + />
+
diff --git a/apps/user_ldap/css/settings.css b/apps/user_ldap/css/settings.css index f3f41fb2d8..84ada0832a 100644 --- a/apps/user_ldap/css/settings.css +++ b/apps/user_ldap/css/settings.css @@ -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; } diff --git a/apps/user_ldap/l10n/ar.php b/apps/user_ldap/l10n/ar.php index ced0b4293b..da1710a0a3 100644 --- a/apps/user_ldap/l10n/ar.php +++ b/apps/user_ldap/l10n/ar.php @@ -1,3 +1,4 @@ "كلمة المرور" +"Password" => "كلمة المرور", +"Help" => "المساعدة" ); diff --git a/apps/user_ldap/l10n/ca.php b/apps/user_ldap/l10n/ca.php index d801ddff63..06255c1249 100644 --- a/apps/user_ldap/l10n/ca.php +++ b/apps/user_ldap/l10n/ca.php @@ -1,9 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Avís: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Avís: El mòdul PHP LDAP necessari no està instal·lat, el dorsal no funcionarà. Demaneu a l'administrador del sistema que l'instal·li.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Avís: 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à.", diff --git a/apps/user_ldap/l10n/cs_CZ.php b/apps/user_ldap/l10n/cs_CZ.php index 0c14ebb9d1..80e27f1e62 100644 --- a/apps/user_ldap/l10n/cs_CZ.php +++ b/apps/user_ldap/l10n/cs_CZ.php @@ -1,9 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Varování: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Varování: není nainstalován LDAP modul pro PHP, podpůrná vrstva nebude fungovat. Požádejte, prosím, správce systému aby jej nainstaloval.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Varování: 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.", diff --git a/apps/user_ldap/l10n/de.php b/apps/user_ldap/l10n/de.php index 87579cb243..89bda8af97 100644 --- a/apps/user_ldap/l10n/de.php +++ b/apps/user_ldap/l10n/de.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Warnung: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Warnung: 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", diff --git a/apps/user_ldap/l10n/de_DE.php b/apps/user_ldap/l10n/de_DE.php index f986ae83e8..82877b5ca1 100644 --- a/apps/user_ldap/l10n/de_DE.php +++ b/apps/user_ldap/l10n/de_DE.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Warnung: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Warnung: Das PHP-Modul, das LDAP benöntigt, ist nicht installiert. Das Backend wird 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", diff --git a/apps/user_ldap/l10n/el.php b/apps/user_ldap/l10n/el.php index 8c421cf162..1f75a687a5 100644 --- a/apps/user_ldap/l10n/el.php +++ b/apps/user_ldap/l10n/el.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Προσοχή: Οι εφαρμογές user_ldap και user_webdavauth είναι ασύμβατες. Μπορεί να αντιμετωπίσετε απρόβλεπτη συμπεριφορά. Παρακαλώ ζητήστε από τον διαχειριστή συστήματος να απενεργοποιήσει μία από αυτές.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Προσοχή: Το PHP LDAP module που απαιτείται δεν είναι εγκατεστημένο και ο μηχανισμός δεν θα λειτουργήσει. Παρακαλώ ζητήστε από τον διαχειριστή του συστήματος να το εγκαταστήσει.", "Host" => "Διακομιστής", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Μπορείτε να παραλείψετε το πρωτόκολλο, εκτός αν απαιτείται SSL. Σε αυτή την περίπτωση ξεκινήστε με ldaps://", "Base DN" => "Base DN", diff --git a/apps/user_ldap/l10n/es.php b/apps/user_ldap/l10n/es.php index 4931af79ea..48e7b24734 100644 --- a/apps/user_ldap/l10n/es.php +++ b/apps/user_ldap/l10n/es.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Advertencia: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Advertencia: 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", diff --git a/apps/user_ldap/l10n/es_AR.php b/apps/user_ldap/l10n/es_AR.php index 0b1340d439..331bf8699f 100644 --- a/apps/user_ldap/l10n/es_AR.php +++ b/apps/user_ldap/l10n/es_AR.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Advertencia: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Advertencia: 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", diff --git a/apps/user_ldap/l10n/eu.php b/apps/user_ldap/l10n/eu.php index 06ca9cb294..7290dabbef 100644 --- a/apps/user_ldap/l10n/eu.php +++ b/apps/user_ldap/l10n/eu.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Abisua: user_ldap eta user_webdavauth aplikazioak bateraezinak dira. Portaera berezia izan dezakezu. Mesedez eskatu zure sistema kudeatzaileari bietako bat desgaitzeko.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Abisua: 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", diff --git a/apps/user_ldap/l10n/fr.php b/apps/user_ldap/l10n/fr.php index 9750d1352a..dd2fb08091 100644 --- a/apps/user_ldap/l10n/fr.php +++ b/apps/user_ldap/l10n/fr.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Avertissement: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Avertissement: 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", diff --git a/apps/user_ldap/l10n/gl.php b/apps/user_ldap/l10n/gl.php index ae05efcd27..d60521c4a0 100644 --- a/apps/user_ldap/l10n/gl.php +++ b/apps/user_ldap/l10n/gl.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Aviso: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Aviso: 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", diff --git a/apps/user_ldap/l10n/he.php b/apps/user_ldap/l10n/he.php new file mode 100644 index 0000000000..d33ecaadf0 --- /dev/null +++ b/apps/user_ldap/l10n/he.php @@ -0,0 +1,12 @@ + "מארח", +"User DN" => "DN משתמש", +"Password" => "סיסמא", +"For anonymous access, leave DN and Password empty." => "לגישה אנונימית, השאר את הDM והסיסמא ריקים.", +"User Login Filter" => "סנן כניסת משתמש", +"User List Filter" => "סנן רשימת משתמשים", +"Group Filter" => "סנן קבוצה", +"in bytes" => "בבתים", +"in seconds. A change empties the cache." => "בשניות. שינוי מרוקן את המטמון.", +"Help" => "עזרה" +); diff --git a/apps/user_ldap/l10n/hr.php b/apps/user_ldap/l10n/hr.php new file mode 100644 index 0000000000..9150331506 --- /dev/null +++ b/apps/user_ldap/l10n/hr.php @@ -0,0 +1,3 @@ + "Pomoć" +); diff --git a/apps/user_ldap/l10n/hu_HU.php b/apps/user_ldap/l10n/hu_HU.php index 577afcef1c..aae29d057e 100644 --- a/apps/user_ldap/l10n/hu_HU.php +++ b/apps/user_ldap/l10n/hu_HU.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Figyelem: 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.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Figyelem: 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", diff --git a/apps/user_ldap/l10n/ia.php b/apps/user_ldap/l10n/ia.php new file mode 100644 index 0000000000..3586bf5a2e --- /dev/null +++ b/apps/user_ldap/l10n/ia.php @@ -0,0 +1,3 @@ + "Adjuta" +); diff --git a/apps/user_ldap/l10n/it.php b/apps/user_ldap/l10n/it.php index 915ce3af5b..bee30cfe6e 100644 --- a/apps/user_ldap/l10n/it.php +++ b/apps/user_ldap/l10n/it.php @@ -1,9 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Avviso: le applicazioni user_ldap e user_webdavauth sono incompatibili. Potresti riscontrare un comportamento inatteso. Chiedi al tuo amministratore di sistema di disabilitarne uno.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Avviso: il modulo PHP LDAP richiesto non è installato, il motore non funzionerà. Chiedi al tuo amministratore di sistema di installarlo.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Avviso: 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à.", diff --git a/apps/user_ldap/l10n/ja_JP.php b/apps/user_ldap/l10n/ja_JP.php index c7b2a0f91b..1c93db7ba0 100644 --- a/apps/user_ldap/l10n/ja_JP.php +++ b/apps/user_ldap/l10n/ja_JP.php @@ -1,9 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "警告: user_ldap と user_webdavauth のアプリには互換性がありません。予期せぬ動作をする可能姓があります。システム管理者にどちらかを無効にするよう問い合わせてください。", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "警告: PHP LDAP モジュールがインストールされていません。バックエンドが正しくどうさしません。システム管理者にインストールするよう問い合わせてください。", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "警告: 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接続に利用しないでください、失敗します。", diff --git a/apps/user_ldap/l10n/ka_GE.php b/apps/user_ldap/l10n/ka_GE.php new file mode 100644 index 0000000000..630d92b73a --- /dev/null +++ b/apps/user_ldap/l10n/ka_GE.php @@ -0,0 +1,3 @@ + "დახმარება" +); diff --git a/apps/user_ldap/l10n/ko.php b/apps/user_ldap/l10n/ko.php index 37ac3d1bda..c0d09b5c3c 100644 --- a/apps/user_ldap/l10n/ko.php +++ b/apps/user_ldap/l10n/ko.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "경고user_ldap 앱과 user_webdavauth 앱은 호환되지 않습니다. 오동작을 일으킬 수 있으므로, 시스템 관리자에게 요청하여, 둘 중 하나를 비활성화 하시기 바랍니다.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "경고PHP LDAP 모듈이 설치되지 않았습니다. 백엔드가 동작하지 않을 것 입니다. 시스템관리자에게 요청하여 해당 모듈을 설치하시기 바랍니다.", "Host" => "호스트", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "SSL을 사용하는 경우가 아니라면 프로토콜을 입력하지 않아도 됩니다. SSL을 사용하려면 ldaps://를 입력하십시오.", "Base DN" => "기본 DN", diff --git a/apps/user_ldap/l10n/ku_IQ.php b/apps/user_ldap/l10n/ku_IQ.php new file mode 100644 index 0000000000..1ae808ddd9 --- /dev/null +++ b/apps/user_ldap/l10n/ku_IQ.php @@ -0,0 +1,3 @@ + "یارمەتی" +); diff --git a/apps/user_ldap/l10n/lb.php b/apps/user_ldap/l10n/lb.php new file mode 100644 index 0000000000..2926538b5b --- /dev/null +++ b/apps/user_ldap/l10n/lb.php @@ -0,0 +1,3 @@ + "Hëllef" +); diff --git a/apps/user_ldap/l10n/lv.php b/apps/user_ldap/l10n/lv.php new file mode 100644 index 0000000000..52353472e4 --- /dev/null +++ b/apps/user_ldap/l10n/lv.php @@ -0,0 +1,3 @@ + "Palīdzība" +); diff --git a/apps/user_ldap/l10n/mk.php b/apps/user_ldap/l10n/mk.php index 70a62e7176..4c231b516d 100644 --- a/apps/user_ldap/l10n/mk.php +++ b/apps/user_ldap/l10n/mk.php @@ -1,5 +1,6 @@ "Домаќин", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Може да го скокнете протколот освен ако не ви треба SSL. Тогаш ставете ldaps://", -"Password" => "Лозинка" +"Password" => "Лозинка", +"Help" => "Помош" ); diff --git a/apps/user_ldap/l10n/ms_MY.php b/apps/user_ldap/l10n/ms_MY.php new file mode 100644 index 0000000000..077a5390cf --- /dev/null +++ b/apps/user_ldap/l10n/ms_MY.php @@ -0,0 +1,3 @@ + "Bantuan" +); diff --git a/apps/user_ldap/l10n/nl.php b/apps/user_ldap/l10n/nl.php index 23e9a15c01..27c4407360 100644 --- a/apps/user_ldap/l10n/nl.php +++ b/apps/user_ldap/l10n/nl.php @@ -1,11 +1,12 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Waarschuwing: De Apps user_ldap en user_webdavauth zijn incompatible. U kunt onverwacht gedrag ervaren. Vraag uw beheerder om een van beide apps de deactiveren.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Waarschuwing: De PHP LDAP module is niet geïnstalleerd, de backend zal dus niet werken. Vraag uw beheerder de module te installeren.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Waarschuwing: De PHP LDAP module is niet geïnstalleerd, het backend zal niet werken. Vraag uw systeembeheerder om de module te installeren.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Je kunt het protocol weglaten, tenzij je SSL vereist. Start in dat geval met ldaps://", -"Base DN" => "Basis DN", -"You can specify Base DN for users and groups in the Advanced tab" => "Je kunt het standaard DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", -"User DN" => "Gebruikers DN", +"Base DN" => "Base DN", +"One Base DN per line" => "Een Base DN per regel", +"You can specify Base DN for users and groups in the Advanced tab" => "Je kunt het Base DN voor gebruikers en groepen specificeren in het tab Geavanceerd.", +"User DN" => "User 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." => "De DN van de client gebruiker waarmee de verbinding zal worden gemaakt, bijv. uid=agent,dc=example,dc=com. Voor anonieme toegang laat je het DN en het wachtwoord leeg.", "Password" => "Wachtwoord", "For anonymous access, leave DN and Password empty." => "Voor anonieme toegang, laat de DN en het wachtwoord leeg.", @@ -20,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "zonder een placeholder, bijv. \"objectClass=posixGroup\"", "Port" => "Poort", "Base User Tree" => "Basis Gebruikers Structuur", +"One User Base DN per line" => "Een User Base DN per regel", "Base Group Tree" => "Basis Groupen Structuur", +"One Group Base DN per line" => "Een Group Base DN per regel", "Group-Member association" => "Groepslid associatie", "Use TLS" => "Gebruik TLS", "Do not use it for SSL connections, it will fail." => "Gebruik niet voor SSL connecties, deze mislukken.", diff --git a/apps/user_ldap/l10n/nn_NO.php b/apps/user_ldap/l10n/nn_NO.php new file mode 100644 index 0000000000..54d1f158f6 --- /dev/null +++ b/apps/user_ldap/l10n/nn_NO.php @@ -0,0 +1,3 @@ + "Hjelp" +); diff --git a/apps/user_ldap/l10n/oc.php b/apps/user_ldap/l10n/oc.php new file mode 100644 index 0000000000..0bf27d74f2 --- /dev/null +++ b/apps/user_ldap/l10n/oc.php @@ -0,0 +1,3 @@ + "Ajuda" +); diff --git a/apps/user_ldap/l10n/pl.php b/apps/user_ldap/l10n/pl.php index 0a3dea14c9..55110b8a83 100644 --- a/apps/user_ldap/l10n/pl.php +++ b/apps/user_ldap/l10n/pl.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Ostrzeżenie: Aplikacje user_ldap i user_webdavauth nie są kompatybilne. Mogą powodować nieoczekiwane zachowanie. Poproś administratora o wyłączenie jednej z nich.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Ostrzeżenie: Moduł PHP LDAP nie jest zainstalowany i nie będzie działał. Poproś administratora o włączenie go.", "Host" => "Host", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Można pominąć protokół, z wyjątkiem wymaganego protokołu SSL. Następnie uruchom z ldaps://", "Base DN" => "Baza DN", diff --git a/apps/user_ldap/l10n/pt_PT.php b/apps/user_ldap/l10n/pt_PT.php index 1b21b899a2..9059f17876 100644 --- a/apps/user_ldap/l10n/pt_PT.php +++ b/apps/user_ldap/l10n/pt_PT.php @@ -1,9 +1,10 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Aviso: A aplicação user_ldap e user_webdavauth são incompativeis. A aplicação pode tornar-se instável. Por favor, peça ao seu administrador para desactivar uma das aplicações.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Aviso: O módulo PHP LDAP necessário não está instalado, o backend não irá funcionar. Peça ao seu administrador para o instalar.", +"Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "Aviso: O módulo PHP LDAP não está instalado, logo não irá funcionar. Por favor peça ao administrador para o instalar.", "Host" => "Anfitrião", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Pode omitir o protocolo, excepto se necessitar de SSL. Neste caso, comece com ldaps://", "Base DN" => "DN base", +"One Base DN per line" => "Uma base DN por linho", "You can specify Base DN for users and groups in the Advanced tab" => "Pode especificar o ND Base para utilizadores e grupos no separador Avançado", "User DN" => "DN do utilizador", "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." => "O DN to cliente ", @@ -20,7 +21,9 @@ "without any placeholder, e.g. \"objectClass=posixGroup\"." => "Sem nenhuma variável. Exemplo: \"objectClass=posixGroup\".", "Port" => "Porto", "Base User Tree" => "Base da árvore de utilizadores.", +"One User Base DN per line" => "Uma base de utilizador DN por linha", "Base Group Tree" => "Base da árvore de grupos.", +"One Group Base DN per line" => "Uma base de grupo DN por linha", "Group-Member association" => "Associar utilizador ao grupo.", "Use TLS" => "Usar TLS", "Do not use it for SSL connections, it will fail." => "Não use para ligações SSL, irá falhar.", diff --git a/apps/user_ldap/l10n/ro.php b/apps/user_ldap/l10n/ro.php index b4d7d4902f..3ab336cfff 100644 --- a/apps/user_ldap/l10n/ro.php +++ b/apps/user_ldap/l10n/ro.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Atentie: Apps user_ldap si user_webdavauth sunt incompatibile. Este posibil sa experimentati un comportament neasteptat. Vă rugăm să întrebați administratorul de sistem pentru a dezactiva una dintre ele.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Atentie: "Gazdă", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Puteți omite protocolul, decât dacă folosiți SSL. Atunci se începe cu ldaps://", "Base DN" => "DN de bază", diff --git a/apps/user_ldap/l10n/ru.php b/apps/user_ldap/l10n/ru.php index f41a0b0583..42fba32f43 100644 --- a/apps/user_ldap/l10n/ru.php +++ b/apps/user_ldap/l10n/ru.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Внимание:Приложения user_ldap и user_webdavauth несовместимы. Вы можете столкнуться с неожиданным поведением. Пожалуйста, обратитесь к системному администратору, чтобы отключить одно из них.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Внимание: Необходимый PHP LDAP модуль не установлен, внутренний интерфейс не будет работать. Пожалуйста, обратитесь к системному администратору, чтобы установить его.", "Host" => "Сервер", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Можно опустить протокол, за исключением того, когда вам требуется SSL. Тогда начните с ldaps :/ /", "Base DN" => "Базовый DN", diff --git a/apps/user_ldap/l10n/ru_RU.php b/apps/user_ldap/l10n/ru_RU.php index 09d7899249..64ba1176f6 100644 --- a/apps/user_ldap/l10n/ru_RU.php +++ b/apps/user_ldap/l10n/ru_RU.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Предупреждение: Приложения user_ldap и user_webdavauth несовместимы. Вы можете столкнуться с неожиданным поведением системы. Пожалуйста, обратитесь к системному администратору для отключения одного из них.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Предупреждение: Необходимый PHP LDAP-модуль не установлен, backend не будет работать. Пожалуйста, обратитесь к системному администратору, чтобы установить его.", "Host" => "Хост", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Вы можете пропустить протокол, если Вам не требуется SSL. Затем начните с ldaps://", "Base DN" => "База DN", diff --git a/apps/user_ldap/l10n/sl.php b/apps/user_ldap/l10n/sl.php index 1d1fc33a83..247f2bfdcb 100644 --- a/apps/user_ldap/l10n/sl.php +++ b/apps/user_ldap/l10n/sl.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Opozorilo: Aplikaciji user_ldap in user_webdavauth nista združljivi. Morda boste opazili nepričakovano obnašanje sistema. Prosimo, prosite vašega skrbnika, da eno od aplikacij onemogoči.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Opozorilo: PHP LDAP modul mora biti nameščen, sicer ta vmesnik ne bo deloval. Prosimo, prosite vašega skrbnika, če ga namesti.", "Host" => "Gostitelj", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Protokol je lahko izpuščen, če ni posebej zahtevan SSL. V tem primeru se mora naslov začeti z ldaps://", "Base DN" => "Osnovni DN", diff --git a/apps/user_ldap/l10n/sr.php b/apps/user_ldap/l10n/sr.php new file mode 100644 index 0000000000..fff39aadc2 --- /dev/null +++ b/apps/user_ldap/l10n/sr.php @@ -0,0 +1,3 @@ + "Помоћ" +); diff --git a/apps/user_ldap/l10n/sr@latin.php b/apps/user_ldap/l10n/sr@latin.php new file mode 100644 index 0000000000..9150331506 --- /dev/null +++ b/apps/user_ldap/l10n/sr@latin.php @@ -0,0 +1,3 @@ + "Pomoć" +); diff --git a/apps/user_ldap/l10n/sv.php b/apps/user_ldap/l10n/sv.php index e8e14af7ac..1e36ff91ba 100644 --- a/apps/user_ldap/l10n/sv.php +++ b/apps/user_ldap/l10n/sv.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Varning: Apps user_ldap och user_webdavauth är inkompatibla. Oväntade problem kan uppstå. Be din systemadministratör att inaktivera en av dom.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Varning: PHP LDAP-modulen måste vara installerad, serversidan kommer inte att fungera. Be din systemadministratör att installera den.", "Host" => "Server", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Du behöver inte ange protokoll förutom om du använder SSL. Starta då med ldaps://", "Base DN" => "Start DN", diff --git a/apps/user_ldap/l10n/uk.php b/apps/user_ldap/l10n/uk.php index f82e9f2a42..d617d93926 100644 --- a/apps/user_ldap/l10n/uk.php +++ b/apps/user_ldap/l10n/uk.php @@ -1,6 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "Увага: Застосунки user_ldap та user_webdavauth не сумісні. Ви можете зіткнутися з несподіваною поведінкою. Будь ласка, зверніться до системного адміністратора, щоб відключити одну з них.", -"Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it." => "Увага: Потрібний модуль PHP LDAP не встановлено, базова програма працювати не буде. Будь ласка, зверніться до системного адміністратора, щоб встановити його.", "Host" => "Хост", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "Можна не вказувати протокол, якщо вам не потрібен SSL. Тоді почніть з ldaps://", "Base DN" => "Базовий DN", diff --git a/apps/user_ldap/l10n/zh_CN.php b/apps/user_ldap/l10n/zh_CN.php index bb961d534b..ed5041eff0 100644 --- a/apps/user_ldap/l10n/zh_CN.php +++ b/apps/user_ldap/l10n/zh_CN.php @@ -1,4 +1,5 @@ Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them." => "警告:应用 user_ldap 和 user_webdavauth 不兼容。您可能遭遇未预料的行为。请垂询您的系统管理员禁用其中一个。", "Host" => "主机", "You can omit the protocol, except you require SSL. Then start with ldaps://" => "可以忽略协议,但如要使用SSL,则需以ldaps://开头", "Base DN" => "Base DN", @@ -31,6 +32,7 @@ "Group Display Name Field" => "组显示名称字段", "The LDAP attribute to use to generate the groups`s ownCloud name." => "用来生成组的ownCloud名称的LDAP属性", "in bytes" => "字节数", +"in seconds. A change empties the cache." => "以秒计。修改将清空缓存。", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "将用户名称留空(默认)。否则指定一个LDAP/AD属性", "Help" => "帮助" ); diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index f888577aed..422e43fc00 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -114,6 +114,15 @@ abstract class Access { * @return the sanitized DN */ private function sanitizeDN($dn) { + //treating multiple base DNs + if(is_array($dn)) { + $result = array(); + foreach($dn as $singleDN) { + $result[] = $this->sanitizeDN($singleDN); + } + return $result; + } + //OID sometimes gives back DNs with whitespace after the comma a la "uid=foo, cn=bar, dn=..." We need to tackle this! $dn = preg_replace('/([^\\\]),(\s+)/u', '\1,', $dn); @@ -212,9 +221,13 @@ abstract class Access { * returns the internal ownCloud name for the given LDAP DN of the group, false on DN outside of search DN or failure */ public function dn2groupname($dn, $ldapname = null) { - if(mb_strripos($dn, $this->sanitizeDN($this->connection->ldapBaseGroups), 0, 'UTF-8') !== (mb_strlen($dn, 'UTF-8')-mb_strlen($this->sanitizeDN($this->connection->ldapBaseGroups), 'UTF-8'))) { + //To avoid bypassing the base DN settings under certain circumstances + //with the group support, check whether the provided DN matches one of + //the given Bases + if(!$this->isDNPartOfBase($dn, $this->connection->ldapBaseGroups)) { return false; } + return $this->dn2ocname($dn, $ldapname, false); } @@ -227,9 +240,13 @@ abstract class Access { * returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN or failure */ public function dn2username($dn, $ldapname = null) { - if(mb_strripos($dn, $this->sanitizeDN($this->connection->ldapBaseUsers), 0, 'UTF-8') !== (mb_strlen($dn, 'UTF-8')-mb_strlen($this->sanitizeDN($this->connection->ldapBaseUsers), 'UTF-8'))) { + //To avoid bypassing the base DN settings under certain circumstances + //with the group support, check whether the provided DN matches one of + //the given Bases + if(!$this->isDNPartOfBase($dn, $this->connection->ldapBaseUsers)) { return false; } + return $this->dn2ocname($dn, $ldapname, true); } @@ -521,7 +538,7 @@ abstract class Access { /** * @brief executes an LDAP search * @param $filter the LDAP filter for the search - * @param $base the LDAP subtree that shall be searched + * @param $base an array containing the LDAP subtree(s) that shall be searched * @param $attr optional, when a certain attribute shall be filtered out * @returns array with the search result * @@ -544,18 +561,28 @@ abstract class Access { //check wether paged search should be attempted $pagedSearchOK = $this->initPagedSearch($filter, $base, $attr, $limit, $offset); - $sr = ldap_search($link_resource, $base, $filter, $attr); - if(!$sr) { + $linkResources = array_pad(array(), count($base), $link_resource); + $sr = ldap_search($linkResources, $base, $filter, $attr); + $error = ldap_errno($link_resource); + if(!is_array($sr) || $error > 0) { \OCP\Util::writeLog('user_ldap', 'Error when searching: '.ldap_error($link_resource).' code '.ldap_errno($link_resource), \OCP\Util::ERROR); \OCP\Util::writeLog('user_ldap', 'Attempt for Paging? '.print_r($pagedSearchOK, true), \OCP\Util::ERROR); return array(); } - $findings = ldap_get_entries($link_resource, $sr ); + $findings = array(); + foreach($sr as $key => $res) { + $findings = array_merge($findings, ldap_get_entries($link_resource, $res )); + } if($pagedSearchOK) { \OCP\Util::writeLog('user_ldap', 'Paged search successful', \OCP\Util::INFO); - ldap_control_paged_result_response($link_resource, $sr, $cookie); - \OCP\Util::writeLog('user_ldap', 'Set paged search cookie '.$cookie, \OCP\Util::INFO); - $this->setPagedResultCookie($filter, $limit, $offset, $cookie); + foreach($sr as $key => $res) { + $cookie = null; + if(ldap_control_paged_result_response($link_resource, $res, $cookie)) { + \OCP\Util::writeLog('user_ldap', 'Set paged search cookie', \OCP\Util::INFO); + $this->setPagedResultCookie($base[$key], $filter, $limit, $offset, $cookie); + } + } + //browsing through prior pages to get the cookie for the new one if($skipHandling) { return; @@ -565,7 +592,9 @@ abstract class Access { $this->pagedSearchedSuccessful = true; } } else { - \OCP\Util::writeLog('user_ldap', 'Paged search failed :(', \OCP\Util::INFO); + if(!is_null($limit)) { + \OCP\Util::writeLog('user_ldap', 'Paged search failed :(', \OCP\Util::INFO); + } } // if we're here, probably no connection resource is returned. @@ -791,20 +820,41 @@ abstract class Access { return str_replace('\\5c', '\\', $dn); } + /** + * @brief checks if the given DN is part of the given base DN(s) + * @param $dn the DN + * @param $bases array containing the allowed base DN or DNs + * @returns Boolean + */ + private function isDNPartOfBase($dn, $bases) { + $bases = $this->sanitizeDN($bases); + foreach($bases as $base) { + $belongsToBase = true; + if(mb_strripos($dn, $base, 0, 'UTF-8') !== (mb_strlen($dn, 'UTF-8')-mb_strlen($base))) { + $belongsToBase = false; + } + if($belongsToBase) { + break; + } + } + return $belongsToBase; + } + /** * @brief get a cookie for the next LDAP paged search + * @param $base a string with the base DN for the search * @param $filter the search filter to identify the correct search * @param $limit the limit (or 'pageSize'), to identify the correct search well * @param $offset the offset for the new search to identify the correct search really good * @returns string containing the key or empty if none is cached */ - private function getPagedResultCookie($filter, $limit, $offset) { + private function getPagedResultCookie($base, $filter, $limit, $offset) { if($offset == 0) { return ''; } $offset -= $limit; //we work with cache here - $cachekey = 'lc' . dechex(crc32($filter)) . '-' . $limit . '-' . $offset; + $cachekey = 'lc' . crc32($base) . '-' . crc32($filter) . '-' . $limit . '-' . $offset; $cookie = $this->connection->getFromCache($cachekey); if(is_null($cookie)) { $cookie = ''; @@ -814,15 +864,16 @@ abstract class Access { /** * @brief set a cookie for LDAP paged search run + * @param $base a string with the base DN for the search * @param $filter the search filter to identify the correct search * @param $limit the limit (or 'pageSize'), to identify the correct search well * @param $offset the offset for the run search to identify the correct search really good * @param $cookie string containing the cookie returned by ldap_control_paged_result_response * @return void */ - private function setPagedResultCookie($filter, $limit, $offset) { + private function setPagedResultCookie($base, $filter, $limit, $offset, $cookie) { if(!empty($cookie)) { - $cachekey = 'lc' . dechex(crc32($filter)) . '-' . $limit . '-' . $offset; + $cachekey = 'lc' . dechex(crc32($base)) . '-' . dechex(crc32($filter)) . '-' .$limit . '-' . $offset; $cookie = $this->connection->writeToCache($cachekey, $cookie); } } @@ -841,40 +892,47 @@ abstract class Access { /** * @brief prepares a paged search, if possible * @param $filter the LDAP filter for the search - * @param $base the LDAP subtree that shall be searched + * @param $bases an array containing the LDAP subtree(s) that shall be searched * @param $attr optional, when a certain attribute shall be filtered outside * @param $limit * @param $offset * */ - private function initPagedSearch($filter, $base, $attr, $limit, $offset) { + private function initPagedSearch($filter, $bases, $attr, $limit, $offset) { $pagedSearchOK = false; if($this->connection->hasPagedResultSupport && !is_null($limit)) { $offset = intval($offset); //can be null - \OCP\Util::writeLog('user_ldap', 'initializing paged search for Filter'.$filter.' base '.$base.' attr '.print_r($attr, true). ' limit ' .$limit.' offset '.$offset, \OCP\Util::DEBUG); + \OCP\Util::writeLog('user_ldap', 'initializing paged search for Filter'.$filter.' base '.print_r($bases, true).' attr '.print_r($attr, true). ' limit ' .$limit.' offset '.$offset, \OCP\Util::INFO); //get the cookie from the search for the previous search, required by LDAP - $cookie = $this->getPagedResultCookie($filter, $limit, $offset); - if(empty($cookie) && ($offset > 0)) { - //no cookie known, although the offset is not 0. Maybe cache run out. We need to start all over *sigh* (btw, Dear Reader, did you need LDAP paged searching was designed by MSFT?) - $reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit; - //a bit recursive, $offset of 0 is the exit - \OCP\Util::writeLog('user_ldap', 'Looking for cookie L/O '.$limit.'/'.$reOffset, \OCP\Util::INFO); - $this->search($filter, $base, $attr, $limit, $reOffset, true); - $cookie = $this->getPagedResultCookie($filter, $limit, $offset); - //still no cookie? obviously, the server does not like us. Let's skip paging efforts. - //TODO: remember this, probably does not change in the next request... - if(empty($cookie)) { - $cookie = null; + foreach($bases as $base) { + + $cookie = $this->getPagedResultCookie($base, $filter, $limit, $offset); + if(empty($cookie) && ($offset > 0)) { + //no cookie known, although the offset is not 0. Maybe cache run out. We need to start all over *sigh* (btw, Dear Reader, did you need LDAP paged searching was designed by MSFT?) + $reOffset = ($offset - $limit) < 0 ? 0 : $offset - $limit; + //a bit recursive, $offset of 0 is the exit + \OCP\Util::writeLog('user_ldap', 'Looking for cookie L/O '.$limit.'/'.$reOffset, \OCP\Util::INFO); + $this->search($filter, $base, $attr, $limit, $reOffset, true); + $cookie = $this->getPagedResultCookie($base, $filter, $limit, $offset); + //still no cookie? obviously, the server does not like us. Let's skip paging efforts. + //TODO: remember this, probably does not change in the next request... + if(empty($cookie)) { + $cookie = null; + } } - } - if(!is_null($cookie)) { - if($offset > 0) { - \OCP\Util::writeLog('user_ldap', 'Cookie '.$cookie, \OCP\Util::INFO); + if(!is_null($cookie)) { + if($offset > 0) { + \OCP\Util::writeLog('user_ldap', 'Cookie '.$cookie, \OCP\Util::INFO); + } + $pagedSearchOK = ldap_control_paged_result($this->connection->getConnectionResource(), $limit, false, $cookie); + if(!$pagedSearchOK) { + return false; + } + \OCP\Util::writeLog('user_ldap', 'Ready for a paged search', \OCP\Util::INFO); + } else { + \OCP\Util::writeLog('user_ldap', 'No paged search for us, Cpt., Limit '.$limit.' Offset '.$offset, \OCP\Util::INFO); } - $pagedSearchOK = ldap_control_paged_result($this->connection->getConnectionResource(), $limit, false, $cookie); - \OCP\Util::writeLog('user_ldap', 'Ready for a paged search', \OCP\Util::INFO); - } else { - \OCP\Util::writeLog('user_ldap', 'No paged search for us, Cpt., Limit '.$limit.' Offset '.$offset, \OCP\Util::INFO); + } } diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php index b14cdafff8..7046cbbfc7 100644 --- a/apps/user_ldap/lib/connection.php +++ b/apps/user_ldap/lib/connection.php @@ -187,9 +187,9 @@ class Connection { $this->config['ldapPort'] = \OCP\Config::getAppValue($this->configID, 'ldap_port', 389); $this->config['ldapAgentName'] = \OCP\Config::getAppValue($this->configID, 'ldap_dn', ''); $this->config['ldapAgentPassword'] = base64_decode(\OCP\Config::getAppValue($this->configID, 'ldap_agent_password', '')); - $this->config['ldapBase'] = \OCP\Config::getAppValue($this->configID, 'ldap_base', ''); - $this->config['ldapBaseUsers'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_users', $this->config['ldapBase']); - $this->config['ldapBaseGroups'] = \OCP\Config::getAppValue($this->configID, 'ldap_base_groups', $this->config['ldapBase']); + $this->config['ldapBase'] = preg_split('/\r\n|\r|\n/', \OCP\Config::getAppValue($this->configID, 'ldap_base', '')); + $this->config['ldapBaseUsers'] = preg_split('/\r\n|\r|\n/', \OCP\Config::getAppValue($this->configID, 'ldap_base_users', $this->config['ldapBase'])); + $this->config['ldapBaseGroups'] = preg_split('/\r\n|\r|\n/', \OCP\Config::getAppValue($this->configID, 'ldap_base_groups', $this->config['ldapBase'])); $this->config['ldapTLS'] = \OCP\Config::getAppValue($this->configID, 'ldap_tls', 0); $this->config['ldapNoCase'] = \OCP\Config::getAppValue($this->configID, 'ldap_nocase', 0); $this->config['turnOffCertCheck'] = \OCP\Config::getAppValue($this->configID, 'ldap_turn_off_cert_check', 0); diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 8522d2f835..b24c6e2f02 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -8,12 +8,12 @@ echo '

'.$l->t('Warning: Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behaviour. Please ask your system administrator to disable one of them.').'

'; } if(!function_exists('ldap_connect')) { - echo '

'.$l->t('Warning: The PHP LDAP module needs is not installed, the backend will not work. Please ask your system administrator to install it.').'

'; + echo '

'.$l->t('Warning: The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it.').'

'; } ?>

-

+


t('use %%uid placeholder, e.g. "uid=%%uid"');?>

@@ -22,8 +22,8 @@

-

-

+

+

title="t('Do not use it for SSL connections, it will fail.');?>" />

>

diff --git a/apps/user_webdavauth/l10n/bn_BD.php b/apps/user_webdavauth/l10n/bn_BD.php index 773e7f7eb7..5366552efa 100644 --- a/apps/user_webdavauth/l10n/bn_BD.php +++ b/apps/user_webdavauth/l10n/bn_BD.php @@ -1,4 +1,3 @@ "URL:http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." +"URL: http://" => "URL:http://" ); diff --git a/apps/user_webdavauth/l10n/ca.php b/apps/user_webdavauth/l10n/ca.php index 84a6c599e7..7ac540f213 100644 --- a/apps/user_webdavauth/l10n/ca.php +++ b/apps/user_webdavauth/l10n/ca.php @@ -1,4 +1,5 @@ "Autenticació WebDAV", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud enviarà les credencials d'usuari a aquesta URL. S'interpretarà http 401 i http 403 com a credencials incorrectes i tots els altres codis com a credencials correctes." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud enviarà les credencials d'usuari a aquesta URL. Aquest endollable en comprova la resposta i interpretarà els codis d'estat 401 i 403 com a credencials no vàlides, i qualsevol altra resposta com a credencials vàlides." ); diff --git a/apps/user_webdavauth/l10n/cs_CZ.php b/apps/user_webdavauth/l10n/cs_CZ.php index 5cb9b4c370..9bd4c96a2b 100644 --- a/apps/user_webdavauth/l10n/cs_CZ.php +++ b/apps/user_webdavauth/l10n/cs_CZ.php @@ -1,4 +1,5 @@ "Ověření WebDAV", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud odešle přihlašovací údaje uživatele na URL a z návratové hodnoty určí stav přihlášení. Http 401 a 403 vyhodnotí jako neplatné údaje a všechny ostatní jako úspěšné přihlášení." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud odešle uživatelské údaje na zadanou URL. Plugin zkontroluje odpověď a považuje návratovou hodnotu HTTP 401 a 403 za neplatné údaje a všechny ostatní hodnoty jako platné přihlašovací údaje." ); diff --git a/apps/user_webdavauth/l10n/da.php b/apps/user_webdavauth/l10n/da.php index 7d9ee1d5b2..245a510134 100644 --- a/apps/user_webdavauth/l10n/da.php +++ b/apps/user_webdavauth/l10n/da.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud vil sende brugeroplysningerne til denne webadresse er fortolker http 401 og http 403 som brugeroplysninger forkerte og alle andre koder som brugeroplysninger korrekte." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/de.php b/apps/user_webdavauth/l10n/de.php index 8589dc0c4f..f893bddc71 100644 --- a/apps/user_webdavauth/l10n/de.php +++ b/apps/user_webdavauth/l10n/de.php @@ -1,4 +1,5 @@ "WebDAV Authentifikation", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud wird die Logindaten zu dieser URL senden. http 401 und http 403 werden als falsche Logindaten interpretiert und alle anderen Codes als korrekte Logindaten." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud wird die Benutzer-Anmeldedaten an diese URL schicken. Dieses Plugin prüft die Anmeldedaten auf ihre Gültigkeit und interpretiert die HTTP Statusfehler 401 und 403 als ungültige, sowie alle Anderen als gültige Anmeldedaten." ); diff --git a/apps/user_webdavauth/l10n/de_DE.php b/apps/user_webdavauth/l10n/de_DE.php index 3d73dccfe8..8f67575fc0 100644 --- a/apps/user_webdavauth/l10n/de_DE.php +++ b/apps/user_webdavauth/l10n/de_DE.php @@ -1,4 +1,5 @@ "WebDAV Authentifizierung", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud " +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud sendet die Benutzerdaten an diese URL. Dieses Plugin prüft die Antwort und wird die Statuscodes 401 und 403 als ungültige Daten interpretieren und alle anderen Antworten als gültige Daten." ); diff --git a/apps/user_webdavauth/l10n/el.php b/apps/user_webdavauth/l10n/el.php index bf4c11af64..951709c4d6 100644 --- a/apps/user_webdavauth/l10n/el.php +++ b/apps/user_webdavauth/l10n/el.php @@ -1,4 +1,5 @@ "Αυθεντικοποίηση μέσω WebDAV ", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "Το ownCloud θα στείλει τα συνθηματικά χρήστη σε αυτό το URL, μεταφράζοντας τα http 401 και http 403 ως λανθασμένα συνθηματικά και όλους τους άλλους κωδικούς ως σωστά συνθηματικά." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "Το ownCloud θα στείλει τα διαπιστευτήρια χρήστη σε αυτό το URL. Αυτό το plugin ελέγχει την απάντηση και την μετατρέπει σε HTTP κωδικό κατάστασης 401 και 403 για μη έγκυρα, όλες οι υπόλοιπες απαντήσεις είναι έγκυρες." ); diff --git a/apps/user_webdavauth/l10n/es.php b/apps/user_webdavauth/l10n/es.php index 3975b04cbc..245a510134 100644 --- a/apps/user_webdavauth/l10n/es.php +++ b/apps/user_webdavauth/l10n/es.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud enviará al usuario las interpretaciones 401 y 403 a esta URL como incorrectas y todas las otras credenciales como correctas" +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/es_AR.php b/apps/user_webdavauth/l10n/es_AR.php index 0606d3a8eb..245a510134 100644 --- a/apps/user_webdavauth/l10n/es_AR.php +++ b/apps/user_webdavauth/l10n/es_AR.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud enviará las credenciales a esta dirección, si son interpretadas como http 401 o http 403 las credenciales son erroneas; todos los otros códigos indican que las credenciales son correctas." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/eu.php b/apps/user_webdavauth/l10n/eu.php index bbda9f10ba..245a510134 100644 --- a/apps/user_webdavauth/l10n/eu.php +++ b/apps/user_webdavauth/l10n/eu.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud erabiltzailearen kredentzialak helbide honetara bidaliko ditu. http 401 eta http 403 kredentzial ez zuzenak bezala hartuko dira eta beste kode guztiak kredentzial zuzentzat hartuko dira." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/gl.php b/apps/user_webdavauth/l10n/gl.php index fa81db333d..245a510134 100644 --- a/apps/user_webdavauth/l10n/gl.php +++ b/apps/user_webdavauth/l10n/gl.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud enviará as credenciais do usuario a este URL, http 401 e http 403 interpretanse como credenciais incorrectas e todos os outros códigos como credenciais correctas." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/hu_HU.php b/apps/user_webdavauth/l10n/hu_HU.php index 75a23ed7be..245a510134 100644 --- a/apps/user_webdavauth/l10n/hu_HU.php +++ b/apps/user_webdavauth/l10n/hu_HU.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "Az ownCloud rendszer erre a címre fogja elküldeni a felhasználók bejelentkezési adatait. Ha 401-es vagy 403-as http kódot kap vissza, azt sikertelen azonosításként fogja értelmezni, minden más kódot sikeresnek fog tekinteni." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/is.php b/apps/user_webdavauth/l10n/is.php index 13d9a1fe8f..8fe0d974b3 100644 --- a/apps/user_webdavauth/l10n/is.php +++ b/apps/user_webdavauth/l10n/is.php @@ -1,4 +1,3 @@ "Vefslóð: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud mun senda auðkenni notenda á þessa vefslóð og túkla svörin http 401 og http 403 sem rangar auðkenniupplýsingar og öll önnur svör sem rétt." +"URL: http://" => "Vefslóð: http://" ); diff --git a/apps/user_webdavauth/l10n/it.php b/apps/user_webdavauth/l10n/it.php index b0abf2f208..a7cd6e8e4b 100644 --- a/apps/user_webdavauth/l10n/it.php +++ b/apps/user_webdavauth/l10n/it.php @@ -1,4 +1,5 @@ "Autenticazione WebDAV", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud invierà le credenziali dell'utente a questo URL. Interpreta i codici http 401 e http 403 come credenziali errate e tutti gli altri codici come credenziali corrette." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud invierà le credenziali dell'utente a questo URL. Questa estensione controlla la risposta e interpreta i codici di stato 401 e 403 come credenziali non valide, e tutte le altre risposte come credenziali valide." ); diff --git a/apps/user_webdavauth/l10n/ja_JP.php b/apps/user_webdavauth/l10n/ja_JP.php index 8643805ffc..1cd14a03c7 100644 --- a/apps/user_webdavauth/l10n/ja_JP.php +++ b/apps/user_webdavauth/l10n/ja_JP.php @@ -1,4 +1,5 @@ "WebDAV 認証", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloudのこのURLへのユーザ資格情報の送信は、資格情報が間違っている場合はHTTP401もしくは403を返し、正しい場合は全てのコードを返します。" +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloudはこのURLにユーザ資格情報を送信します。このプラグインは応答をチェックし、HTTP状態コードが 401 と 403 の場合は無効な資格情報とし、他の応答はすべて有効な資格情報として処理します。" ); diff --git a/apps/user_webdavauth/l10n/ko.php b/apps/user_webdavauth/l10n/ko.php index a806df750f..245a510134 100644 --- a/apps/user_webdavauth/l10n/ko.php +++ b/apps/user_webdavauth/l10n/ko.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud는 이 URL로 유저 인증을 보내게 되며, http 401 과 http 403은 인증 오류로, 그 외 코드는 인증이 올바른 것으로 해석합니다." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/nl.php b/apps/user_webdavauth/l10n/nl.php index 687442fb66..7d1bb33923 100644 --- a/apps/user_webdavauth/l10n/nl.php +++ b/apps/user_webdavauth/l10n/nl.php @@ -1,4 +1,5 @@ "WebDAV authenticatie", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud zal de inloggegevens naar deze URL als geïnterpreteerde http 401 en http 403 als de inloggegevens onjuist zijn. Andere codes als de inloggegevens correct zijn." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud stuurt de inloggegevens naar deze URL. Deze plugin controleert het antwoord en interpreteert de HTTP statuscodes 401 als 403 als ongeldige inloggegevens, maar alle andere antwoorden als geldige inloggegevens." ); diff --git a/apps/user_webdavauth/l10n/pl.php b/apps/user_webdavauth/l10n/pl.php index 245a510134..4887e93531 100644 --- a/apps/user_webdavauth/l10n/pl.php +++ b/apps/user_webdavauth/l10n/pl.php @@ -1,3 +1,5 @@ "URL: http://" +"WebDAV Authentication" => "Uwierzytelnienie WebDAV", +"URL: http://" => "URL: http://", +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "ownCloud wyśle dane uwierzytelniające do tego URL. Ten plugin sprawdza odpowiedź i zinterpretuje kody HTTP 401 oraz 403 jako nieprawidłowe dane uwierzytelniające, a każdy inny kod odpowiedzi jako poprawne dane." ); diff --git a/apps/user_webdavauth/l10n/pt_PT.php b/apps/user_webdavauth/l10n/pt_PT.php index e8bfcfda81..d7e87b5c8d 100644 --- a/apps/user_webdavauth/l10n/pt_PT.php +++ b/apps/user_webdavauth/l10n/pt_PT.php @@ -1,4 +1,5 @@ "Autenticação WebDAV", "URL: http://" => "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "O ownCloud vai enviar as credenciais para este URL. Todos os códigos http 401 e 403 serão interpretados como credenciais inválidas, todos os restantes códigos http serão interpretados como credenciais correctas." +"ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "O ownCloud vai enviar as credenciais do utilizador através deste URL. Este plugin verifica a resposta e vai interpretar os códigos de estado HTTP 401 e 403 como credenciais inválidas, e todas as outras como válidas." ); diff --git a/apps/user_webdavauth/l10n/ro.php b/apps/user_webdavauth/l10n/ro.php index 17157da044..245a510134 100644 --- a/apps/user_webdavauth/l10n/ro.php +++ b/apps/user_webdavauth/l10n/ro.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "owncloud va trimite acreditatile de utilizator pentru a interpreta aceasta pagina. Http 401 si Http 403 are acreditarile si orice alt cod gresite ca acreditarile corecte" +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/sl.php b/apps/user_webdavauth/l10n/sl.php index 8f4effc81a..245a510134 100644 --- a/apps/user_webdavauth/l10n/sl.php +++ b/apps/user_webdavauth/l10n/sl.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud bo poslal uporabniška poverila temu URL naslovu. Pri tem bo interpretiral http 401 in http 403 odgovor kot spodletelo avtentikacijo ter vse ostale http odgovore kot uspešne." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/sv.php b/apps/user_webdavauth/l10n/sv.php index b7a7e4ea2d..245a510134 100644 --- a/apps/user_webdavauth/l10n/sv.php +++ b/apps/user_webdavauth/l10n/sv.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud kommer att skicka inloggningsuppgifterna till denna URL och tolkar http 401 och http 403 som fel och alla andra koder som korrekt." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/l10n/uk.php b/apps/user_webdavauth/l10n/uk.php index 57aa90684a..245a510134 100644 --- a/apps/user_webdavauth/l10n/uk.php +++ b/apps/user_webdavauth/l10n/uk.php @@ -1,4 +1,3 @@ "URL: http://", -"ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct." => "ownCloud відправить облікові дані на цей URL та буде інтерпретувати http 401 і http 403, як невірні облікові дані, а всі інші коди, як вірні." +"URL: http://" => "URL: http://" ); diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php index 62ed45fd27..880b77ac95 100755 --- a/apps/user_webdavauth/templates/settings.php +++ b/apps/user_webdavauth/templates/settings.php @@ -1,8 +1,8 @@
- WebDAV Authentication + t('WebDAV Authentication');?>

-
t('ownCloud will send the user credentials to this URL is interpret http 401 and http 403 as credentials wrong and all other codes as credentials correct.'); ?> +
t('ownCloud will send the user credentials to this URL. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials.'); ?>

diff --git a/config/config.sample.php b/config/config.sample.php index b1655d0283..dafb536fa6 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -36,12 +36,6 @@ $CONFIG = array( /* The automatic protocol detection of ownCloud can fail in certain reverse proxy situations. This option allows to manually override the protocol detection. For example "https" */ "overwriteprotocol" => "", -/* Enhanced auth forces users to enter their password again when performing potential sensitive actions like creating or deleting users */ -"enhancedauth" => true, - -/* Time in seconds how long an user is authenticated without entering his password again before performing sensitive actions like creating or deleting users etc...*/ -"enhancedauthtime" => 15 * 60, - /* A proxy to use to connect to the internet. For example "myproxy.org:88" */ "proxy" => "", @@ -129,12 +123,12 @@ $CONFIG = array( 'path'=> '/var/www/owncloud/apps', 'url' => '/apps', 'writable' => true, - ), - ), - 'user_backends'=>array( - array( - 'class'=>'OC_User_IMAP', - 'arguments'=>array('{imap.gmail.com:993/imap/ssl}INBOX') - ) - ) + ), +), +'user_backends'=>array( + array( + 'class'=>'OC_User_IMAP', + 'arguments'=>array('{imap.gmail.com:993/imap/ssl}INBOX') + ) +) ); diff --git a/core/css/multiselect.css b/core/css/multiselect.css index 99f0e03933..31c8ef88eb 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -5,15 +5,25 @@ ul.multiselectoptions { background-color:#fff; border:1px solid #ddd; - border-bottom-left-radius:.5em; - border-bottom-right-radius:.5em; border-top:none; box-shadow:0 1px 1px #ddd; padding-top:.5em; position:absolute; + max-height: 20em; + overflow-y: auto; z-index:49; } + ul.multiselectoptions.down { + border-bottom-left-radius:.5em; + border-bottom-right-radius:.5em; + } + + ul.multiselectoptions.up { + border-top-left-radius:.5em; + border-top-right-radius:.5em; + } + ul.multiselectoptions>li { overflow:hidden; white-space:nowrap; @@ -30,11 +40,20 @@ div.multiselect.active { background-color:#fff; + position:relative; + z-index:50; + } + + div.multiselect.up { + border-top:0 none; + border-top-left-radius:0; + border-top-right-radius:0; + } + + div.multiselect.down { border-bottom:none; border-bottom-left-radius:0; border-bottom-right-radius:0; - position:relative; - z-index:50; } div.multiselect>span:first-child { diff --git a/core/css/styles.css b/core/css/styles.css index fa7241c7f6..9939cbf928 100644 --- a/core/css/styles.css +++ b/core/css/styles.css @@ -94,7 +94,8 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b /* CONTENT ------------------------------------------------------------------ */ #controls { padding:0 0.5em; width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; } #controls .button { display:inline-block; } -#content { top:3.5em; left:12.5em; position:absolute; } +#content { height: 100%; width: 100%; position: relative; } +#content-wrapper { height: 100%; width: 100%; padding-top: 3.5em; padding-left: 12.5em; box-sizing: border-box; -moz-box-sizing: border-box; position: absolute;} #leftcontent, .leftcontent { position:fixed; overflow:auto; top:6.4em; width:20em; background:#f8f8f8; border-right:1px solid #ddd; } #leftcontent li, .leftcontent li { background:#f8f8f8; padding:.5em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 200ms; -moz-transition:background-color 200ms; -o-transition:background-color 200ms; transition:background-color 200ms; } #leftcontent li:hover, #leftcontent li:active, #leftcontent li.active, .leftcontent li:hover, .leftcontent li:active, .leftcontent li.active { background:#eee; } diff --git a/core/js/js.js b/core/js/js.js index e724be9c2d..3160159e28 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -536,6 +536,7 @@ function fillHeight(selector) { if(selector.outerHeight() > selector.height()){ selector.css('height', height-(selector.outerHeight()-selector.height()) + 'px'); } + console.warn("This function is deprecated! Use CSS instead"); } /** @@ -551,17 +552,11 @@ function fillWindow(selector) { if(selector.outerWidth() > selector.width()){ selector.css('width', width-(selector.outerWidth()-selector.width()) + 'px'); } + console.warn("This function is deprecated! Use CSS instead"); } $(document).ready(function(){ - $(window).resize(function () { - fillHeight($('#leftcontent')); - fillWindow($('#content')); - fillWindow($('#rightcontent')); - }); - $(window).trigger('resize'); - if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg replaceSVG(); }else{ diff --git a/core/js/multiselect.js b/core/js/multiselect.js index c4fd74b047..623c6e0f7e 100644 --- a/core/js/multiselect.js +++ b/core/js/multiselect.js @@ -1,20 +1,44 @@ +/** + * @param 'createCallback' A function to be called when a new entry is created. Two arguments are supplied to this function: + * The select element used and the value of the option. If the function returns false addition will be cancelled. If it returns + * anything else it will be used as the value of the newly added option. + * @param 'createText' The placeholder text for the create action. + * @param 'title' The title to show if no options are selected. + * @param 'checked' An array containing values for options that should be checked. Any options which are already selected will be added to this array. + * @param 'labels' The corresponding labels to show for the checked items. + * @param 'oncheck' Callback function which will be called when a checkbox/radiobutton is selected. If the function returns false the input will be unchecked. + * @param 'onuncheck' @see 'oncheck'. + * @param 'singleSelect' If true radiobuttons will be used instead of checkboxes. + */ (function( $ ){ var multiSelectId=-1; - $.fn.multiSelect=function(options){ + $.fn.multiSelect=function(options) { multiSelectId++; var settings = { 'createCallback':false, 'createText':false, + 'singleSelect':false, + 'selectedFirst':false, + 'sort':true, 'title':this.attr('title'), 'checked':[], + 'labels':[], 'oncheck':false, 'onuncheck':false, 'minWidth': 'default;', }; + $(this).attr('data-msid', multiSelectId); $.extend(settings,options); - $.each(this.children(),function(i,option){ - if($(option).attr('selected') && settings.checked.indexOf($(option).val())==-1){ + $.each(this.children(),function(i,option) { + // If the option is selected, but not in the checked array, add it. + if($(option).attr('selected') && settings.checked.indexOf($(option).val()) === -1) { settings.checked.push($(option).val()); + settings.labels.push($(option).text().trim()); + } + // If the option is in the checked array but not selected, select it. + else if(settings.checked.indexOf($(option).val()) !== -1 && !$(option).attr('selected')) { + $(option).attr('selected', 'selected'); + settings.labels.push($(option).text().trim()); } }); var button=$('
'+settings.title+'
'); @@ -24,24 +48,36 @@ button.selectedItems=[]; this.hide(); this.before(span); - if(settings.minWidth=='default'){ + if(settings.minWidth=='default') { settings.minWidth=button.width(); } button.css('min-width',settings.minWidth); settings.minOuterWidth=button.outerWidth()-2; button.data('settings',settings); - if(settings.checked.length>0){ - button.children('span').first().text(settings.checked.join(', ')); + + if(!settings.singleSelect && settings.checked.length>0) { + button.children('span').first().text(settings.labels.join(', ')); + } else if(settings.singleSelect) { + button.children('span').first().text(this.find(':selected').text()); } + var self = this; + self.menuDirection = 'down'; button.click(function(event){ var button=$(this); - if(button.parent().children('ul').length>0){ - button.parent().children('ul').slideUp(400,function(){ - button.parent().children('ul').remove(); - button.removeClass('active'); - }); + if(button.parent().children('ul').length>0) { + if(self.menuDirection === 'down') { + button.parent().children('ul').slideUp(400,function() { + button.parent().children('ul').remove(); + button.removeClass('active down'); + }); + } else { + button.parent().children('ul').fadeOut(400,function() { + button.parent().children('ul').remove(); + button.removeClass('active up'); + }); + } return; } var lists=$('ul.multiselectoptions'); @@ -54,49 +90,69 @@ event.stopPropagation(); var options=$(this).parent().next().children(); var list=$('
    ').hide().appendTo($(this).parent()); - function createItem(element,checked){ + var inputType = settings.singleSelect ? 'radio' : 'checkbox'; + function createItem(element, checked){ element=$(element); var item=element.val(); var id='ms'+multiSelectId+'-option-'+item; - var input=$(''); + var input=$(''); input.attr('id',id); + if(settings.singleSelect) { + input.attr('name', 'ms'+multiSelectId+'-option'); + } var label=$('