diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 10:40:06 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-09-16 10:40:06 +0200 |
commit | 534d93d2d3d549039db2661cdc4b9e939a0abe0d (patch) | |
tree | 7868026ba14b6558c8e50b601a9a5fa85fdc585b /apps | |
parent | f8563ec5831713b341db1b2cd480328912818607 (diff) | |
parent | 46f59b165e5bd1908509e8a62b67bf983cfd6224 (diff) | |
download | nextcloud-server-534d93d2d3d549039db2661cdc4b9e939a0abe0d.tar.gz nextcloud-server-534d93d2d3d549039db2661cdc4b9e939a0abe0d.zip |
Merge branch 'master' into sharing_mail_notification_master
Conflicts:
apps/files/index.php
Diffstat (limited to 'apps')
126 files changed, 1175 insertions, 645 deletions
diff --git a/apps/files/ajax/list.php b/apps/files/ajax/list.php index c50e96b2429..f1b713b5534 100644 --- a/apps/files/ajax/list.php +++ b/apps/files/ajax/list.php @@ -10,35 +10,38 @@ OCP\JSON::checkLoggedIn(); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; + +if (!\OC\Files\Filesystem::is_dir($dir . '/')) { + header("HTTP/1.0 404 Not Found"); + exit(); +} + $doBreadcrumb = isset($_GET['breadcrumb']); $data = array(); +$baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir='; + +$permissions = \OCA\files\lib\Helper::getDirPermissions($dir); // Make breadcrumb if($doBreadcrumb) { - $breadcrumb = array(); - $pathtohere = "/"; - foreach( explode( "/", $dir ) as $i ) { - if( $i != "" ) { - $pathtohere .= "$i/"; - $breadcrumb[] = array( "dir" => $pathtohere, "name" => $i ); - } - } - - $breadcrumbNav = new OCP\Template( "files", "part.breadcrumb", "" ); - $breadcrumbNav->assign( "breadcrumb", $breadcrumb, false ); + $breadcrumb = \OCA\files\lib\Helper::makeBreadcrumb($dir); + + $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); + $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); + $breadcrumbNav->assign('baseURL', $baseUrl); $data['breadcrumb'] = $breadcrumbNav->fetchPage(); } // make filelist -$files = array(); -foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $i ) { - $i["date"] = OCP\Util::formatDate($i["mtime"] ); - $files[] = $i; -} - -$list = new OCP\Template( "files", "part.list", "" ); -$list->assign( "files", $files, false ); -$data = array('files' => $list->fetchPage()); +$files = \OCA\files\lib\Helper::getFiles($dir); + +$list = new OCP\Template("files", "part.list", ""); +$list->assign('files', $files, false); +$list->assign('baseURL', $baseUrl, false); +$list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/'))); +$list->assign('isPublic', false); +$data['files'] = $list->fetchPage(); +$data['permissions'] = $permissions; OCP\JSON::success(array('data' => $data)); diff --git a/apps/files/ajax/rawlist.php b/apps/files/ajax/rawlist.php index f568afad4da..9ccd4cc299a 100644 --- a/apps/files/ajax/rawlist.php +++ b/apps/files/ajax/rawlist.php @@ -11,22 +11,54 @@ OCP\JSON::checkLoggedIn(); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; -$mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : ''; +$mimetypes = isset($_GET['mimetypes']) ? json_decode($_GET['mimetypes'], true) : ''; + +// Clean up duplicates from array and deal with non-array requests +if (is_array($mimetypes)) { + $mimetypes = array_unique($mimetypes); +} elseif (is_null($mimetypes)) { + $mimetypes = array($_GET['mimetypes']); +} // make filelist $files = array(); // If a type other than directory is requested first load them. -if($mimetype && strpos($mimetype, 'httpd/unix-directory') === false) { - foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, 'httpd/unix-directory' ) as $i ) { - $i["date"] = OCP\Util::formatDate($i["mtime"] ); - $i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']); - $files[] = $i; +if($mimetypes && !in_array('httpd/unix-directory', $mimetypes)) { + foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, 'httpd/unix-directory' ) as $file ) { + $file['directory'] = $dir; + $file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); + $file["date"] = OCP\Util::formatDate($file["mtime"]); + $file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); + $files[] = $file; } } -foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, $mimetype ) as $i ) { - $i["date"] = OCP\Util::formatDate($i["mtime"] ); - $i['mimetype_icon'] = $i['type'] == 'dir' ? \mimetype_icon('dir'): \mimetype_icon($i['mimetype']); - $files[] = $i; + +if (is_array($mimetypes) && count($mimetypes)) { + foreach ($mimetypes as $mimetype) { + foreach( \OC\Files\Filesystem::getDirectoryContent( $dir, $mimetype ) as $file ) { + $file['directory'] = $dir; + $file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); + $file["date"] = OCP\Util::formatDate($file["mtime"]); + $file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); + $files[] = $file; + } + } +} else { + foreach( \OC\Files\Filesystem::getDirectoryContent( $dir ) as $file ) { + $file['directory'] = $dir; + $file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']); + $file["date"] = OCP\Util::formatDate($file["mtime"]); + $file['mimetype_icon'] = \OCA\files\lib\Helper::determineIcon($file); + $files[] = $file; + } } -OCP\JSON::success(array('data' => $files)); +// Sort by name +usort($files, function ($a, $b) { + if ($a['name'] === $b['name']) { + return 0; + } + return ($a['name'] < $b['name']) ? -1 : 1; +}); + +OC_JSON::success(array('data' => $files)); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 02a73ba83e5..41d9808c56b 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -69,11 +69,11 @@ /* FILE TABLE */ #filestable { position: relative; top:37px; width:100%; } -tbody tr { background-color:#fff; height:2.5em; } -tbody tr:hover, tbody tr:active { +#filestable tbody tr { background-color:#fff; height:2.5em; } +#filestable tbody tr:hover, tbody tr:active { background-color: rgb(240,240,240); } -tbody tr.selected { +#filestable tbody tr.selected { background-color: rgb(230,230,230); } tbody a { color:#000; } @@ -190,10 +190,15 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } #fileList tr:hover td.filename>input[type="checkbox"]:first-child, #fileList tr td.filename>input[type="checkbox"]:checked:first-child, #fileList tr.selected td.filename>input[type="checkbox"]:first-child { + opacity: 1; +} +.lte9 #fileList tr:hover td.filename>input[type="checkbox"]:first-child, +.lte9 #fileList tr td.filename>input[type="checkbox"][checked=checked]:first-child, +.lte9 #fileList tr.selected td.filename>input[type="checkbox"]:first-child { -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter: alpha(opacity=100); - opacity: 1; } + /* Use label to have bigger clickable size for checkbox */ #fileList tr td.filename>input[type="checkbox"] + label, #select_all + label { @@ -331,3 +336,25 @@ table.dragshadow td.size { text-align: center; margin-left: -200px; } +.mask { + z-index: 50; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: white; + background-repeat: no-repeat no-repeat; + background-position: 50%; + opacity: 0.7; + filter: alpha(opacity=70); + transition: opacity 100ms; + -moz-transition: opacity 100ms; + -o-transition: opacity 100ms; + -ms-transition: opacity 100ms; + -webkit-transition: opacity 100ms; +} +.mask.transparent{ + opacity: 0; +} + diff --git a/apps/files/index.php b/apps/files/index.php index 28ec1681fc6..d9377550eb2 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -41,79 +41,58 @@ if (!\OC\Files\Filesystem::is_dir($dir . '/')) { exit(); } -function fileCmp($a, $b) { - if ($a['type'] == 'dir' and $b['type'] != 'dir') { - return -1; - } elseif ($a['type'] != 'dir' and $b['type'] == 'dir') { - return 1; - } else { - return strnatcasecmp($a['name'], $b['name']); +$isIE8 = false; +preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); +if (count($matches) > 0 && $matches[1] <= 8){ + $isIE8 = true; +} + +// if IE8 and "?dir=path" was specified, reformat the URL to use a hash like "#?dir=path" +if ($isIE8 && isset($_GET['dir'])){ + if ($dir === ''){ + $dir = '/'; } + header('Location: ' . OCP\Util::linkTo('files', 'index.php') . '#?dir=' . \OCP\Util::encodePath($dir)); + exit(); } +$ajaxLoad = false; $files = array(); $user = OC_User::getUser(); if (\OC\Files\Cache\Upgrade::needUpgrade($user)) { //dont load anything if we need to upgrade the cache - $content = array(); $needUpgrade = true; $freeSpace = 0; } else { - $content = \OC\Files\Filesystem::getDirectoryContent($dir); + if ($isIE8){ + // after the redirect above, the URL will have a format + // like "files#?dir=path" which means that no path was given + // (dir is not set). In that specific case, we don't return any + // files because the client will take care of switching the dir + // to the one from the hash, then ajax-load the initial file list + $files = array(); + $ajaxLoad = true; + } + else{ + $files = \OCA\files\lib\Helper::getFiles($dir); + } $freeSpace = \OC\Files\Filesystem::free_space($dir); $needUpgrade = false; } -foreach ($content 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'] = ''; - } - } - $i['directory'] = $dir; - $i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']); - $files[] = $i; -} - -usort($files, "fileCmp"); // Make breadcrumb -$breadcrumb = array(); -$pathtohere = ''; -foreach (explode('/', $dir) as $i) { - if ($i != '') { - $pathtohere .= '/' . $i; - $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); - } -} +$breadcrumb = \OCA\files\lib\Helper::makeBreadcrumb($dir); // make breadcrumb und filelist markup $list = new OCP\Template('files', 'part.list', ''); $list->assign('files', $files); $list->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir='); $list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/'))); -$list->assign('disableSharing', false); $list->assign('isPublic', false); $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb); $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir='); -$permissions = OCP\PERMISSION_READ; -if (\OC\Files\Filesystem::isCreatable($dir . '/')) { - $permissions |= OCP\PERMISSION_CREATE; -} -if (\OC\Files\Filesystem::isUpdatable($dir . '/')) { - $permissions |= OCP\PERMISSION_UPDATE; -} -if (\OC\Files\Filesystem::isDeletable($dir . '/')) { - $permissions |= OCP\PERMISSION_DELETE; -} -if (\OC\Files\Filesystem::isSharable($dir . '/')) { - $permissions |= OCP\PERMISSION_SHARE; -} +$permissions = \OCA\files\lib\Helper::getDirPermissions($dir); if ($needUpgrade) { OCP\Util::addscript('files', 'upgrade'); @@ -154,5 +133,8 @@ if ($needUpgrade) { $tmpl->assign('publicUploadEnabled', $publicUploadEnabled); $tmpl->assign("encryptedFiles", \OCP\Util::encryptedFiles()); $tmpl->assign("mailNotificationEnabled", \OC_Appconfig::getValue('core', 'shareapi_allow_mail_notification', 'yes')); + $tmpl->assign('disableSharing', false); + $tmpl->assign('ajaxLoad', $ajaxLoad); + $tmpl->printPage(); } diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index e9b07518bab..aeb2da90d5f 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -46,6 +46,15 @@ $(document).ready(function() { $('#uploadprogresswrapper input.stop').show(); } }, + submit: function(e, data) { + if ( ! data.formData ) { + // noone set update parameters, we set the minimum + data.formData = { + requesttoken: oc_requesttoken, + dir: $('#dir').val() + }; + } + }, /** * called after the first add, does NOT have the data param * @param e @@ -141,15 +150,8 @@ $(document).ready(function() { $('#uploadprogressbar').fadeOut(); } }; - var file_upload_handler = function() { - $('#file_upload_start').fileupload(file_upload_param); - }; - - - - if ( document.getElementById('data-upload-form') ) { - $(file_upload_handler); - } + $('#file_upload_start').fileupload(file_upload_param); + $.assocArraySize = function(obj) { // http://stackoverflow.com/a/6700/11236 var size = 0, key; @@ -344,6 +346,9 @@ $(document).ready(function() { } var li=form.parent(); form.remove(); + /* workaround for IE 9&10 click event trap, 2 lines: */ + $('input').first().focus(); + $('#content').focus(); li.append('<p>'+li.data('text')+'</p>'); $('#new>a').click(); }); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 097fe521aa6..330fe86f6b3 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -196,13 +196,12 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () { FileList.rename(filename); }); - FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) { - var dir = $('#dir').val(); + var dir = $('#dir').val() || '/'; if (dir !== '/') { dir = dir + '/'; } - window.location = OC.linkTo('files', 'index.php') + '?dir=' + encodeURIComponent(dir + filename); + FileList.changeDirectory(dir + filename); }); FileActions.setDefault('dir', 'Open'); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 29be5e0d362..b50d46c98d3 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1,7 +1,28 @@ var FileList={ useUndo:true, + postProcessList: function(){ + $('#fileList tr').each(function(){ + //little hack to set unescape filenames in attribute + $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); + }); + }, update:function(fileListHtml) { - $('#fileList').empty().html(fileListHtml); + var $fileList = $('#fileList'), + permissions = $('#permissions').val(), + isCreatable = (permissions & OC.PERMISSION_CREATE) !== 0; + $fileList.empty().html(fileListHtml); + $('#emptycontent').toggleClass('hidden', !isCreatable || $fileList.find('tr').length > 0); + $fileList.find('tr').each(function () { + FileActions.display($(this).children('td.filename')); + }); + $fileList.trigger(jQuery.Event("fileActionsReady")); + FileList.postProcessList(); + // "Files" might not be loaded in extending apps + if (window.Files){ + Files.setupDragAndDrop(); + } + FileList.updateFileSummary(); + $fileList.trigger(jQuery.Event("updated")); }, createRow:function(type, name, iconurl, linktarget, size, lastModified, permissions){ var td, simpleSize, basename, extension; @@ -134,20 +155,109 @@ var FileList={ FileActions.display(tr.find('td.filename')); return tr; }, - refresh:function(data) { - var result = jQuery.parseJSON(data.responseText); + /** + * @brief Changes the current directory and reload the file list. + * @param targetDir target directory (non URL encoded) + * @param changeUrl false if the URL must not be changed (defaults to true) + */ + changeDirectory: function(targetDir, changeUrl, force){ + var $dir = $('#dir'), + url, + currentDir = $dir.val() || '/'; + targetDir = targetDir || '/'; + if (!force && currentDir === targetDir){ + return; + } + FileList.setCurrentDir(targetDir, changeUrl); + FileList.reload(); + }, + linkTo: function(dir){ + return OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/'); + }, + setCurrentDir: function(targetDir, changeUrl){ + $('#dir').val(targetDir); + if (changeUrl !== false){ + if (window.history.pushState && changeUrl !== false){ + url = FileList.linkTo(targetDir); + window.history.pushState({dir: targetDir}, '', url); + } + // use URL hash for IE8 + else{ + window.location.hash = '?dir='+ encodeURIComponent(targetDir).replace(/%2F/g, '/'); + } + } + }, + /** + * @brief Reloads the file list using ajax call + */ + reload: function(){ + FileList.showMask(); + if (FileList._reloadCall){ + FileList._reloadCall.abort(); + } + FileList._reloadCall = $.ajax({ + url: OC.filePath('files','ajax','list.php'), + data: { + dir : $('#dir').val(), + breadcrumb: true + }, + error: function(result){ + FileList.reloadCallback(result); + }, + success: function(result) { + FileList.reloadCallback(result); + } + }); + }, + reloadCallback: function(result){ + var $controls = $('#controls'); + + delete FileList._reloadCall; + FileList.hideMask(); + + if (!result || result.status === 'error') { + OC.Notification.show(result.data.message); + return; + } + + if (result.status === 404){ + // go back home + FileList.changeDirectory('/'); + return; + } + + if (result.data.permissions){ + FileList.setDirectoryPermissions(result.data.permissions); + } + if(typeof(result.data.breadcrumb) != 'undefined'){ - updateBreadcrumb(result.data.breadcrumb); + $controls.find('.crumb').remove(); + $controls.prepend(result.data.breadcrumb); + + var width = $(window).width(); + Files.initBreadCrumbs(); + Files.resizeBreadcrumbs(width, true); + + // in case svg is not supported by the browser we need to execute the fallback mechanism + if(!SVGSupport()) { + replaceSVG(); + } } + FileList.update(result.data.files); - resetFileActionPanel(); + }, + setDirectoryPermissions: function(permissions){ + var isCreatable = (permissions & OC.PERMISSION_CREATE) !== 0; + $('#permissions').val(permissions); + $('.creatable').toggleClass('hidden', !isCreatable); + $('.notCreatable').toggleClass('hidden', isCreatable); }, remove:function(name){ $('tr').filterAttr('data-file',name).find('td.filename').draggable('destroy'); $('tr').filterAttr('data-file',name).remove(); FileList.updateFileSummary(); if($('tr[data-file]').length==0){ - $('#emptycontent').show(); + $('#emptycontent').removeClass('hidden'); } }, insertElement:function(name,type,element){ @@ -177,7 +287,7 @@ var FileList={ }else{ $('#fileList').append(element); } - $('#emptycontent').hide(); + $('#emptycontent').addClass('hidden'); FileList.updateFileSummary(); }, loadingDone:function(name, id){ @@ -508,6 +618,31 @@ var FileList={ $connector.show(); } } + }, + showMask: function(){ + // in case one was shown before + var $mask = $('#content .mask'); + if ($mask.length){ + return; + } + + $mask = $('<div class="mask transparent"></div>'); + + $mask.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')'); + $mask.css('background-repeat', 'no-repeat'); + $('#content').append($mask); + + // block UI, but only make visible in case loading takes longer + FileList._maskTimeout = window.setTimeout(function(){ + // reset opacity + $mask.removeClass('transparent'); + }, 250); + }, + hideMask: function(){ + var $mask = $('#content .mask').remove(); + if (FileList._maskTimeout){ + window.clearTimeout(FileList._maskTimeout); + } } }; @@ -629,8 +764,8 @@ $(document).ready(function(){ } // update folder size - var size = parseInt(data.context.data('size')); - size += parseInt(file.size) ; + var size = parseInt(data.context.data('size')); + size += parseInt(file.size); data.context.attr('data-size', size); data.context.find('td.filesize').text(humanFileSize(size)); @@ -710,5 +845,55 @@ $(document).ready(function(){ $(window).trigger('beforeunload'); }); + function parseHashQuery(){ + var hash = window.location.hash, + pos = hash.indexOf('?'), + query; + if (pos >= 0){ + return hash.substr(pos + 1); + } + return ''; + } + + function parseCurrentDirFromUrl(){ + var query = parseHashQuery(), + params, + dir = '/'; + // try and parse from URL hash first + if (query){ + params = OC.parseQueryString(query); + } + // else read from query attributes + if (!params){ + params = OC.parseQueryString(location.search); + } + return (params && params.dir) || '/'; + } + + // fallback to hashchange when no history support + if (!window.history.pushState){ + $(window).on('hashchange', function(){ + FileList.changeDirectory(parseCurrentDirFromUrl(), false); + }); + } + window.onpopstate = function(e){ + var targetDir; + if (e.state && e.state.dir){ + targetDir = e.state.dir; + } + else{ + // read from URL + targetDir = parseCurrentDirFromUrl(); + } + if (targetDir){ + FileList.changeDirectory(targetDir, false); + } + } + + if (parseInt($('#ajaxLoad').val(), 10) === 1){ + // need to initially switch the dir to the one from the hash (IE8) + FileList.changeDirectory(parseCurrentDirFromUrl(), false, true); + } + FileList.createFileSummary(); }); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index d729077ea72..c2418cfa751 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -94,29 +94,106 @@ Files={ OC.Notification.show(t('files_encryption', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.')); return; } + }, + + setupDragAndDrop: function(){ + var $fileList = $('#fileList'); + + //drag/drop of files + $fileList.find('tr td.filename').each(function(i,e){ + if ($(e).parent().data('permissions') & OC.PERMISSION_DELETE) { + $(e).draggable(dragOptions); + } + }); + + $fileList.find('tr[data-type="dir"] td.filename').each(function(i,e){ + if ($(e).parent().data('permissions') & OC.PERMISSION_CREATE){ + $(e).droppable(folderDropOptions); + } + }); + }, + + lastWidth: 0, + + initBreadCrumbs: function () { + Files.lastWidth = 0; + Files.breadcrumbs = []; + + // initialize with some extra space + Files.breadcrumbsWidth = 64; + if ( document.getElementById("navigation") ) { + Files.breadcrumbsWidth += $('#navigation').get(0).offsetWidth; + } + Files.hiddenBreadcrumbs = 0; + + $.each($('.crumb'), function(index, breadcrumb) { + Files.breadcrumbs[index] = breadcrumb; + Files.breadcrumbsWidth += $(breadcrumb).get(0).offsetWidth; + }); + + $.each($('#controls .actions>div'), function(index, action) { + Files.breadcrumbsWidth += $(action).get(0).offsetWidth; + }); + + // event handlers for breadcrumb items + $('#controls .crumb a').on('click', onClickBreadcrumb); + }, + + resizeBreadcrumbs: function (width, firstRun) { + if (width != Files.lastWidth) { + if ((width < Files.lastWidth || firstRun) && width < Files.breadcrumbsWidth) { + if (Files.hiddenBreadcrumbs == 0) { + Files.breadcrumbsWidth -= $(Files.breadcrumbs[1]).get(0).offsetWidth; + $(Files.breadcrumbs[1]).find('a').hide(); + $(Files.breadcrumbs[1]).append('<span>...</span>'); + Files.breadcrumbsWidth += $(Files.breadcrumbs[1]).get(0).offsetWidth; + Files.hiddenBreadcrumbs = 2; + } + var i = Files.hiddenBreadcrumbs; + while (width < Files.breadcrumbsWidth && i > 1 && i < Files.breadcrumbs.length - 1) { + Files.breadcrumbsWidth -= $(Files.breadcrumbs[i]).get(0).offsetWidth; + $(Files.breadcrumbs[i]).hide(); + Files.hiddenBreadcrumbs = i; + i++ + } + } else if (width > Files.lastWidth && Files.hiddenBreadcrumbs > 0) { + var i = Files.hiddenBreadcrumbs; + while (width > Files.breadcrumbsWidth && i > 0) { + if (Files.hiddenBreadcrumbs == 1) { + Files.breadcrumbsWidth -= $(Files.breadcrumbs[1]).get(0).offsetWidth; + $(Files.breadcrumbs[1]).find('span').remove(); + $(Files.breadcrumbs[1]).find('a').show(); + Files.breadcrumbsWidth += $(Files.breadcrumbs[1]).get(0).offsetWidth; + } else { + $(Files.breadcrumbs[i]).show(); + Files.breadcrumbsWidth += $(Files.breadcrumbs[i]).get(0).offsetWidth; + if (Files.breadcrumbsWidth > width) { + Files.breadcrumbsWidth -= $(Files.breadcrumbs[i]).get(0).offsetWidth; + $(Files.breadcrumbs[i]).hide(); + break; + } + } + i--; + Files.hiddenBreadcrumbs = i; + } + } + Files.lastWidth = width; + } } }; $(document).ready(function() { + // FIXME: workaround for trashbin app + if (window.trashBinApp){ + return; + } Files.displayEncryptionWarning(); 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'))); - }); + + FileList.postProcessList(); + Files.setupDragAndDrop(); $('#file_action_panel').attr('activeAction', false); - //drag/drop of files - $('#fileList tr td.filename').each(function(i,e){ - if ($(e).parent().data('permissions') & OC.PERMISSION_DELETE) { - $(e).draggable(dragOptions); - } - }); - $('#fileList tr[data-type="dir"] td.filename').each(function(i,e){ - if ($(e).parent().data('permissions') & OC.PERMISSION_CREATE){ - $(e).droppable(folderDropOptions); - } - }); $('div.crumb:not(.last)').droppable(crumbDropOptions); $('ul#apps>li:first-child').data('dir',''); if($('div.crumb').length){ @@ -268,72 +345,15 @@ $(document).ready(function() { //do a background scan if needed scanFiles(); - var lastWidth = 0; - var breadcrumbs = []; - var breadcrumbsWidth = 0; - if ( document.getElementById("navigation") ) { - breadcrumbsWidth = $('#navigation').get(0).offsetWidth; - } - var hiddenBreadcrumbs = 0; - - $.each($('.crumb'), function(index, breadcrumb) { - breadcrumbs[index] = breadcrumb; - breadcrumbsWidth += $(breadcrumb).get(0).offsetWidth; - }); - - - $.each($('#controls .actions>div'), function(index, action) { - breadcrumbsWidth += $(action).get(0).offsetWidth; - }); - - function resizeBreadcrumbs(firstRun) { - var width = $(this).width(); - if (width != lastWidth) { - if ((width < lastWidth || firstRun) && width < breadcrumbsWidth) { - if (hiddenBreadcrumbs == 0) { - breadcrumbsWidth -= $(breadcrumbs[1]).get(0).offsetWidth; - $(breadcrumbs[1]).find('a').hide(); - $(breadcrumbs[1]).append('<span>...</span>'); - breadcrumbsWidth += $(breadcrumbs[1]).get(0).offsetWidth; - hiddenBreadcrumbs = 2; - } - var i = hiddenBreadcrumbs; - while (width < breadcrumbsWidth && i > 1 && i < breadcrumbs.length - 1) { - breadcrumbsWidth -= $(breadcrumbs[i]).get(0).offsetWidth; - $(breadcrumbs[i]).hide(); - hiddenBreadcrumbs = i; - i++ - } - } else if (width > lastWidth && hiddenBreadcrumbs > 0) { - var i = hiddenBreadcrumbs; - while (width > breadcrumbsWidth && i > 0) { - if (hiddenBreadcrumbs == 1) { - breadcrumbsWidth -= $(breadcrumbs[1]).get(0).offsetWidth; - $(breadcrumbs[1]).find('span').remove(); - $(breadcrumbs[1]).find('a').show(); - breadcrumbsWidth += $(breadcrumbs[1]).get(0).offsetWidth; - } else { - $(breadcrumbs[i]).show(); - breadcrumbsWidth += $(breadcrumbs[i]).get(0).offsetWidth; - if (breadcrumbsWidth > width) { - breadcrumbsWidth -= $(breadcrumbs[i]).get(0).offsetWidth; - $(breadcrumbs[i]).hide(); - break; - } - } - i--; - hiddenBreadcrumbs = i; - } - } - lastWidth = width; - } - } + Files.initBreadCrumbs(); $(window).resize(function() { - resizeBreadcrumbs(false); + var width = $(this).width(); + Files.resizeBreadcrumbs(width, false); }); - resizeBreadcrumbs(true); + var width = $(this).width(); + Files.resizeBreadcrumbs(width, true); // display storage warnings setTimeout ( "Files.displayStorageWarnings()", 100 ); @@ -415,10 +435,6 @@ function boolOperationFinished(data, callback) { } } -function updateBreadcrumb(breadcrumbHtml) { - $('p.nav').empty().html(breadcrumbHtml); -} - var createDragShadow = function(event){ //select dragged file var isDragSelected = $(event.target).parents('tr').find('td input:first').prop('checked'); @@ -681,3 +697,9 @@ function checkTrashStatus() { } }); } + +function onClickBreadcrumb(e){ + var $el = $(e.target).closest('.crumb'); + e.preventDefault(); + FileList.changeDirectory(decodeURIComponent($el.data('dir'))); +} diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php index 1c26c10028d..d9d10362630 100644 --- a/apps/files/l10n/es_AR.php +++ b/apps/files/l10n/es_AR.php @@ -33,9 +33,10 @@ $TRANSLATIONS = array( "cancel" => "cancelar", "replaced {new_name} with {old_name}" => "se reemplazó {new_name} con {old_name}", "undo" => "deshacer", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), -"_Uploading %n file_::_Uploading %n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n carpeta","%n carpetas"), +"_%n file_::_%n files_" => array("%n archivo","%n archivos"), +"{dirs} and {files}" => "{carpetas} y {archivos}", +"_Uploading %n file_::_Uploading %n files_" => array("Subiendo %n archivo","Subiendo %n archivos"), "files uploading" => "Subiendo archivos", "'.' 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.", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index ce19bb60eb7..2d538262a0a 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -6,8 +6,8 @@ $TRANSLATIONS = array( "Invalid Token" => "Jeton non valide", "No file was uploaded. Unknown error" => "Aucun fichier n'a été envoyé. Erreur inconnue", "There is no error, the file uploaded with success" => "Aucune erreur, le fichier a été envoyé avec succès.", -"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Le fichier envoyé dépasse la valeur upload_max_filesize située dans le fichier php.ini:", -"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Le fichier envoyé dépasse la directive MAX_FILE_SIZE qui est spécifiée dans le formulaire HTML.", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Le fichier envoyé dépasse l'instruction upload_max_filesize située dans le fichier php.ini:", +"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Le fichier envoyé dépasse l'instruction MAX_FILE_SIZE qui est spécifiée dans le formulaire HTML.", "The uploaded file was only partially uploaded" => "Le fichier n'a été que partiellement envoyé.", "No file was uploaded" => "Pas de fichier envoyé.", "Missing a temporary folder" => "Absence de dossier temporaire.", diff --git a/apps/files/l10n/ku_IQ.php b/apps/files/l10n/ku_IQ.php index 9ec565da441..d98848a71f0 100644 --- a/apps/files/l10n/ku_IQ.php +++ b/apps/files/l10n/ku_IQ.php @@ -2,6 +2,7 @@ $TRANSLATIONS = array( "URL cannot be empty." => "ناونیشانی بهستهر نابێت بهتاڵ بێت.", "Error" => "ههڵه", +"Share" => "هاوبەشی کردن", "_%n folder_::_%n folders_" => array("",""), "_%n file_::_%n files_" => array("",""), "_Uploading %n file_::_Uploading %n files_" => array("",""), diff --git a/apps/files/l10n/lt_LT.php b/apps/files/l10n/lt_LT.php index 0530adc2ae2..83ed8e8688f 100644 --- a/apps/files/l10n/lt_LT.php +++ b/apps/files/l10n/lt_LT.php @@ -2,6 +2,8 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Nepavyko perkelti %s - failas su tokiu pavadinimu jau egzistuoja", "Could not move %s" => "Nepavyko perkelti %s", +"Unable to set upload directory." => "Nepavyksta nustatyti įkėlimų katalogo.", +"Invalid Token" => "Netinkamas ženklas", "No file was uploaded. Unknown error" => "Failai nebuvo įkelti dėl nežinomos priežasties", "There is no error, the file uploaded with success" => "Failas įkeltas sėkmingai, be klaidų", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Įkeliamas failas yra didesnis nei leidžia upload_max_filesize php.ini faile:", @@ -31,19 +33,22 @@ $TRANSLATIONS = array( "cancel" => "atšaukti", "replaced {new_name} with {old_name}" => "pakeiskite {new_name} į {old_name}", "undo" => "anuliuoti", -"_%n folder_::_%n folders_" => array("","",""), -"_%n file_::_%n files_" => array("","",""), -"_Uploading %n file_::_Uploading %n files_" => array("","",""), +"_%n folder_::_%n folders_" => array("%n aplankas","%n aplankai","%n aplankų"), +"_%n file_::_%n files_" => array("%n failas","%n failai","%n failų"), +"{dirs} and {files}" => "{dirs} ir {files}", +"_Uploading %n file_::_Uploading %n files_" => array("Įkeliamas %n failas","Įkeliami %n failai","Įkeliama %n failų"), "files uploading" => "įkeliami failai", "'.' is an invalid file name." => "'.' yra neleidžiamas failo pavadinime.", "File name cannot be empty." => "Failo pavadinimas negali būti tuščias.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Neleistinas pavadinimas, '\\', '/', '<', '>', ':', '\"', '|', '?' ir '*' yra neleidžiami.", "Your storage is full, files can not be updated or synced anymore!" => "Jūsų visa vieta serveryje užimta", "Your storage is almost full ({usedSpacePercent}%)" => "Jūsų vieta serveryje beveik visa užimta ({usedSpacePercent}%)", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Šifravimas buvo išjungtas, bet Jūsų failai vis dar užšifruoti. Prašome eiti į asmeninius nustatymus ir iššifruoti savo failus.", "Your download is being prepared. This might take some time if the files are big." => "Jūsų atsisiuntimas yra paruošiamas. tai gali užtrukti jei atsisiunčiamas didelis failas.", "Name" => "Pavadinimas", "Size" => "Dydis", "Modified" => "Pakeista", +"%s could not be renamed" => "%s negali būti pervadintas", "Upload" => "Įkelti", "File handling" => "Failų tvarkymas", "Maximum upload size" => "Maksimalus įkeliamo failo dydis", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 9fb13517369..8e9454e7945 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -35,6 +35,7 @@ $TRANSLATIONS = array( "undo" => "ongedaan maken", "_%n folder_::_%n folders_" => array("","%n mappen"), "_%n file_::_%n files_" => array("","%n bestanden"), +"{dirs} and {files}" => "{dirs} en {files}", "_Uploading %n file_::_Uploading %n files_" => array("%n bestand aan het uploaden","%n bestanden aan het uploaden"), "files uploading" => "bestanden aan het uploaden", "'.' is an invalid file name." => "'.' is een ongeldige bestandsnaam.", diff --git a/apps/files/l10n/nn_NO.php b/apps/files/l10n/nn_NO.php index b1f38057a88..58aafac27c4 100644 --- a/apps/files/l10n/nn_NO.php +++ b/apps/files/l10n/nn_NO.php @@ -2,6 +2,8 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Klarte ikkje flytta %s – det finst allereie ei fil med dette namnet", "Could not move %s" => "Klarte ikkje flytta %s", +"Unable to set upload directory." => "Klarte ikkje å endra opplastingsmappa.", +"Invalid Token" => "Ugyldig token", "No file was uploaded. Unknown error" => "Ingen filer lasta opp. Ukjend feil", "There is no error, the file uploaded with success" => "Ingen feil, fila vart lasta opp", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Fila du lasta opp er større enn det «upload_max_filesize» i php.ini tillater: ", @@ -31,19 +33,22 @@ $TRANSLATIONS = array( "cancel" => "avbryt", "replaced {new_name} with {old_name}" => "bytte ut {new_name} med {old_name}", "undo" => "angre", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), -"_Uploading %n file_::_Uploading %n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n mappe","%n mapper"), +"_%n file_::_%n files_" => array("%n fil","%n filer"), +"{dirs} and {files}" => "{dirs} og {files}", +"_Uploading %n file_::_Uploading %n files_" => array("Lastar opp %n fil","Lastar opp %n filer"), "files uploading" => "filer lastar opp", "'.' is an invalid file name." => "«.» er eit ugyldig filnamn.", "File name cannot be empty." => "Filnamnet kan ikkje vera tomt.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ugyldig namn, «\\», «/», «<», «>», «:», «\"», «|», «?» og «*» er ikkje tillate.", "Your storage is full, files can not be updated or synced anymore!" => "Lagringa di er full, kan ikkje lenger oppdatera eller synkronisera!", "Your storage is almost full ({usedSpacePercent}%)" => "Lagringa di er nesten full ({usedSpacePercent} %)", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Kryptering er skrudd av, men filene dine er enno krypterte. Du kan dekryptera filene i personlege innstillingar.", "Your download is being prepared. This might take some time if the files are big." => "Gjer klar nedlastinga di. Dette kan ta ei stund viss filene er store.", "Name" => "Namn", "Size" => "Storleik", "Modified" => "Endra", +"%s could not be renamed" => "Klarte ikkje å omdøypa på %s", "Upload" => "Last opp", "File handling" => "Filhandtering", "Maximum upload size" => "Maksimal opplastingsstorleik", diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index de9644bd588..f9915f251b4 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -33,10 +33,10 @@ $TRANSLATIONS = array( "cancel" => "cancelar", "replaced {new_name} with {old_name}" => "Substituído {old_name} por {new_name} ", "undo" => "desfazer", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n pasta","%n pastas"), +"_%n file_::_%n files_" => array("%n arquivo","%n arquivos"), "{dirs} and {files}" => "{dirs} e {files}", -"_Uploading %n file_::_Uploading %n files_" => array("",""), +"_Uploading %n file_::_Uploading %n files_" => array("Enviando %n arquivo","Enviando %n arquivos"), "files uploading" => "enviando arquivos", "'.' is an invalid file name." => "'.' é um nome de arquivo inválido.", "File name cannot be empty." => "O nome do arquivo não pode estar vazio.", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index 59f6cc68499..0a96eaa2479 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -6,27 +6,27 @@ $TRANSLATIONS = array( "Invalid Token" => "Jeton Invalid", "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" => "Nu a apărut nici o 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: ", +"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Fisierul incarcat depaseste marimea maxima permisa in php.ini: ", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "Fișierul are o dimensiune mai mare decât variabile MAX_FILE_SIZE specificată în formularul HTML", "The uploaded file was only partially uploaded" => "Fișierul a fost încărcat doar parțial", "No file was uploaded" => "Nu a fost încărcat nici un fișier", -"Missing a temporary folder" => "Lipsește un director temporar", -"Failed to write to disk" => "Eroare la scriere pe disc", +"Missing a temporary folder" => "Lipsește un dosar temporar", +"Failed to write to disk" => "Eroare la scrierea discului", "Not enough storage available" => "Nu este suficient spațiu disponibil", "Upload failed" => "Încărcarea a eșuat", -"Invalid directory." => "Director invalid.", +"Invalid directory." => "registru invalid.", "Files" => "Fișiere", -"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.", +"Unable to upload your file as it is a directory or has 0 bytes" => "lista nu se poate incarca poate fi un fisier sau are 0 bytes", "Not enough space available" => "Nu este suficient spațiu disponibil", "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ă.", +"URL cannot be empty." => "Adresa URL nu poate fi golita", "Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Nume de dosar invalid. Utilizarea 'Shared' e rezervată de ownCloud", "Error" => "Eroare", -"Share" => "Partajează", +"Share" => "a imparti", "Delete permanently" => "Stergere permanenta", "Rename" => "Redenumire", -"Pending" => "În așteptare", +"Pending" => "in timpul", "{new_name} already exists" => "{new_name} deja exista", "replace" => "înlocuire", "suggest name" => "sugerează nume", @@ -39,10 +39,11 @@ $TRANSLATIONS = array( "files uploading" => "fișiere se încarcă", "'.' 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.", -"Your storage is full, files can not be updated or synced anymore!" => "Spatiul de stocare este plin, nu mai puteti incarca s-au sincroniza alte fisiere.", -"Your storage is almost full ({usedSpacePercent}%)" => "Spatiul de stocare este aproape plin ({usedSpacePercent}%)", -"Your download is being prepared. This might take some time if the files are big." => "Se pregătește descărcarea. Aceasta poate să dureze ceva timp dacă fișierele sunt mari.", +"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nume invalide, '\\', '/', '<', '>', ':', '\"', '|', '?' si '*' nu sunt permise.", +"Your storage is full, files can not be updated or synced anymore!" => "Spatiul de stocare este plin, fisierele nu mai pot fi actualizate sau sincronizate", +"Your storage is almost full ({usedSpacePercent}%)" => "Spatiul de stocare este aproape plin {spatiu folosit}%", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "criptarea a fost disactivata dar fisierele sant inca criptate.va rog intrati in setarile personale pentru a decripta fisierele", +"Your download is being prepared. This might take some time if the files are big." => "in curs de descarcare. Aceasta poate să dureze ceva timp dacă fișierele sunt mari.", "Name" => "Nume", "Size" => "Dimensiune", "Modified" => "Modificat", @@ -51,25 +52,25 @@ $TRANSLATIONS = array( "File handling" => "Manipulare fișiere", "Maximum upload size" => "Dimensiune maximă admisă la încărcare", "max. possible: " => "max. posibil:", -"Needed for multi-file and folder downloads." => "Necesar pentru descărcarea mai multor fișiere și a dosarelor", -"Enable ZIP-download" => "Activează descărcare fișiere compresate", +"Needed for multi-file and folder downloads." => "necesar la descarcarea mai multor liste si fisiere", +"Enable ZIP-download" => "permite descarcarea codurilor ZIP", "0 is unlimited" => "0 e nelimitat", "Maximum input size for ZIP files" => "Dimensiunea maximă de intrare pentru fișiere compresate", "Save" => "Salvează", "New" => "Nou", -"Text file" => "Fișier text", +"Text file" => "lista", "Folder" => "Dosar", "From link" => "de la adresa", "Deleted files" => "Sterge fisierele", "Cancel upload" => "Anulează încărcarea", -"You don’t have write permissions here." => "Nu ai permisiunea de a sterge fisiere aici.", +"You don’t have write permissions here." => "Nu ai permisiunea de a scrie aici.", "Nothing in here. Upload something!" => "Nimic aici. Încarcă ceva!", "Download" => "Descarcă", -"Unshare" => "Anulare partajare", +"Unshare" => "Anulare", "Delete" => "Șterge", "Upload too large" => "Fișierul încărcat este prea mare", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Fișierul care l-ai încărcat a depășită limita maximă admisă la încărcare pe acest server.", -"Files are being scanned, please wait." => "Fișierele sunt scanate, te rog așteptă.", +"Files are being scanned, please wait." => "Fișierele sunt scanate, asteptati va rog", "Current scanning" => "În curs de scanare", "Upgrading filesystem cache..." => "Modernizare fisiere de sistem cache.." ); diff --git a/apps/files/l10n/sq.php b/apps/files/l10n/sq.php index ff09e7b4f95..3207e3a165c 100644 --- a/apps/files/l10n/sq.php +++ b/apps/files/l10n/sq.php @@ -2,6 +2,8 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "%s nuk u spostua - Aty ekziston një skedar me të njëjtin emër", "Could not move %s" => "%s nuk u spostua", +"Unable to set upload directory." => "Nuk është i mundur caktimi i dosjes së ngarkimit.", +"Invalid Token" => "Përmbajtje e pavlefshme", "No file was uploaded. Unknown error" => "Nuk u ngarkua asnjë skedar. Veprim i gabuar i panjohur", "There is no error, the file uploaded with success" => "Nuk pati veprime të gabuara, skedari u ngarkua me sukses", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Skedari i ngarkuar tejkalon udhëzimin upload_max_filesize tek php.ini:", @@ -11,6 +13,7 @@ $TRANSLATIONS = array( "Missing a temporary folder" => "Një dosje e përkohshme nuk u gjet", "Failed to write to disk" => "Ruajtja në disk dështoi", "Not enough storage available" => "Nuk ka mbetur hapësirë memorizimi e mjaftueshme", +"Upload failed" => "Ngarkimi dështoi", "Invalid directory." => "Dosje e pavlefshme.", "Files" => "Skedarët", "Unable to upload your file as it is a directory or has 0 bytes" => "Nuk është i mundur ngarkimi i skedarit tuaj sepse është dosje ose ka dimension 0 byte", @@ -18,6 +21,7 @@ $TRANSLATIONS = array( "Upload cancelled." => "Ngarkimi u anulua.", "File upload is in progress. Leaving the page now will cancel the upload." => "Ngarkimi i skedarit është në vazhdim. Nqse ndërroni faqen tani ngarkimi do të anulohet.", "URL cannot be empty." => "URL-i nuk mund të jetë bosh.", +"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "Emri i dosjes është i pavlefshëm. Përdorimi i \"Shared\" është i rezervuar nga Owncloud-i", "Error" => "Veprim i gabuar", "Share" => "Nda", "Delete permanently" => "Elimino përfundimisht", @@ -29,19 +33,22 @@ $TRANSLATIONS = array( "cancel" => "anulo", "replaced {new_name} with {old_name}" => "U zëvëndësua {new_name} me {old_name}", "undo" => "anulo", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), -"_Uploading %n file_::_Uploading %n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n dosje","%n dosje"), +"_%n file_::_%n files_" => array("%n skedar","%n skedarë"), +"{dirs} and {files}" => "{dirs} dhe {files}", +"_Uploading %n file_::_Uploading %n files_" => array("Po ngarkoj %n skedar","Po ngarkoj %n skedarë"), "files uploading" => "po ngarkoj skedarët", "'.' is an invalid file name." => "'.' është emër i pavlefshëm.", "File name cannot be empty." => "Emri i skedarit nuk mund të jetë bosh.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Emër i pavlefshëm, '\\', '/', '<', '>', ':', '\"', '|', '?' dhe '*' nuk lejohen.", "Your storage is full, files can not be updated or synced anymore!" => "Hapësira juaj e memorizimit është plot, nuk mund të ngarkoni apo sinkronizoni më skedarët.", "Your storage is almost full ({usedSpacePercent}%)" => "Hapësira juaj e memorizimit është gati plot ({usedSpacePercent}%)", +"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Kodifikimi u çaktivizua por skedarët tuaj vazhdojnë të jenë të kodifikuar. Ju lutem shkoni tek parametrat personale për të dekodifikuar skedarët tuaj.", "Your download is being prepared. This might take some time if the files are big." => "Shkarkimi juaj po përgatitet. Mund të duhet pak kohë nqse skedarët janë të mëdhenj.", "Name" => "Emri", "Size" => "Dimensioni", "Modified" => "Modifikuar", +"%s could not be renamed" => "Nuk është i mundur riemërtimi i %s", "Upload" => "Ngarko", "File handling" => "Trajtimi i skedarit", "Maximum upload size" => "Dimensioni maksimal i ngarkimit", diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index 781590cff35..bea1d930799 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -2,6 +2,7 @@ $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Не вдалося перемістити %s - Файл з таким ім'ям вже існує", "Could not move %s" => "Не вдалося перемістити %s", +"Unable to set upload directory." => "Не вдалося встановити каталог завантаження.", "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: ", diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index 7135ef9f656..3c13b8ea6e2 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -17,4 +17,120 @@ class Helper 'maxHumanFilesize' => $maxHumanFilesize, 'usedSpacePercent' => (int)$storageInfo['relative']); } + + public static function determineIcon($file) { + if($file['type'] === 'dir') { + $dir = $file['directory']; + $absPath = \OC\Files\Filesystem::getView()->getAbsolutePath($dir.'/'.$file['name']); + $mount = \OC\Files\Filesystem::getMountManager()->find($absPath); + if (!is_null($mount)) { + $sid = $mount->getStorageId(); + if (!is_null($sid)) { + $sid = explode(':', $sid); + if ($sid[0] === 'shared') { + return \OC_Helper::mimetypeIcon('dir-shared'); + } + if ($sid[0] !== 'local') { + return \OC_Helper::mimetypeIcon('dir-external'); + } + } + } + return \OC_Helper::mimetypeIcon('dir'); + } + + if($file['isPreviewAvailable']) { + $relativePath = substr($file['path'], 6); + return \OC_Helper::previewIcon($relativePath); + } + return \OC_Helper::mimetypeIcon($file['mimetype']); + } + + /** + * Comparator function to sort files alphabetically and have + * the directories appear first + * @param array $a file + * @param array $b file + * @return -1 if $a must come before $b, 1 otherwise + */ + public static function fileCmp($a, $b) { + if ($a['type'] === 'dir' and $b['type'] !== 'dir') { + return -1; + } elseif ($a['type'] !== 'dir' and $b['type'] === 'dir') { + return 1; + } else { + return strnatcasecmp($a['name'], $b['name']); + } + } + + /** + * Retrieves the contents of the given directory and + * returns it as a sorted array. + * @param string $dir path to the directory + * @return array of files + */ + public static function getFiles($dir) { + $content = \OC\Files\Filesystem::getDirectoryContent($dir); + $files = array(); + + foreach ($content 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'] = ''; + } + } + $i['directory'] = $dir; + $i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']); + $i['icon'] = \OCA\files\lib\Helper::determineIcon($i); + $files[] = $i; + } + + usort($files, array('\OCA\files\lib\Helper', 'fileCmp')); + + return $files; + } + + /** + * Splits the given path into a breadcrumb structure. + * @param string $dir path to process + * @return array where each entry is a hash of the absolute + * directory path and its name + */ + public static function makeBreadcrumb($dir){ + $breadcrumb = array(); + $pathtohere = ''; + foreach (explode('/', $dir) as $i) { + if ($i !== '') { + $pathtohere .= '/' . $i; + $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); + } + } + return $breadcrumb; + } + + /** + * Returns the numeric permissions for the given directory. + * @param string $dir directory without trailing slash + * @return numeric permissions + */ + public static function getDirPermissions($dir){ + $permissions = \OCP\PERMISSION_READ; + if (\OC\Files\Filesystem::isCreatable($dir . '/')) { + $permissions |= \OCP\PERMISSION_CREATE; + } + if (\OC\Files\Filesystem::isUpdatable($dir . '/')) { + $permissions |= \OCP\PERMISSION_UPDATE; + } + if (\OC\Files\Filesystem::isDeletable($dir . '/')) { + $permissions |= \OCP\PERMISSION_DELETE; + } + if (\OC\Files\Filesystem::isSharable($dir . '/')) { + $permissions |= \OCP\PERMISSION_SHARE; + } + return $permissions; + } } diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index ba489604165..09bd96be526 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -1,8 +1,7 @@ <!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]--> <div id="controls"> <?php print_unescaped($_['breadcrumb']); ?> - <?php if ($_['isCreatable']):?> - <div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>"> + <div class="actions creatable <?php if (!$_['isCreatable']):?>hidden<?php endif; ?> <?php if (isset($_['files']) and count($_['files'])==0):?>emptycontent<?php endif; ?>"> <div id="new" class="button"> <a><?php p($l->t('New'));?></a> <ul> @@ -16,29 +15,23 @@ </div> <div id="upload" class="button" title="<?php p($l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize']) ?>"> - <form data-upload-id='1' - id="data-upload-form" - class="file_upload_form" - action="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" - method="post" - enctype="multipart/form-data" - target="file_upload_target_1"> <?php if($_['uploadMaxFilesize'] >= 0):?> <input type="hidden" name="MAX_FILE_SIZE" id="max_upload" value="<?php p($_['uploadMaxFilesize']) ?>"> <?php endif;?> <!-- Send the requesttoken, this is needed for older IE versions because they don't send the CSRF token via HTTP header in this case --> - <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken"> <input type="hidden" class="max_human_file_size" value="(max <?php p($_['uploadMaxHumanFilesize']); ?>)"> <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> - <input type="file" id="file_upload_start" name='files[]'/> + <input type="file" id="file_upload_start" name='files[]' + data-url="<?php print_unescaped(OCP\Util::linkTo('files', 'ajax/upload.php')); ?>" /> <a href="#" class="svg"></a> - </form> </div> <?php if ($_['trash'] ): ?> - <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>></input> + <div id="trash" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>> + <a><?php p($l->t('Deleted files'));?></a> + </div> <?php endif; ?> <div id="uploadprogresswrapper"> <div id="uploadprogressbar"></div> @@ -48,16 +41,15 @@ </div> </div> <div id="file_action_panel"></div> - <?php elseif( !$_['isPublic'] ):?> - <div class="actions"><input type="button" disabled value="<?php p($l->t('You don’t have write permissions here.'))?>"></div> - <input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> - <?php endif;?> + <div class="notCreatable notPublic <?php if ($_['isCreatable'] or $_['isPublic'] ):?>hidden<?php endif; ?>"> + <div class="actions"><input type="button" disabled value="<?php p($l->t('You don’t have write permissions here.'))?>"></div> + </div> <input type="hidden" name="permissions" value="<?php p($_['permissions']); ?>" id="permissions"> </div> -<?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?> - <div id="emptycontent"><?php p($l->t('Nothing in here. Upload something!'))?></div> -<?php endif; ?> +<div id="emptycontent" <?php if (!isset($_['files']) or !$_['isCreatable'] or count($_['files']) > 0 or !$_['ajaxLoad']):?>class="hidden"<?php endif; ?>><?php p($l->t('Nothing in here. Upload something!'))?></div> + +<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"></input> <table id="filestable" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="36" data-preview-y="36"> <thead> @@ -82,7 +74,7 @@ <th id="headerDate"> <span id="modified"><?php p($l->t( 'Modified' )); ?></span> <?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?> -<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder --> +<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder --> <?php if ($_['dir'] == '/Shared'): ?> <span class="selectedActions"><a href="" class="delete-selected"> <?php p($l->t('Unshare'))?> @@ -120,6 +112,7 @@ </div> <!-- config hints for javascript --> +<input type="hidden" name="ajaxLoad" id="ajaxLoad" value="<?php p($_['ajaxLoad']); ?>" /> <input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" /> <input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" /> <input type="hidden" name="encryptedFiles" id="encryptedFiles" value="<?php $_['encryptedFiles'] ? p('1') : p('0'); ?>" /> diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 4076c1bb331..1e4d4d11c98 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -1,7 +1,7 @@ -<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"> +<?php $totalfiles = 0; +$totaldirs = 0; +$totalsize = 0; ?> <?php foreach($_['files'] as $file): - //strlen('files/') => 6 - $relativePath = substr($file['path'], 6); // the bigger the file, the darker the shade of grey; megabytes*2 $simple_size_color = intval(160-$file['size']/(1024*1024)*2); if($simple_size_color<0) $simple_size_color = 0; @@ -22,26 +22,7 @@ <?php else: ?> <td class="filename svg" <?php endif; ?> - <?php if($file['type'] == 'dir'): ?> - style="background-image:url(<?php print_unescaped(OCP\mimetype_icon('dir')); ?>)" - <?php else: ?> - <?php if($_['isPublic']): ?> - <?php - $relativePath = substr($relativePath, strlen($_['sharingroot'])); - ?> - <?php if($file['isPreviewAvailable']): ?> - style="background-image:url(<?php print_unescaped(OCP\publicPreview_icon($relativePath, $_['sharingtoken'])); ?>)" - <?php else: ?> - style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)" - <?php endif; ?> - <?php else: ?> - <?php if($file['isPreviewAvailable']): ?> - style="background-image:url(<?php print_unescaped(OCP\preview_icon($relativePath)); ?>)" - <?php else: ?> - style="background-image:url(<?php print_unescaped(OCP\mimetype_icon($file['mimetype'])); ?>)" - <?php endif; ?> - <?php endif; ?> - <?php endif; ?> + style="background-image:url(<?php print_unescaped($file['icon']); ?>)" > <?php if(!isset($_['readonly']) || !$_['readonly']): ?> <input id="select-<?php p($file['fileid']); ?>" type="checkbox" /> diff --git a/apps/files_encryption/l10n/es_AR.php b/apps/files_encryption/l10n/es_AR.php index cac8c465362..666ea59687c 100644 --- a/apps/files_encryption/l10n/es_AR.php +++ b/apps/files_encryption/l10n/es_AR.php @@ -10,6 +10,8 @@ $TRANSLATIONS = array( "Could not update the private key password. Maybe the old password was not correct." => "No fue posible actualizar la contraseña de clave privada. Tal vez la contraseña anterior no es correcta.", "Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "¡Tu clave privada no es válida! Tal vez tu contraseña fue cambiada desde fuera del sistema de ownCloud (por ej. desde tu cuenta de sistema). Podés actualizar tu clave privada en la sección de \"configuración personal\", para recuperar el acceso a tus archivos.", "Missing requirements." => "Requisitos incompletos.", +"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Por favor, asegúrese de que PHP 5.3.3 o una versión más reciente esté instalado y que OpenSSL junto con la extensión PHP esté habilitado y configurado apropiadamente. Por ahora, la aplicación de encriptación ha sido deshabilitada.", +"Following users are not set up for encryption:" => "Los siguientes usuarios no fueron configurados para encriptar:", "Saving..." => "Guardando...", "Your private key is not valid! Maybe the your password was changed from outside." => "¡Tu clave privada no es válida! Tal vez tu contraseña fue cambiada desde afuera.", "You can unlock your private key in your " => "Podés desbloquear tu clave privada en tu", diff --git a/apps/files_encryption/l10n/fi_FI.php b/apps/files_encryption/l10n/fi_FI.php index 53b0a6b25cd..b3df41b1f42 100644 --- a/apps/files_encryption/l10n/fi_FI.php +++ b/apps/files_encryption/l10n/fi_FI.php @@ -1,11 +1,21 @@ <?php $TRANSLATIONS = array( +"Recovery key successfully enabled" => "Palautusavain kytketty päälle onnistuneesti", "Password successfully changed." => "Salasana vaihdettiin onnistuneesti.", "Could not change the password. Maybe the old password was not correct." => "Salasanan vaihto epäonnistui. Kenties vanha salasana oli väärin.", +"Following users are not set up for encryption:" => "Seuraavat käyttäjät eivät ole määrittäneet salausta:", "Saving..." => "Tallennetaan...", +"personal settings" => "henkilökohtaiset asetukset", "Encryption" => "Salaus", +"Recovery key password" => "Palautusavaimen salasana", "Enabled" => "Käytössä", "Disabled" => "Ei käytössä", -"Change Password" => "Vaihda salasana" +"Change recovery key password:" => "Vaihda palautusavaimen salasana:", +"Old Recovery key password" => "Vanha palautusavaimen salasana", +"New Recovery key password" => "Uusi palautusavaimen salasana", +"Change Password" => "Vaihda salasana", +"Old log-in password" => "Vanha kirjautumis-salasana", +"Current log-in password" => "Nykyinen kirjautumis-salasana", +"Enable password recovery:" => "Ota salasanan palautus käyttöön:" ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/files_encryption/l10n/lt_LT.php b/apps/files_encryption/l10n/lt_LT.php index 9fbf7b29604..4ededb716f4 100644 --- a/apps/files_encryption/l10n/lt_LT.php +++ b/apps/files_encryption/l10n/lt_LT.php @@ -6,12 +6,34 @@ $TRANSLATIONS = array( "Could not disable recovery key. Please check your recovery key password!" => "Neišėjo išjungti jūsų atkūrimo rakto. Prašome jį patikrinti!", "Password successfully changed." => "Slaptažodis sėkmingai pakeistas", "Could not change the password. Maybe the old password was not correct." => "Slaptažodis nebuvo pakeistas. Gali būti, kad buvo neteisingai suvestas senasis.", +"Private key password successfully updated." => "Privataus rakto slaptažodis buvo sėkmingai atnaujintas.", +"Could not update the private key password. Maybe the old password was not correct." => "Nepavyko atnaujinti privataus rakto slaptažodžio. Gali būti, kad buvo neteisingai suvestas senasis.", +"Your private key is not valid! Likely your password was changed outside the ownCloud system (e.g. your corporate directory). You can update your private key password in your personal settings to recover access to your encrypted files." => "Jūsų privatus raktas yra netinkamas! Panašu, kad Jūsų slaptažodis buvo pakeistas išorėje ownCloud sistemos (pvz. Jūsų organizacijos kataloge). Galite atnaujinti savo privataus rakto slaptažodį savo asmeniniuose nustatymuose, kad atkurti prieigą prie savo šifruotų failų.", +"Missing requirements." => "Trūkstami laukai.", +"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Prašome įsitikinti, kad PHP 5.3.3 ar naujesnė yra įdiegta ir kad OpenSSL kartu su PHP plėtiniu yra šjungti ir teisingai sukonfigūruoti. Kol kas šifravimo programa bus išjungta.", +"Following users are not set up for encryption:" => "Sekantys naudotojai nenustatyti šifravimui:", "Saving..." => "Saugoma...", +"Your private key is not valid! Maybe the your password was changed from outside." => "Jūsų privatus raktas yra netinkamas! Galbūt Jūsų slaptažodis buvo pakeistas iš išorės?", +"You can unlock your private key in your " => "Galite atrakinti savo privatų raktą savo", +"personal settings" => "asmeniniai nustatymai", "Encryption" => "Šifravimas", +"Enable recovery key (allow to recover users files in case of password loss):" => "Įjunkite atkūrimo raktą, (leisti atkurti naudotojų failus praradus slaptažodį):", +"Recovery key password" => "Atkūrimo rakto slaptažodis", "Enabled" => "Įjungta", "Disabled" => "Išjungta", +"Change recovery key password:" => "Pakeisti atkūrimo rakto slaptažodį:", +"Old Recovery key password" => "Senas atkūrimo rakto slaptažodis", +"New Recovery key password" => "Naujas atkūrimo rakto slaptažodis", "Change Password" => "Pakeisti slaptažodį", -"File recovery settings updated" => "Failų atstatymo nustatymai pakeisti", +"Your private key password no longer match your log-in password:" => "Privatus rakto slaptažodis daugiau neatitinka Jūsų prisijungimo slaptažodžio:", +"Set your old private key password to your current log-in password." => "Nustatyti Jūsų privataus rakto slaptažodį į Jūsų dabartinį prisijungimo.", +" If you don't remember your old password you can ask your administrator to recover your files." => "Jei nepamenate savo seno slaptažodžio, galite paprašyti administratoriaus atkurti Jūsų failus.", +"Old log-in password" => "Senas prisijungimo slaptažodis", +"Current log-in password" => "Dabartinis prisijungimo slaptažodis", +"Update Private Key Password" => "Atnaujinti privataus rakto slaptažodį", +"Enable password recovery:" => "Įjungti slaptažodžio atkūrimą:", +"Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" => "Įjungus šią funkciją jums bus suteiktas pakartotinis priėjimas prie Jūsų šifruotų failų pamiršus slaptažodį.", +"File recovery settings updated" => "Failų atkūrimo nustatymai pakeisti", "Could not update file recovery" => "Neišėjo atnaujinti failų atkūrimo" ); $PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/apps/files_encryption/l10n/nn_NO.php b/apps/files_encryption/l10n/nn_NO.php index b99d0751540..bb30d69c592 100644 --- a/apps/files_encryption/l10n/nn_NO.php +++ b/apps/files_encryption/l10n/nn_NO.php @@ -1,5 +1,6 @@ <?php $TRANSLATIONS = array( -"Saving..." => "Lagrar …" +"Saving..." => "Lagrar …", +"Encryption" => "Kryptering" ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/files_encryption/lib/keymanager.php b/apps/files_encryption/lib/keymanager.php index 5386de486e1..9be3dda7ce3 100755 --- a/apps/files_encryption/lib/keymanager.php +++ b/apps/files_encryption/lib/keymanager.php @@ -220,22 +220,10 @@ class Keymanager { */ public static function getFileKey(\OC_FilesystemView $view, $userId, $filePath) { - // try reusing key file if part file - if (self::isPartialFilePath($filePath)) { - - $result = self::getFileKey($view, $userId, self::fixPartialFilePath($filePath)); - - if ($result) { - - return $result; - - } - - } - $util = new Util($view, \OCP\User::getUser()); list($owner, $filename) = $util->getUidAndFilename($filePath); + $filename = self::fixPartialFilePath($filename); $filePath_f = ltrim($filename, '/'); // in case of system wide mount points the keys are stored directly in the data directory @@ -424,18 +412,6 @@ class Keymanager { public static function getShareKey(\OC_FilesystemView $view, $userId, $filePath) { // try reusing key file if part file - if (self::isPartialFilePath($filePath)) { - - $result = self::getShareKey($view, $userId, self::fixPartialFilePath($filePath)); - - if ($result) { - - return $result; - - } - - } - $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; @@ -443,7 +419,7 @@ class Keymanager { $util = new Util($view, \OCP\User::getUser()); list($owner, $filename) = $util->getUidAndFilename($filePath); - + $filename = self::fixPartialFilePath($filename); // in case of system wide mount points the keys are stored directly in the data directory if ($util->isSystemWideMountPoint($filename)) { $shareKeyPath = '/files_encryption/share-keys/' . $filename . '.' . $userId . '.shareKey'; diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 335ea3733eb..083b33c03cb 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -81,7 +81,7 @@ class Stream { * @return bool */ public function stream_open($path, $mode, $options, &$opened_path) { - + // assume that the file already exist before we decide it finally in getKey() $this->newFile = false; @@ -106,12 +106,12 @@ class Stream { if ($this->relPath === false) { $this->relPath = Helper::getPathToRealFile($this->rawPath); } - + if($this->relPath === false) { \OCP\Util::writeLog('Encryption library', 'failed to open file "' . $this->rawPath . '" expecting a path to user/files or to user/files_versions', \OCP\Util::ERROR); return false; } - + // Disable fileproxies so we can get the file size and open the source file without recursive encryption $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; @@ -188,7 +188,7 @@ class Stream { } // Get the data from the file handle - $data = fread($this->handle, 8192); + $data = fread($this->handle, $count); $result = null; @@ -272,7 +272,7 @@ class Stream { } else { $this->newFile = true; - + return false; } @@ -296,9 +296,9 @@ class Stream { return strlen($data); } - // Disable the file proxies so that encryption is not - // automatically attempted when the file is written to disk - - // we are handling that separately here and we don't want to + // Disable the file proxies so that encryption is not + // automatically attempted when the file is written to disk - + // we are handling that separately here and we don't want to // get into an infinite loop $proxyStatus = \OC_FileProxy::$enabled; \OC_FileProxy::$enabled = false; @@ -311,7 +311,7 @@ class Stream { $pointer = ftell($this->handle); // Get / generate the keyfile for the file we're handling - // If we're writing a new file (not overwriting an existing + // If we're writing a new file (not overwriting an existing // one), save the newly generated keyfile if (!$this->getKey()) { @@ -319,7 +319,7 @@ class Stream { } - // If extra data is left over from the last round, make sure it + // If extra data is left over from the last round, make sure it // is integrated into the next 6126 / 8192 block if ($this->writeCache) { @@ -344,12 +344,12 @@ class Stream { if ($remainingLength < 6126) { // Set writeCache to contents of $data - // The writeCache will be carried over to the - // next write round, and added to the start of - // $data to ensure that written blocks are - // always the correct length. If there is still - // data in writeCache after the writing round - // has finished, then the data will be written + // The writeCache will be carried over to the + // next write round, and added to the start of + // $data to ensure that written blocks are + // always the correct length. If there is still + // data in writeCache after the writing round + // has finished, then the data will be written // to disk by $this->flush(). $this->writeCache = $data; @@ -363,7 +363,7 @@ class Stream { $encrypted = $this->preWriteEncrypt($chunk, $this->plainKey); - // Write the data chunk to disk. This will be + // Write the data chunk to disk. This will be // attended to the last data chunk if the file // being handled totals more than 6126 bytes fwrite($this->handle, $encrypted); @@ -488,6 +488,7 @@ class Stream { $this->meta['mode'] !== 'rb' && $this->size > 0 ) { + // only write keyfiles if it was a new file if ($this->newFile === true) { @@ -535,6 +536,7 @@ class Stream { // set fileinfo $this->rootView->putFileInfo($this->rawPath, $fileInfo); + } return fclose($this->handle); diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index b8d68623493..d40c5d1a977 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -329,72 +329,73 @@ class Util { $this->view->is_dir($directory) && $handle = $this->view->opendir($directory) ) { - - while (false !== ($file = readdir($handle))) { - - if ( - $file !== "." - && $file !== ".." - ) { - - $filePath = $directory . '/' . $this->view->getRelativePath('/' . $file); - $relPath = \OCA\Encryption\Helper::stripUserFilesPath($filePath); - - // If the path is a directory, search - // its contents - if ($this->view->is_dir($filePath)) { - - $this->findEncFiles($filePath, $found); - - // If the path is a file, determine - // its encryption status - } elseif ($this->view->is_file($filePath)) { - - // Disable proxies again, some- - // where they got re-enabled :/ - \OC_FileProxy::$enabled = false; - - $isEncryptedPath = $this->isEncryptedPath($filePath); - // If the file is encrypted - // NOTE: If the userId is - // empty or not set, file will - // detected as plain - // NOTE: This is inefficient; - // scanning every file like this - // will eat server resources :( - if ( - Keymanager::getFileKey($this->view, $this->userId, $relPath) - && $isEncryptedPath - ) { - - $found['encrypted'][] = array( - 'name' => $file, - 'path' => $filePath - ); - - // If the file uses old - // encryption system - } elseif (Crypt::isLegacyEncryptedContent($isEncryptedPath, $relPath)) { - - $found['legacy'][] = array( - 'name' => $file, - 'path' => $filePath - ); - - // If the file is not encrypted - } else { - - $found['plain'][] = array( - 'name' => $file, - 'path' => $relPath - ); + if(is_resource($handle)) { + while (false !== ($file = readdir($handle))) { + + if ( + $file !== "." + && $file !== ".." + ) { + + $filePath = $directory . '/' . $this->view->getRelativePath('/' . $file); + $relPath = \OCA\Encryption\Helper::stripUserFilesPath($filePath); + + // If the path is a directory, search + // its contents + if ($this->view->is_dir($filePath)) { + + $this->findEncFiles($filePath, $found); + + // If the path is a file, determine + // its encryption status + } elseif ($this->view->is_file($filePath)) { + + // Disable proxies again, some- + // where they got re-enabled :/ + \OC_FileProxy::$enabled = false; + + $isEncryptedPath = $this->isEncryptedPath($filePath); + // If the file is encrypted + // NOTE: If the userId is + // empty or not set, file will + // detected as plain + // NOTE: This is inefficient; + // scanning every file like this + // will eat server resources :( + if ( + Keymanager::getFileKey($this->view, $this->userId, $relPath) + && $isEncryptedPath + ) { + + $found['encrypted'][] = array( + 'name' => $file, + 'path' => $filePath + ); + + // If the file uses old + // encryption system + } elseif (Crypt::isLegacyEncryptedContent($isEncryptedPath, $relPath)) { + + $found['legacy'][] = array( + 'name' => $file, + 'path' => $filePath + ); + + // If the file is not encrypted + } else { + + $found['plain'][] = array( + 'name' => $file, + 'path' => $relPath + ); + + } } } } - } \OC_FileProxy::$enabled = true; @@ -508,10 +509,11 @@ class Util { // get the size from filesystem $fullPath = $this->view->getLocalFile($path); - $size = filesize($fullPath); + $size = $this->view->filesize($path); // calculate last chunk nr $lastChunkNr = floor($size / 8192); + $lastChunkSize = $size - ($lastChunkNr * 8192); // open stream $stream = fopen('crypt://' . $path, "r"); @@ -524,7 +526,7 @@ class Util { fseek($stream, $lastChunckPos); // get the content of the last chunk - $lastChunkContent = fread($stream, 8192); + $lastChunkContent = fread($stream, $lastChunkSize); // calc the real file size with the size of the last chunk $realSize = (($lastChunkNr * 6126) + strlen($lastChunkContent)); @@ -1136,6 +1138,11 @@ class Util { // Make sure that a share key is generated for the owner too list($owner, $ownerPath) = $this->getUidAndFilename($filePath); + $pathinfo = pathinfo($ownerPath); + if(array_key_exists('extension', $pathinfo) && $pathinfo['extension'] === 'part') { + $ownerPath = $pathinfo['dirname'] . '/' . $pathinfo['filename']; + } + $userIds = array(); if ($sharingEnabled) { @@ -1289,8 +1296,25 @@ class Util { */ public function getUidAndFilename($path) { + $pathinfo = pathinfo($path); + $partfile = false; + $parentFolder = false; + if (array_key_exists('extension', $pathinfo) && $pathinfo['extension'] === 'part') { + // if the real file exists we check this file + $filePath = $this->userFilesDir . '/' .$pathinfo['dirname'] . '/' . $pathinfo['filename']; + if ($this->view->file_exists($filePath)) { + $pathToCheck = $pathinfo['dirname'] . '/' . $pathinfo['filename']; + } else { // otherwise we look for the parent + $pathToCheck = $pathinfo['dirname']; + $parentFolder = true; + } + $partfile = true; + } else { + $pathToCheck = $path; + } + $view = new \OC\Files\View($this->userFilesDir); - $fileOwnerUid = $view->getOwner($path); + $fileOwnerUid = $view->getOwner($pathToCheck); // handle public access if ($this->isPublic) { @@ -1319,12 +1343,18 @@ class Util { $filename = $path; } else { - - $info = $view->getFileInfo($path); + $info = $view->getFileInfo($pathToCheck); $ownerView = new \OC\Files\View('/' . $fileOwnerUid . '/files'); // Fetch real file path from DB - $filename = $ownerView->getPath($info['fileid']); // TODO: Check that this returns a path without including the user data dir + $filename = $ownerView->getPath($info['fileid']); + if ($parentFolder) { + $filename = $filename . '/'. $pathinfo['filename']; + } + + if ($partfile) { + $filename = $filename . '.' . $pathinfo['extension']; + } } @@ -1333,10 +1363,9 @@ class Util { \OC_Filesystem::normalizePath($filename) ); } - - } + /** * @brief go recursively through a dir and collect all files and sub files. * @param string $dir relative to the users files folder diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/Prods.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/Prods.inc.php index e7fa44b34d1..7e0fafdad83 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/Prods.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/Prods.inc.php @@ -1,4 +1,3 @@ <?php require_once("autoload.inc.php"); require_once("ProdsConfig.inc.php"); -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsConfig.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsConfig.inc.php index 478c90d631f..1089932a3e2 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsConfig.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsConfig.inc.php @@ -15,5 +15,3 @@ if (file_exists(__DIR__ . "/prods.ini")) { else { $GLOBALS['PRODS_CONFIG'] = array(); } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsPath.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsPath.class.php index be7c6c56788..fdf100b77a4 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsPath.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsPath.class.php @@ -279,5 +279,3 @@ abstract class ProdsPath } } - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsQuery.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsQuery.class.php index 62469725970..5e8dc92d594 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsQuery.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsQuery.class.php @@ -103,5 +103,3 @@ class ProdsQuery } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsRule.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsRule.class.php index 42308d9cc35..d14d87ad1aa 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsRule.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsRule.class.php @@ -58,5 +58,3 @@ class ProdsRule return $result; } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsStreamer.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsStreamer.class.php index 27b927bb033..67ef096c5c5 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/ProdsStreamer.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/ProdsStreamer.class.php @@ -432,5 +432,3 @@ stream_wrapper_register('rods', 'ProdsStreamer') or die ('Failed to register protocol:rods'); stream_wrapper_register('rods+ticket', 'ProdsStreamer') or die ('Failed to register protocol:rods'); -?> - diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSAccount.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSAccount.class.php index f47f85bc238..ba4c5ad96b0 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSAccount.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSAccount.class.php @@ -199,5 +199,3 @@ class RODSAccount return $dir->toURI(); } } - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSConn.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSConn.class.php index 0498f42cfaa..c10f880a5cc 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSConn.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSConn.class.php @@ -1611,5 +1611,3 @@ class RODSConn return $results; } } - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSConnManager.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSConnManager.class.php index 830e01bde84..b3e8155da4d 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSConnManager.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSConnManager.class.php @@ -77,5 +77,3 @@ class RODSConnManager } } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSException.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSException.class.php index 52eb95bbfb5..97116a102c1 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSException.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSException.class.php @@ -180,5 +180,3 @@ class RODSException extends Exception } } - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueConds.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueConds.class.php index 848f29e85e9..4bc10cc549f 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueConds.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueConds.class.php @@ -110,5 +110,3 @@ class RODSGenQueConds return $this->cond; } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueResults.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueResults.class.php index 41be1069afd..899b4f0e3b4 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueResults.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueResults.class.php @@ -95,5 +95,3 @@ class RODSGenQueResults return $this->numrow; } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueSelFlds.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueSelFlds.class.php index 10a32f6614f..aa391613d07 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueSelFlds.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSGenQueSelFlds.class.php @@ -156,5 +156,3 @@ class RODSGenQueSelFlds } } - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSKeyValPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSKeyValPair.class.php index 31b720cf19c..f347f7c988a 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSKeyValPair.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSKeyValPair.class.php @@ -46,5 +46,3 @@ class RODSKeyValPair return $new_keyval; } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSMessage.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSMessage.class.php index ca3e8bc23a6..243903a42df 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSMessage.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSMessage.class.php @@ -181,5 +181,3 @@ class RODSMessage return $rods_msg->pack(); } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RODSObjIOOpr.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/RODSObjIOOpr.inc.php index 95807d12ea8..1d367e900bc 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RODSObjIOOpr.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RODSObjIOOpr.inc.php @@ -17,4 +17,3 @@ define ("RSYNC_OPR", 14); define ("PHYMV_OPR", 15); define ("PHYMV_SRC", 16); define ("PHYMV_DEST", 17); -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RodsAPINum.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/RodsAPINum.inc.php index c4e2c031174..258dfcab39d 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RodsAPINum.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RodsAPINum.inc.php @@ -214,4 +214,3 @@ $GLOBALS['PRODS_API_NUMS_REV'] = array( '1100' => 'SSL_START_AN', '1101' => 'SSL_END_AN', ); -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RodsConst.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/RodsConst.inc.php index 1d51f619197..ecc2f5c2593 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RodsConst.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RodsConst.inc.php @@ -4,5 +4,3 @@ // are doing! define ("ORDER_BY", 0x400); define ("ORDER_BY_DESC", 0x800); - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RodsErrorTable.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/RodsErrorTable.inc.php index 7c4bb170d4a..177ca5b1260 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RodsErrorTable.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RodsErrorTable.inc.php @@ -584,4 +584,3 @@ $GLOBALS['PRODS_ERR_CODES_REV'] = array( '-993000' => 'PAM_AUTH_PASSWORD_FAILED', '-994000' => 'PAM_AUTH_PASSWORD_INVALID_TTL', ); -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryKeyWd.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryKeyWd.inc.php index ff830c6d6aa..55ad02e3b82 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryKeyWd.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryKeyWd.inc.php @@ -222,4 +222,3 @@ $GLOBALS['PRODS_GENQUE_KEYWD_REV'] = array( "lastExeTime" => 'RULE_LAST_EXE_TIME_KW', "exeStatus" => 'RULE_EXE_STATUS_KW', ); -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryNum.inc.php b/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryNum.inc.php index 82de94095b2..a65823ec877 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryNum.inc.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/RodsGenQueryNum.inc.php @@ -232,4 +232,3 @@ $GLOBALS['PRODS_GENQUE_NUMS_REV'] = array( '1105' => 'COL_TOKEN_VALUE3', '1106' => 'COL_TOKEN_COMMENT', ); -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php index 89040882d20..e5cff1f60e3 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RODSPacket.class.php @@ -246,5 +246,3 @@ class RODSPacket } */ } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php index 8cabcd0ae42..a7598bb7e62 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_BinBytesBuf.class.php @@ -10,5 +10,3 @@ class RP_BinBytesBuf extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php index b7ad6fd0cad..05c51cf56c0 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollInp.class.php @@ -15,5 +15,3 @@ class RP_CollInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php index 939d2e37596..a9140050bc7 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_CollOprStat.class.php @@ -13,5 +13,3 @@ class RP_CollOprStat extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php index c16b3628f5e..481ff34a22a 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjCopyInp.class.php @@ -15,5 +15,3 @@ class RP_DataObjCopyInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php index f7a8f939b82..f6200d1761c 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_DataObjInp.class.php @@ -18,5 +18,3 @@ class RP_DataObjInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php index 55dcb02383d..a7559e3c256 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecCmdOut.class.php @@ -52,5 +52,3 @@ class RP_ExecCmdOut extends RODSPacket } } } - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php index 88a62fc2b0c..2eb5dbd6ff9 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ExecMyRuleInp.class.php @@ -18,5 +18,3 @@ class RP_ExecMyRuleInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php index 2e1e29a2bfe..cf4bf340606 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryInp.class.php @@ -21,5 +21,3 @@ class RP_GenQueryInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php index e9f31dd5368..afec88c45b1 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_GenQueryOut.class.php @@ -18,5 +18,3 @@ class RP_GenQueryOut extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php index ac56bc93df8..e8af5c9fc5c 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxIvalPair.class.php @@ -23,5 +23,3 @@ class RP_InxIvalPair extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php index 787d27fd103..4a08780f4a3 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_InxValPair.class.php @@ -40,5 +40,3 @@ class RP_InxValPair extends RODSPacket } } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php index 6d8dd12ff12..905d88bc8a2 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_KeyValPair.class.php @@ -43,5 +43,3 @@ class RP_KeyValPair extends RODSPacket } } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php index 65ee3580e97..4f54c9c4e76 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MiscSvrInfo.class.php @@ -13,5 +13,3 @@ class RP_MiscSvrInfo extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php index b67b7083d44..467541734df 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_ModAVUMetadataInp.class.php @@ -14,5 +14,3 @@ class RP_ModAVUMetadataInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php index abf9bc471bb..fa5d4fcc3dc 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParam.class.php @@ -41,5 +41,3 @@ class RP_MsParam extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php index b747c098dd2..b664abe62bc 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsParamArray.class.php @@ -17,5 +17,3 @@ class RP_MsParamArray extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php index 0249da9a05d..f1b03f779d1 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_MsgHeader.class.php @@ -12,6 +12,3 @@ class RP_MsgHeader extends RODSPacket } } - -?> -
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php index 28602f3150f..2ac70dc22cc 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RHostAddr.class.php @@ -11,5 +11,3 @@ class RP_RHostAddr extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php index 290a4c9a5b0..96f427a2de5 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_RodsObjStat.class.php @@ -16,5 +16,3 @@ class RP_RodsObjStat extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php index 3f5a91a35d0..af7739988d4 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_STR.class.php @@ -10,5 +10,3 @@ class RP_STR extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php index 1950f096f13..e6ee1c3adbb 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_SqlResult.class.php @@ -11,5 +11,3 @@ class RP_SqlResult extends RODSPacket } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php index a411bd7425b..700fbd34428 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_StartupPack.class.php @@ -14,5 +14,3 @@ class RP_StartupPack extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php index bb591f01343..5c962649df0 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_TransStat.class.php @@ -12,5 +12,3 @@ class RP_TransStat extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php index a08cb6cc24c..9fa9b7d1c35 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_Version.class.php @@ -12,5 +12,3 @@ class RP_Version extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php index 9dc87140635..a702650c0eb 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authRequestOut.class.php @@ -10,5 +10,3 @@ class RP_authRequestOut extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php index 23d754df0ac..3f9cbc618f7 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_authResponseInp.class.php @@ -10,5 +10,3 @@ class RP_authResponseInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php index d16e1b3f3a4..d37afe23c95 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjCloseInp.class.php @@ -12,5 +12,3 @@ class RP_dataObjCloseInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php index 29bd1b68e35..31b12354714 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjReadInp.class.php @@ -12,5 +12,3 @@ class RP_dataObjReadInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php index 5327d7a8932..175b7e83402 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_dataObjWriteInp.class.php @@ -12,5 +12,3 @@ class RP_dataObjWriteInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php index e28a7b3b498..83b77f4704f 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekInp.class.php @@ -12,5 +12,3 @@ class RP_fileLseekInp extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php index cf01741bea6..45811e7ca68 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_fileLseekOut.class.php @@ -11,5 +11,3 @@ class RP_fileLseekOut extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php index ba073e97939..29c1001df68 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_getTempPasswordOut.class.php @@ -10,5 +10,3 @@ class RP_getTempPasswordOut extends RODSPacket } } - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php index 0bbc2334a82..e42ac918d45 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestInp.class.php @@ -10,4 +10,3 @@ class RP_pamAuthRequestInp extends RODSPacket } } -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php index 01959954c97..b3ec1306556 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_pamAuthRequestOut.class.php @@ -10,4 +10,3 @@ class RP_pamAuthRequestOut extends RODSPacket } } -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php index 530f3048604..26470378a7d 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslEndInp.class.php @@ -10,4 +10,3 @@ class RP_sslEndInp extends RODSPacket } } -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php index 03c8365898e..a23756e7860 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/packet/RP_sslStartInp.class.php @@ -10,4 +10,3 @@ class RP_sslStartInp extends RODSPacket } } -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsAPINum.php b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsAPINum.php index 382a85c051e..98c1f6cabdf 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsAPINum.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsAPINum.php @@ -66,5 +66,3 @@ $outputstr = $outputstr . ");\n"; $outputstr = $outputstr . "?>\n"; file_put_contents($prods_api_num_file, $outputstr); - -?> diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsErrorCodes.php b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsErrorCodes.php index d5c43773845..142b4af5702 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsErrorCodes.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsErrorCodes.php @@ -71,5 +71,3 @@ $outputstr = $outputstr . ");\n"; $outputstr = $outputstr . "?>\n"; file_put_contents($prods_error_table_file, $outputstr); - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryKeyWd.php b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryKeyWd.php index 4372a849aac..5a5968d25af 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryKeyWd.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryKeyWd.php @@ -69,5 +69,3 @@ $outputstr = $outputstr . ");\n"; $outputstr = $outputstr . "?>\n"; file_put_contents($prods_genque_keywd_file, $outputstr); - -?>
\ No newline at end of file diff --git a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryNum.php b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryNum.php index 03fa051f092..0be297826e6 100644 --- a/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryNum.php +++ b/apps/files_external/3rdparty/irodsphp/prods/src/setRodsGenQueryNum.php @@ -59,5 +59,3 @@ $outputstr = $outputstr . ");\n"; $outputstr = $outputstr . "?>\n"; file_put_contents($prods_genque_num_file, $outputstr); - -?>
\ No newline at end of file diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index 2d7bcd4ac37..c08a266b48c 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -183,17 +183,20 @@ class AmazonS3 extends \OC\Files\Storage\Common { } $dh = $this->opendir($path); - while (($file = readdir($dh)) !== false) { - if ($file === '.' || $file === '..') { - continue; - } - if ($this->is_dir($path . '/' . $file)) { - $this->rmdir($path . '/' . $file); - } else { - $this->unlink($path . '/' . $file); + if(is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if ($file === '.' || $file === '..') { + continue; + } + + if ($this->is_dir($path . '/' . $file)) { + $this->rmdir($path . '/' . $file); + } else { + $this->unlink($path . '/' . $file); + } } - } + } try { $result = $this->connection->deleteObject(array( @@ -464,15 +467,17 @@ class AmazonS3 extends \OC\Files\Storage\Common { } $dh = $this->opendir($path1); - while (($file = readdir($dh)) !== false) { - if ($file === '.' || $file === '..') { - continue; + if(is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if ($file === '.' || $file === '..') { + continue; + } + + $source = $path1 . '/' . $file; + $target = $path2 . '/' . $file; + $this->copy($source, $target); } - - $source = $path1 . '/' . $file; - $target = $path2 . '/' . $file; - $this->copy($source, $target); - } + } } return true; diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 1935740cd2e..659959e662e 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -378,7 +378,7 @@ class OC_Mount_Config { } $result = array(); $handle = opendir($path); - if ( ! $handle) { + if(!is_resource($handle)) { return array(); } while (false !== ($file = readdir($handle))) { diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php index 215bdcda6c2..b63b5885de1 100644 --- a/apps/files_external/lib/google.php +++ b/apps/files_external/lib/google.php @@ -206,14 +206,16 @@ class Google extends \OC\Files\Storage\Common { public function rmdir($path) { if (trim($path, '/') === '') { $dir = $this->opendir($path); - while (($file = readdir($dh)) !== false) { - if (!\OC\Files\Filesystem::isIgnoredDir($file)) { - if (!$this->unlink($path.'/'.$file)) { - return false; + if(is_resource($dir)) { + while (($file = readdir($dir)) !== false) { + if (!\OC\Files\Filesystem::isIgnoredDir($file)) { + if (!$this->unlink($path.'/'.$file)) { + return false; + } } } + closedir($dir); } - closedir($dir); $this->driveFiles = array(); return true; } else { diff --git a/apps/files_external/lib/irods.php b/apps/files_external/lib/irods.php index 7ec3b3a0cfc..6d4f66e856e 100644 --- a/apps/files_external/lib/irods.php +++ b/apps/files_external/lib/irods.php @@ -27,12 +27,12 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ private $auth_mode; public function __construct($params) { - if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { + if (isset($params['host'])) { $this->host = $params['host']; - $this->port = $params['port']; - $this->user = $params['user']; - $this->password = $params['password']; - $this->use_logon_credentials = $params['use_logon_credentials']; + $this->port = isset($params['port']) ? $params['port'] : 1247; + $this->user = isset($params['user']) ? $params['user'] : ''; + $this->password = isset($params['password']) ? $params['password'] : ''; + $this->use_logon_credentials = ($params['use_logon_credentials'] === 'true'); $this->zone = $params['zone']; $this->auth_mode = isset($params['auth_mode']) ? $params['auth_mode'] : ''; @@ -42,10 +42,11 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ } // take user and password from the session - if ($this->use_logon_credentials && isset($_SESSION['irods-credentials']) ) + if ($this->use_logon_credentials && \OC::$session->exists('irods-credentials')) { - $this->user = $_SESSION['irods-credentials']['uid']; - $this->password = $_SESSION['irods-credentials']['password']; + $params = \OC::$session->get('irods-credentials'); + $this->user = $params['uid']; + $this->password = $params['password']; } //create the root folder if necessary @@ -55,11 +56,11 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ } else { throw new \Exception(); } - + } public static function login( $params ) { - $_SESSION['irods-credentials'] = $params; + \OC::$session->set('irods-credentials', $params); } public function getId(){ @@ -137,11 +138,13 @@ class iRODS extends \OC\Files\Storage\StreamWrapper{ private function collectionMTime($path) { $dh = $this->opendir($path); $lastCTime = $this->filemtime($path); - while (($file = readdir($dh)) !== false) { - if ($file != '.' and $file != '..') { - $time = $this->filemtime($file); - if ($time > $lastCTime) { - $lastCTime = $time; + if(is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if ($file != '.' and $file != '..') { + $time = $this->filemtime($file); + if ($time > $lastCTime) { + $lastCTime = $time; + } } } } diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index 8e7a28fba1a..ecd4dae0484 100644 --- a/apps/files_external/lib/smb.php +++ b/apps/files_external/lib/smb.php @@ -99,11 +99,13 @@ class SMB extends \OC\Files\Storage\StreamWrapper{ private function shareMTime() { $dh=$this->opendir(''); $lastCtime=0; - while (($file = readdir($dh)) !== false) { - if ($file!='.' and $file!='..') { - $ctime=$this->filemtime($file); - if ($ctime>$lastCtime) { - $lastCtime=$ctime; + if(is_resource($dh)) { + while (($file = readdir($dh)) !== false) { + if ($file!='.' and $file!='..') { + $ctime=$this->filemtime($file); + if ($ctime>$lastCtime) { + $lastCtime=$ctime; + } } } } diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 357c6fdf540..acabc9a5c10 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -7,8 +7,6 @@ function fileDownloadPath(dir, file) { return url; } -var form_data; - $(document).ready(function() { $('#data-upload-form').tipsy({gravity:'ne', fade:true}); @@ -50,19 +48,20 @@ $(document).ready(function() { }); } - // Add some form data to the upload handler - file_upload_param.formData = { - MAX_FILE_SIZE: $('#uploadMaxFilesize').val(), - requesttoken: $('#publicUploadRequestToken').val(), - dirToken: $('#dirToken').val(), - appname: 'files_sharing', - subdir: $('input#dir').val() - }; + var file_upload_start = $('#file_upload_start'); + file_upload_start.on('fileuploadadd', function(e, data) { + // Add custom data to the upload handler + data.formData = { + requesttoken: $('#publicUploadRequestToken').val(), + dirToken: $('#dirToken').val(), + subdir: $('input#dir').val() + }; + }); - // Add Uploadprogress Wrapper to controls bar - $('#controls').append($('#additional_controls div#uploadprogresswrapper')); + // Add Uploadprogress Wrapper to controls bar + $('#controls').append($('#additional_controls div#uploadprogresswrapper')); - // Cancel upload trigger - $('#cancel_upload_button').click(Files.cancelUploads); + // Cancel upload trigger + $('#cancel_upload_button').click(Files.cancelUploads); }); diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 3be89a39fa0..03ed02f41ef 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -4,7 +4,7 @@ $(document).ready(function() { if (typeof OC.Share !== 'undefined' && typeof FileActions !== 'undefined' && !disableSharing) { - $('#fileList').one('fileActionsReady',function(){ + $('#fileList').on('fileActionsReady',function(){ OC.Share.loadIcons('file'); }); diff --git a/apps/files_sharing/l10n/es_AR.php b/apps/files_sharing/l10n/es_AR.php index fed0b1e7b30..7c9dcb94ac1 100644 --- a/apps/files_sharing/l10n/es_AR.php +++ b/apps/files_sharing/l10n/es_AR.php @@ -3,6 +3,12 @@ $TRANSLATIONS = array( "The password is wrong. Try again." => "La contraseña no es correcta. Probá de nuevo.", "Password" => "Contraseña", "Submit" => "Enviar", +"Sorry, this link doesn’t seem to work anymore." => "Perdón, este enlace parece no funcionar más.", +"Reasons might be:" => "Las causas podrían ser:", +"the item was removed" => "el elemento fue borrado", +"the link expired" => "el enlace expiró", +"sharing is disabled" => "compartir está desactivado", +"For more info, please ask the person who sent this link." => "Para mayor información, contactá a la persona que te mandó el enlace.", "%s shared the folder %s with you" => "%s compartió la carpeta %s con vos", "%s shared the file %s with you" => "%s compartió el archivo %s con vos", "Download" => "Descargar", diff --git a/apps/files_sharing/l10n/lt_LT.php b/apps/files_sharing/l10n/lt_LT.php index 5d0e58e2fb2..90ae6a39a07 100644 --- a/apps/files_sharing/l10n/lt_LT.php +++ b/apps/files_sharing/l10n/lt_LT.php @@ -1,7 +1,14 @@ <?php $TRANSLATIONS = array( +"The password is wrong. Try again." => "Netinka slaptažodis: Bandykite dar kartą.", "Password" => "Slaptažodis", "Submit" => "Išsaugoti", +"Sorry, this link doesn’t seem to work anymore." => "Atleiskite, panašu, kad nuoroda yra neveiksni.", +"Reasons might be:" => "Galimos priežastys:", +"the item was removed" => "elementas buvo pašalintas", +"the link expired" => "baigėsi nuorodos galiojimo laikas", +"sharing is disabled" => "dalinimasis yra išjungtas", +"For more info, please ask the person who sent this link." => "Dėl tikslesnės informacijos susisiekite su asmeniu atsiuntusiu nuorodą.", "%s shared the folder %s with you" => "%s pasidalino su jumis %s aplanku", "%s shared the file %s with you" => "%s pasidalino su jumis %s failu", "Download" => "Atsisiųsti", diff --git a/apps/files_sharing/l10n/nn_NO.php b/apps/files_sharing/l10n/nn_NO.php index bcb6538b09f..94272943e40 100644 --- a/apps/files_sharing/l10n/nn_NO.php +++ b/apps/files_sharing/l10n/nn_NO.php @@ -1,7 +1,14 @@ <?php $TRANSLATIONS = array( +"The password is wrong. Try again." => "Passordet er gale. Prøv igjen.", "Password" => "Passord", "Submit" => "Send", +"Sorry, this link doesn’t seem to work anymore." => "Orsak, denne lenkja fungerer visst ikkje lenger.", +"Reasons might be:" => "Moglege grunnar:", +"the item was removed" => "fila/mappa er fjerna", +"the link expired" => "lenkja har gått ut på dato", +"sharing is disabled" => "deling er slått av", +"For more info, please ask the person who sent this link." => "Spør den som sende deg lenkje om du vil ha meir informasjon.", "%s shared the folder %s with you" => "%s delte mappa %s med deg", "%s shared the file %s with you" => "%s delte fila %s med deg", "Download" => "Last ned", diff --git a/apps/files_sharing/l10n/sq.php b/apps/files_sharing/l10n/sq.php index ae29e5738ff..d2077663e8d 100644 --- a/apps/files_sharing/l10n/sq.php +++ b/apps/files_sharing/l10n/sq.php @@ -1,7 +1,14 @@ <?php $TRANSLATIONS = array( +"The password is wrong. Try again." => "Kodi është i gabuar. Provojeni përsëri.", "Password" => "Kodi", "Submit" => "Parashtro", +"Sorry, this link doesn’t seem to work anymore." => "Ju kërkojmë ndjesë, kjo lidhje duket sikur nuk punon më.", +"Reasons might be:" => "Arsyet mund të jenë:", +"the item was removed" => "elementi është eliminuar", +"the link expired" => "lidhja ka skaduar", +"sharing is disabled" => "ndarja është çaktivizuar", +"For more info, please ask the person who sent this link." => "Për më shumë informacione, ju lutem pyesni personin që iu dërgoi këtë lidhje.", "%s shared the folder %s with you" => "%s ndau me ju dosjen %s", "%s shared the file %s with you" => "%s ndau me ju skedarin %s", "Download" => "Shkarko", diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index d91acbbb2bd..257da89c84e 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -221,7 +221,8 @@ class Shared extends \OC\Files\Storage\Common { public function filemtime($path) { if ($path == '' || $path == '/') { $mtime = 0; - if ($dh = $this->opendir($path)) { + $dh = $this->opendir($path); + if(is_resource($dh)) { while (($filename = readdir($dh)) !== false) { $tempmtime = $this->filemtime($filename); if ($tempmtime > $mtime) { diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index ec6b4e815f8..6d3a07a9d0b 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -19,6 +19,20 @@ function fileCmp($a, $b) { } } +function determineIcon($file, $sharingRoot, $sharingToken) { + // for folders we simply reuse the files logic + if($file['type'] == 'dir') { + return \OCA\files\lib\Helper::determineIcon($file); + } + + $relativePath = substr($file['path'], 6); + $relativePath = substr($relativePath, strlen($sharingRoot)); + if($file['isPreviewAvailable']) { + return OCP\publicPreview_icon($relativePath, $sharingToken); + } + return OCP\mimetype_icon($file['mimetype']); +} + if (isset($_GET['t'])) { $token = $_GET['t']; $linkItem = OCP\Share::getShareByToken($token); @@ -133,6 +147,7 @@ if (isset($path)) { $tmpl->assign('mimetype', \OC\Files\Filesystem::getMimeType($path)); $tmpl->assign('fileTarget', basename($linkItem['file_target'])); $tmpl->assign('dirToken', $linkItem['token']); + $tmpl->assign('disableSharing', true); $allowPublicUploadEnabled = (bool) ($linkItem['permissions'] & OCP\PERMISSION_CREATE); if (\OCP\App::isEnabled('files_encryption')) { $allowPublicUploadEnabled = false; @@ -176,6 +191,7 @@ if (isset($path)) { } $i['directory'] = $getPath; $i['permissions'] = OCP\PERMISSION_READ; + $i['icon'] = determineIcon($i, $basePath, $token); $files[] = $i; } usort($files, "fileCmp"); @@ -191,7 +207,6 @@ if (isset($path)) { } $list = new OCP\Template('files', 'part.list', ''); $list->assign('files', $files); - $list->assign('disableSharing', true); $list->assign('baseURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&path='); $list->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path='); diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php new file mode 100644 index 00000000000..e72e67b01d7 --- /dev/null +++ b/apps/files_trashbin/ajax/list.php @@ -0,0 +1,51 @@ +<?php + +// only need filesystem apps +$RUNTIME_APPTYPES=array('filesystem'); + +// Init owncloud + + +OCP\JSON::checkLoggedIn(); + +// Load the files +$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; +$doBreadcrumb = isset( $_GET['breadcrumb'] ) ? true : false; +$data = array(); + +// Make breadcrumb +if($doBreadcrumb) { + $breadcrumb = \OCA\files_trashbin\lib\Helper::makeBreadcrumb($dir); + + $breadcrumbNav = new OCP\Template('files_trashbin', 'part.breadcrumb', ''); + $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); + $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir='); + $breadcrumbNav->assign('home', OCP\Util::linkTo('files', 'index.php')); + + $data['breadcrumb'] = $breadcrumbNav->fetchPage(); +} + +// make filelist +$files = \OCA\files_trashbin\lib\Helper::getTrashFiles($dir); + +if ($files === null){ + header("HTTP/1.0 404 Not Found"); + exit(); +} + +$dirlisting = false; +if ($dir && $dir !== '/') { + $dirlisting = true; +} + +$encodedDir = \OCP\Util::encodePath($dir); +$list = new OCP\Template('files_trashbin', 'part.list', ''); +$list->assign('files', $files, false); +$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$encodedDir); +$list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/'))); +$list->assign('dirlisting', $dirlisting); +$list->assign('disableDownloadActions', true); +$data['files'] = $list->fetchPage(); + +OCP\JSON::success(array('data' => $data)); + diff --git a/apps/files_trashbin/index.php b/apps/files_trashbin/index.php index 0baeab1de97..9f17448a757 100644 --- a/apps/files_trashbin/index.php +++ b/apps/files_trashbin/index.php @@ -10,91 +10,52 @@ OCP\Util::addScript('files_trashbin', 'disableDefaultActions'); OCP\Util::addScript('files', 'fileactions'); $tmpl = new OCP\Template('files_trashbin', 'index', 'user'); -$user = \OCP\User::getUser(); -$view = new OC_Filesystemview('/'.$user.'/files_trashbin/files'); - OCP\Util::addStyle('files', 'files'); OCP\Util::addScript('files', 'filelist'); +// filelist overrides +OCP\Util::addScript('files_trashbin', 'filelist'); +OCP\Util::addscript('files', 'files'); $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : ''; -$result = array(); -if ($dir) { - $dirlisting = true; - $dirContent = $view->opendir($dir); - $i = 0; - while(($entryName = readdir($dirContent)) !== false) { - if (!\OC\Files\Filesystem::isIgnoredDir($entryName)) { - $pos = strpos($dir.'/', '/', 1); - $tmp = substr($dir, 0, $pos); - $pos = strrpos($tmp, '.d'); - $timestamp = substr($tmp, $pos+2); - $result[] = array( - 'id' => $entryName, - 'timestamp' => $timestamp, - 'mime' => $view->getMimeType($dir.'/'.$entryName), - 'type' => $view->is_dir($dir.'/'.$entryName) ? 'dir' : 'file', - 'location' => $dir, - ); - } - } - closedir($dirContent); - -} else { - $dirlisting = false; - $query = \OC_DB::prepare('SELECT `id`,`location`,`timestamp`,`type`,`mime` FROM `*PREFIX*files_trash` WHERE `user` = ?'); - $result = $query->execute(array($user))->fetchAll(); +$isIE8 = false; +preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches); +if (count($matches) > 0 && $matches[1] <= 8){ + $isIE8 = true; } -$files = array(); -foreach ($result as $r) { - $i = array(); - $i['name'] = $r['id']; - $i['date'] = OCP\Util::formatDate($r['timestamp']); - $i['timestamp'] = $r['timestamp']; - $i['mimetype'] = $r['mime']; - $i['type'] = $r['type']; - if ($i['type'] === 'file') { - $fileinfo = pathinfo($r['id']); - $i['basename'] = $fileinfo['filename']; - $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : ''; +// if IE8 and "?dir=path" was specified, reformat the URL to use a hash like "#?dir=path" +if ($isIE8 && isset($_GET['dir'])){ + if ($dir === ''){ + $dir = '/'; } - $i['directory'] = $r['location']; - if ($i['directory'] === '/') { - $i['directory'] = ''; - } - $i['permissions'] = OCP\PERMISSION_READ; - $i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($r['mime']); - $files[] = $i; + header('Location: ' . OCP\Util::linkTo('files_trashbin', 'index.php') . '#?dir=' . \OCP\Util::encodePath($dir)); + exit(); } -function fileCmp($a, $b) { - if ($a['type'] === 'dir' and $b['type'] !== 'dir') { - return -1; - } elseif ($a['type'] !== 'dir' and $b['type'] === 'dir') { - return 1; - } else { - return strnatcasecmp($a['name'], $b['name']); - } +$ajaxLoad = false; + +if (!$isIE8){ + $files = \OCA\files_trashbin\lib\Helper::getTrashFiles($dir); +} +else{ + $files = array(); + $ajaxLoad = true; } -usort($files, "fileCmp"); - -// Make breadcrumb -$pathtohere = ''; -$breadcrumb = array(); -foreach (explode('/', $dir) as $i) { - if ($i !== '') { - if ( preg_match('/^(.+)\.d[0-9]+$/', $i, $match) ) { - $name = $match[1]; - } else { - $name = $i; - } - $pathtohere .= '/' . $i; - $breadcrumb[] = array('dir' => $pathtohere, 'name' => $name); - } +// Redirect if directory does not exist +if ($files === null){ + header('Location: ' . OCP\Util::linkTo('files_trashbin', 'index.php')); + exit(); } +$dirlisting = false; +if ($dir && $dir !== '/') { + $dirlisting = true; +} + +$breadcrumb = \OCA\files_trashbin\lib\Helper::makeBreadcrumb($dir); + $breadcrumbNav = new OCP\Template('files_trashbin', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb); $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir='); @@ -106,7 +67,6 @@ $list->assign('files', $files); $encodedDir = \OCP\Util::encodePath($dir); $list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$encodedDir); $list->assign('downloadURL', OCP\Util::linkTo('files_trashbin', 'download.php') . '?file='.$encodedDir); -$list->assign('disableSharing', true); $list->assign('dirlisting', $dirlisting); $list->assign('disableDownloadActions', true); @@ -114,6 +74,8 @@ $tmpl->assign('dirlisting', $dirlisting); $tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage()); $tmpl->assign('fileList', $list->fetchPage()); $tmpl->assign('files', $files); -$tmpl->assign('dir', \OC\Files\Filesystem::normalizePath($view->getAbsolutePath())); +$tmpl->assign('dir', $dir); +$tmpl->assign('disableSharing', true); +$tmpl->assign('ajaxLoad', true); $tmpl->printPage(); diff --git a/apps/files_trashbin/js/filelist.js b/apps/files_trashbin/js/filelist.js new file mode 100644 index 00000000000..cd5a67ddfe0 --- /dev/null +++ b/apps/files_trashbin/js/filelist.js @@ -0,0 +1,24 @@ +// override reload with own ajax call +FileList.reload = function(){ + FileList.showMask(); + if (FileList._reloadCall){ + FileList._reloadCall.abort(); + } + $.ajax({ + url: OC.filePath('files_trashbin','ajax','list.php'), + data: { + dir : $('#dir').val(), + breadcrumb: true + }, + error: function(result) { + FileList.reloadCallback(result); + }, + success: function(result) { + FileList.reloadCallback(result); + } + }); +} + +FileList.linkTo = function(dir){ + return OC.linkTo('files_trashbin', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/'); +} diff --git a/apps/files_trashbin/js/trash.js b/apps/files_trashbin/js/trash.js index 40c0bdb3829..d73eadb6011 100644 --- a/apps/files_trashbin/js/trash.js +++ b/apps/files_trashbin/js/trash.js @@ -171,9 +171,15 @@ $(document).ready(function() { action(filename); } } + + // event handlers for breadcrumb items + $('#controls').delegate('.crumb:not(.home) a', 'click', onClickBreadcrumb); }); - FileActions.actions.dir = {}; + FileActions.actions.dir = { + // only keep 'Open' action for navigation + 'Open': FileActions.actions.dir.Open + }; }); function processSelection(){ @@ -246,3 +252,9 @@ function disableActions() { $(".action").css("display", "none"); $(":input:checkbox").css("display", "none"); } +function onClickBreadcrumb(e){ + var $el = $(e.target).closest('.crumb'); + e.preventDefault(); + FileList.changeDirectory(decodeURIComponent($el.data('dir'))); +} + diff --git a/apps/files_trashbin/l10n/es_AR.php b/apps/files_trashbin/l10n/es_AR.php index 6f47255b506..0cb969a3483 100644 --- a/apps/files_trashbin/l10n/es_AR.php +++ b/apps/files_trashbin/l10n/es_AR.php @@ -8,8 +8,9 @@ $TRANSLATIONS = array( "Delete permanently" => "Borrar de manera permanente", "Name" => "Nombre", "Deleted" => "Borrado", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n directorio","%n directorios"), +"_%n file_::_%n files_" => array("%n archivo","%n archivos"), +"restored" => "recuperado", "Nothing in here. Your trash bin is empty!" => "No hay nada acá. ¡La papelera está vacía!", "Restore" => "Recuperar", "Delete" => "Borrar", diff --git a/apps/files_trashbin/l10n/lt_LT.php b/apps/files_trashbin/l10n/lt_LT.php index c4a12ff2175..0a51290f4d9 100644 --- a/apps/files_trashbin/l10n/lt_LT.php +++ b/apps/files_trashbin/l10n/lt_LT.php @@ -8,8 +8,9 @@ $TRANSLATIONS = array( "Delete permanently" => "Ištrinti negrįžtamai", "Name" => "Pavadinimas", "Deleted" => "Ištrinti", -"_%n folder_::_%n folders_" => array("","",""), -"_%n file_::_%n files_" => array("","",""), +"_%n folder_::_%n folders_" => array("","","%n aplankų"), +"_%n file_::_%n files_" => array("","","%n failų"), +"restored" => "atstatyta", "Nothing in here. Your trash bin is empty!" => "Nieko nėra. Jūsų šiukšliadėžė tuščia!", "Restore" => "Atstatyti", "Delete" => "Ištrinti", diff --git a/apps/files_trashbin/l10n/nn_NO.php b/apps/files_trashbin/l10n/nn_NO.php index 9e351668e33..73fe48211c2 100644 --- a/apps/files_trashbin/l10n/nn_NO.php +++ b/apps/files_trashbin/l10n/nn_NO.php @@ -8,8 +8,9 @@ $TRANSLATIONS = array( "Delete permanently" => "Slett for godt", "Name" => "Namn", "Deleted" => "Sletta", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n mappe","%n mapper"), +"_%n file_::_%n files_" => array("%n fil","%n filer"), +"restored" => "gjenoppretta", "Nothing in here. Your trash bin is empty!" => "Ingenting her. Papirkorga di er tom!", "Restore" => "Gjenopprett", "Delete" => "Slett", diff --git a/apps/files_trashbin/l10n/pt_BR.php b/apps/files_trashbin/l10n/pt_BR.php index 1e3c67ba027..e0e8c8faec6 100644 --- a/apps/files_trashbin/l10n/pt_BR.php +++ b/apps/files_trashbin/l10n/pt_BR.php @@ -8,8 +8,8 @@ $TRANSLATIONS = array( "Delete permanently" => "Excluir permanentemente", "Name" => "Nome", "Deleted" => "Excluído", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), +"_%n folder_::_%n folders_" => array("","%n pastas"), +"_%n file_::_%n files_" => array("%n arquivo","%n arquivos"), "restored" => "restaurado", "Nothing in here. Your trash bin is empty!" => "Nada aqui. Sua lixeira está vazia!", "Restore" => "Restaurar", diff --git a/apps/files_trashbin/l10n/sq.php b/apps/files_trashbin/l10n/sq.php index 1b7b5b828c8..50ca7d901b5 100644 --- a/apps/files_trashbin/l10n/sq.php +++ b/apps/files_trashbin/l10n/sq.php @@ -8,8 +8,9 @@ $TRANSLATIONS = array( "Delete permanently" => "Elimino përfundimisht", "Name" => "Emri", "Deleted" => "Eliminuar", -"_%n folder_::_%n folders_" => array("",""), -"_%n file_::_%n files_" => array("",""), +"_%n folder_::_%n folders_" => array("%n dosje","%n dosje"), +"_%n file_::_%n files_" => array("%n skedar","%n skedarë"), +"restored" => "rivendosur", "Nothing in here. Your trash bin is empty!" => "Këtu nuk ka asgjë. Koshi juaj është bosh!", "Restore" => "Rivendos", "Delete" => "Elimino", diff --git a/apps/files_trashbin/lib/helper.php b/apps/files_trashbin/lib/helper.php new file mode 100644 index 00000000000..098fc0b54b7 --- /dev/null +++ b/apps/files_trashbin/lib/helper.php @@ -0,0 +1,97 @@ +<?php + +namespace OCA\files_trashbin\lib; + +class Helper +{ + /** + * Retrieves the contents of a trash bin directory. + * @param string $dir path to the directory inside the trashbin + * or empty to retrieve the root of the trashbin + * @return array of files + */ + public static function getTrashFiles($dir){ + $result = array(); + $user = \OCP\User::getUser(); + + if ($dir && $dir !== '/') { + $view = new \OC_Filesystemview('/'.$user.'/files_trashbin/files'); + $dirContent = $view->opendir($dir); + if ($dirContent === false){ + return null; + } + if(is_resource($dirContent)){ + while(($entryName = readdir($dirContent)) !== false) { + if (!\OC\Files\Filesystem::isIgnoredDir($entryName)) { + $pos = strpos($dir.'/', '/', 1); + $tmp = substr($dir, 0, $pos); + $pos = strrpos($tmp, '.d'); + $timestamp = substr($tmp, $pos+2); + $result[] = array( + 'id' => $entryName, + 'timestamp' => $timestamp, + 'mime' => $view->getMimeType($dir.'/'.$entryName), + 'type' => $view->is_dir($dir.'/'.$entryName) ? 'dir' : 'file', + 'location' => $dir, + ); + } + } + closedir($dirContent); + } + } else { + $query = \OC_DB::prepare('SELECT `id`,`location`,`timestamp`,`type`,`mime` FROM `*PREFIX*files_trash` WHERE `user` = ?'); + $result = $query->execute(array($user))->fetchAll(); + } + + $files = array(); + foreach ($result as $r) { + $i = array(); + $i['name'] = $r['id']; + $i['date'] = \OCP\Util::formatDate($r['timestamp']); + $i['timestamp'] = $r['timestamp']; + $i['mimetype'] = $r['mime']; + $i['type'] = $r['type']; + if ($i['type'] === 'file') { + $fileinfo = pathinfo($r['id']); + $i['basename'] = $fileinfo['filename']; + $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : ''; + } + $i['directory'] = $r['location']; + if ($i['directory'] === '/') { + $i['directory'] = ''; + } + $i['permissions'] = \OCP\PERMISSION_READ; + $i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($r['mime']); + $i['icon'] = \OCA\files\lib\Helper::determineIcon($i); + $files[] = $i; + } + + usort($files, array('\OCA\files\lib\Helper', 'fileCmp')); + + return $files; + } + + /** + * Splits the given path into a breadcrumb structure. + * @param string $dir path to process + * @return array where each entry is a hash of the absolute + * directory path and its name + */ + public static function makeBreadcrumb($dir){ + // Make breadcrumb + $pathtohere = ''; + $breadcrumb = array(); + foreach (explode('/', $dir) as $i) { + if ($i !== '') { + if ( preg_match('/^(.+)\.d[0-9]+$/', $i, $match) ) { + $name = $match[1]; + } else { + $name = $i; + } + $pathtohere .= '/' . $i; + $breadcrumb[] = array('dir' => $pathtohere, 'name' => $name); + } + } + return $breadcrumb; + } +} diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php index 88c32b1f3eb..82ba0608834 100644 --- a/apps/files_trashbin/templates/index.php +++ b/apps/files_trashbin/templates/index.php @@ -5,10 +5,14 @@ </div> <div id='notification'></div> -<?php if (isset($_['files']) && count($_['files']) === 0 && $_['dirlisting'] === false):?> +<?php if (isset($_['files']) && count($_['files']) === 0 && $_['dirlisting'] === false && !$_['ajaxLoad']):?> <div id="emptycontent"><?php p($l->t('Nothing in here. Your trash bin is empty!'))?></div> <?php endif; ?> +<input type="hidden" name="ajaxLoad" id="ajaxLoad" value="<?php p($_['ajaxLoad']); ?>" /> +<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"></input> +<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> + <table id="filestable"> <thead> <tr> diff --git a/apps/files_trashbin/templates/part.breadcrumb.php b/apps/files_trashbin/templates/part.breadcrumb.php index 8ecab58e5c8..4acc298adbe 100644 --- a/apps/files_trashbin/templates/part.breadcrumb.php +++ b/apps/files_trashbin/templates/part.breadcrumb.php @@ -1,11 +1,11 @@ -<div class="crumb"> +<div class="crumb home"> <a href="<?php print_unescaped($_['home']); ?>"> <img src="<?php print_unescaped(OCP\image_path('core', 'places/home.svg'));?>" class="svg" /> </a> </div> <?php if(count($_["breadcrumb"])):?> <div class="crumb svg" - data-dir='<?php print_unescaped($_['baseURL']); ?>'> + data-dir='/'> <a href="<?php p($_['baseURL']); ?>"><?php p($l->t("Deleted Files")); ?></a> </div> <?php endif;?> diff --git a/apps/files_trashbin/templates/part.list.php b/apps/files_trashbin/templates/part.list.php index f7cc6b01bbb..78709d986ae 100644 --- a/apps/files_trashbin/templates/part.list.php +++ b/apps/files_trashbin/templates/part.list.php @@ -1,4 +1,3 @@ -<input type="hidden" id="disableSharing" data-status="<?php p($_['disableSharing']); ?>"> <?php foreach($_['files'] as $file): $relative_deleted_date = OCP\relative_modified_date($file['timestamp']); // the older the file, the brighter the shade of grey; days*14 @@ -12,7 +11,7 @@ data-permissions='<?php p($file['permissions']); ?>' <?php if ( $_['dirlisting'] ): ?> id="<?php p($file['directory'].'/'.$file['name']);?>" - data-file="<?php p($file['directory'].'/'.$file['name']);?>" + data-file="<?php p($name);?>" data-timestamp='' data-dirlisting=1 <?php else: ?> diff --git a/apps/files_versions/l10n/es_AR.php b/apps/files_versions/l10n/es_AR.php index 068f835d0af..3008220122f 100644 --- a/apps/files_versions/l10n/es_AR.php +++ b/apps/files_versions/l10n/es_AR.php @@ -2,6 +2,9 @@ $TRANSLATIONS = array( "Could not revert: %s" => "No se pudo revertir: %s ", "Versions" => "Versiones", +"Failed to revert {file} to revision {timestamp}." => "Falló al revertir {file} a la revisión {timestamp}.", +"More versions..." => "Más versiones...", +"No other versions available" => "No hay más versiones disponibles", "Restore" => "Recuperar" ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/files_versions/l10n/lt_LT.php b/apps/files_versions/l10n/lt_LT.php index 4e1af5fcc29..3afcfbe3b5f 100644 --- a/apps/files_versions/l10n/lt_LT.php +++ b/apps/files_versions/l10n/lt_LT.php @@ -2,6 +2,9 @@ $TRANSLATIONS = array( "Could not revert: %s" => "Nepavyko atstatyti: %s", "Versions" => "Versijos", +"Failed to revert {file} to revision {timestamp}." => "Nepavyko atstatyti {file} į būseną {timestamp}.", +"More versions..." => "Daugiau versijų...", +"No other versions available" => "Nėra daugiau versijų", "Restore" => "Atstatyti" ); $PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/apps/files_versions/l10n/nn_NO.php b/apps/files_versions/l10n/nn_NO.php index 79b518bc18d..608d72aaaed 100644 --- a/apps/files_versions/l10n/nn_NO.php +++ b/apps/files_versions/l10n/nn_NO.php @@ -2,6 +2,9 @@ $TRANSLATIONS = array( "Could not revert: %s" => "Klarte ikkje å tilbakestilla: %s", "Versions" => "Utgåver", +"Failed to revert {file} to revision {timestamp}." => "Klarte ikkje å tilbakestilla {file} til utgåva {timestamp}.", +"More versions..." => "Fleire utgåver …", +"No other versions available" => "Ingen andre utgåver tilgjengeleg", "Restore" => "Gjenopprett" ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/user_ldap/l10n/es_AR.php b/apps/user_ldap/l10n/es_AR.php index ecfcae32f46..2436df8de77 100644 --- a/apps/user_ldap/l10n/es_AR.php +++ b/apps/user_ldap/l10n/es_AR.php @@ -16,6 +16,7 @@ $TRANSLATIONS = array( "Connection test failed" => "Falló es test de conexión", "Do you really want to delete the current Server Configuration?" => "¿Realmente desea borrar la configuración actual del servidor?", "Confirm Deletion" => "Confirmar borrado", +"<b>Warning:</b> Apps user_ldap and user_webdavauth are incompatible. You may experience unexpected behavior. Please ask your system administrator to disable one of them." => "<b>Advertencia:</b> Las apps user_ldap y user_webdavauth son incompatibles. Puede ser que experimentes comportamientos inesperados. Pedile al administrador que desactive uno de ellos.", "<b>Warning:</b> The PHP LDAP module is not installed, the backend will not work. Please ask your system administrator to install it." => "<b>Atención:</b> El módulo PHP LDAP no está instalado, este elemento no va a funcionar. Por favor, pedile al administrador que lo instale.", "Server configuration" => "Configuración del Servidor", "Add Server Configuration" => "Añadir Configuración del Servidor", @@ -29,8 +30,11 @@ $TRANSLATIONS = array( "Password" => "Contraseña", "For anonymous access, leave DN and Password empty." => "Para acceso anónimo, dejá DN y contraseña vacíos.", "User Login Filter" => "Filtro de inicio de sesión de usuario", +"Defines the filter to apply, when login is attempted. %%uid replaces the username in the login action. Example: \"uid=%%uid\"" => "Define el filtro a aplicar cuando se intenta ingresar. %%uid remplaza el nombre de usuario en el proceso de identificación. Por ejemplo: \"uid=%%uid\"", "User List Filter" => "Lista de filtros de usuario", +"Defines the filter to apply, when retrieving users (no placeholders). Example: \"objectClass=person\"" => "Define el filtro a aplicar al obtener usuarios (sin comodines). Por ejemplo: \"objectClass=person\"", "Group Filter" => "Filtro de grupo", +"Defines the filter to apply, when retrieving groups (no placeholders). Example: \"objectClass=posixGroup\"" => "Define el filtro a aplicar al obtener grupos (sin comodines). Por ejemplo: \"objectClass=posixGroup\"", "Connection Settings" => "Configuración de Conección", "Configuration Active" => "Configuración activa", "When unchecked, this configuration will be skipped." => "Si no está seleccionada, esta configuración será omitida.", @@ -39,19 +43,23 @@ $TRANSLATIONS = array( "Give an optional backup host. It must be a replica of the main LDAP/AD server." => "Dar un servidor de copia de seguridad opcional. Debe ser una réplica del servidor principal LDAP/AD.", "Backup (Replica) Port" => "Puerto para copia de seguridad (réplica)", "Disable Main Server" => "Deshabilitar el Servidor Principal", +"Only connect to the replica server." => "Conectarse únicamente al servidor de réplica.", "Use TLS" => "Usar TLS", "Do not use it additionally for LDAPS connections, it will fail." => "No usar adicionalmente para conexiones LDAPS, las mismas fallarán", "Case insensitve LDAP server (Windows)" => "Servidor de LDAP sensible a mayúsculas/minúsculas (Windows)", "Turn off SSL certificate validation." => "Desactivar la validación por certificado SSL.", +"Not recommended, use it for testing only! If connection only works with this option, import the LDAP server's SSL certificate in your %s server." => "No es recomendado, ¡Usalo solamente para pruebas! Si la conexión únicamente funciona con esta opción, importá el certificado SSL del servidor LDAP en tu servidor %s.", "Cache Time-To-Live" => "Tiempo de vida del caché", "in seconds. A change empties the cache." => "en segundos. Cambiarlo vacía la cache.", "Directory Settings" => "Configuración de Directorio", "User Display Name Field" => "Campo de nombre de usuario a mostrar", +"The LDAP attribute to use to generate the user's display name." => "El atributo LDAP a usar para generar el nombre de usuario mostrado.", "Base User Tree" => "Árbol base de usuario", "One User Base DN per line" => "Una DN base de usuario por línea", "User Search Attributes" => "Atributos de la búsqueda de usuario", "Optional; one attribute per line" => "Opcional; un atributo por linea", "Group Display Name Field" => "Campo de nombre de grupo a mostrar", +"The LDAP attribute to use to generate the groups's display name." => "El atributo LDAP a usar para generar el nombre de grupo mostrado.", "Base Group Tree" => "Árbol base de grupo", "One Group Base DN per line" => "Una DN base de grupo por línea", "Group Search Attributes" => "Atributos de búsqueda de grupo", @@ -64,10 +72,13 @@ $TRANSLATIONS = array( "User Home Folder Naming Rule" => "Regla de nombre de los directorios de usuario", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." => "Vacío para el nombre de usuario (por defecto). En otro caso, especificá un atributo LDAP/AD.", "Internal Username" => "Nombre interno de usuario", +"By default the internal username will be created from the UUID attribute. It makes sure that the username is unique and characters do not need to be converted. The internal username has the restriction that only these characters are allowed: [ a-zA-Z0-9_.@- ]. Other characters are replaced with their ASCII correspondence or simply omitted. On collisions a number will be added/increased. The internal username is used to identify a user internally. It is also the default name for the user home folder. It is also a part of remote URLs, for instance for all *DAV services. With this setting, the default behavior can be overridden. To achieve a similar behavior as before ownCloud 5 enter the user display name attribute in the following field. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users." => "Por defecto, el nombre de usuario interno es creado a partir del atributo UUID. Esto asegura que el nombre de usuario es único y no es necesaria una conversión de caracteres. El nombre de usuario interno sólo se pueden usar estos caracteres: [ a-zA-Z0-9_.@- ]. El resto de caracteres son sustituidos por su correspondiente en ASCII o simplemente omitidos. En caso colisiones, se agregará o incrementará un número. El nombre de usuario interno es usado para identificar un usuario. Es también el nombre predeterminado para el directorio personal del usuario en ownCloud. También es parte de las URLs remotas, por ejemplo, para los servicios *DAV. Con esta opción, se puede cambiar el comportamiento por defecto. Para conseguir un comportamiento similar a versiones anteriores a ownCloud 5, ingresá el atributo del nombre mostrado en el campo siguiente. Dejalo vacío para el comportamiento por defecto. Los cambios solo tendrán efecto en los nuevos usuarios LDAP mapeados (agregados).", "Internal Username Attribute:" => "Atributo Nombre Interno de usuario:", "Override UUID detection" => "Sobrescribir la detección UUID", +"By default, the UUID attribute is automatically detected. The UUID attribute is used to doubtlessly identify LDAP users and groups. Also, the internal username will be created based on the UUID, if not specified otherwise above. You can override the setting and pass an attribute of your choice. You must make sure that the attribute of your choice can be fetched for both users and groups and it is unique. Leave it empty for default behavior. Changes will have effect only on newly mapped (added) LDAP users and groups." => "Por defecto, el atributo UUID es detectado automáticamente. Este atributo es usado para identificar de manera certera usuarios y grupos LDAP. Además, el nombre de usuario interno será creado en base al UUID, si no fue especificado otro comportamiento más arriba. Podés sobrescribir la configuración y pasar un atributo de tu elección. Tenés que asegurarte que el atributo de tu elección sea accesible por los usuarios y grupos y que sea único. Dejalo en blanco para usar el comportamiento por defecto. Los cambios tendrán efecto sólo en los nuevos usuarios y grupos de LDAP mapeados (agregados).", "UUID Attribute:" => "Atributo UUID:", "Username-LDAP User Mapping" => "Asignación del Nombre de usuario de un usuario LDAP", +"Usernames are used to store and assign (meta) data. In order to precisely identify and recognize users, each LDAP user will have a internal username. This requires a mapping from username to LDAP user. The created username is mapped to the UUID of the LDAP user. Additionally the DN is cached as well to reduce LDAP interaction, but it is not used for identification. If the DN changes, the changes will be found. The internal username is used all over. Clearing the mappings will have leftovers everywhere. Clearing the mappings is not configuration sensitive, it affects all LDAP configurations! Never clear the mappings in a production environment, only in a testing or experimental stage." => "Los usuarios son usados para almacenar y asignar datos (metadatos). Con el fin de identificar de forma precisa y reconocer usuarios, a cada usuario de LDAP se será asignado un nombre de usuario interno. Esto requiere un mapeo entre el nombre de usuario y el usuario del LDAP. El nombre de usuario creado es mapeado respecto al UUID del usuario en el LDAP. De forma adicional, el DN es dejado en caché para reducir la interacción entre el LDAP, pero no es usado para la identificación. Si el DN cambia, los cambios van a ser aplicados. El nombre de usuario interno es usado en todos los lugares. Vaciar los mapeos, deja restos por todas partes. Vaciar los mapeos, no es sensible a configuración, ¡afecta a todas las configuraciones del LDAP! Nunca limpies los mapeos en un entorno de producción, solamente en fase de desarrollo o experimental.", "Clear Username-LDAP User Mapping" => "Borrar la asignación de los Nombres de usuario de los usuarios LDAP", "Clear Groupname-LDAP Group Mapping" => "Borrar la asignación de los Nombres de grupo de los grupos de LDAP", "Test Configuration" => "Probar configuración", diff --git a/apps/user_ldap/l10n/lt_LT.php b/apps/user_ldap/l10n/lt_LT.php index 7e8b389af7f..2c3b938fcfe 100644 --- a/apps/user_ldap/l10n/lt_LT.php +++ b/apps/user_ldap/l10n/lt_LT.php @@ -2,6 +2,7 @@ $TRANSLATIONS = array( "Deletion failed" => "Ištrinti nepavyko", "Error" => "Klaida", +"Host" => "Mazgas", "Password" => "Slaptažodis", "Group Filter" => "Grupės filtras", "Port" => "Prievadas", diff --git a/apps/user_ldap/l10n/nn_NO.php b/apps/user_ldap/l10n/nn_NO.php index 5e584aa31e3..470114d9359 100644 --- a/apps/user_ldap/l10n/nn_NO.php +++ b/apps/user_ldap/l10n/nn_NO.php @@ -2,6 +2,7 @@ $TRANSLATIONS = array( "Deletion failed" => "Feil ved sletting", "Error" => "Feil", +"Host" => "Tenar", "Password" => "Passord", "Help" => "Hjelp" ); diff --git a/apps/user_webdavauth/l10n/es_AR.php b/apps/user_webdavauth/l10n/es_AR.php index 608b0ad8179..4ec0bf5a626 100644 --- a/apps/user_webdavauth/l10n/es_AR.php +++ b/apps/user_webdavauth/l10n/es_AR.php @@ -1,5 +1,7 @@ <?php $TRANSLATIONS = array( -"WebDAV Authentication" => "Autenticación de WevDAV" +"WebDAV Authentication" => "Autenticación de WebDAV", +"Address: " => "Dirección:", +"The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "Las credenciales del usuario serán enviadas a esta dirección. Este plug-in verificará la respuesta e interpretará los códigos de estado HTTP 401 y 403 como credenciales inválidas y cualquier otra respuesta como válida." ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; diff --git a/apps/user_webdavauth/l10n/fr.php b/apps/user_webdavauth/l10n/fr.php index b11e3d5a026..709fa53dac5 100644 --- a/apps/user_webdavauth/l10n/fr.php +++ b/apps/user_webdavauth/l10n/fr.php @@ -1,5 +1,6 @@ <?php $TRANSLATIONS = array( +"WebDAV Authentication" => "Authentification WebDAV", "Address: " => "Adresse :", "The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "Les informations de connexion de l'utilisateur seront envoyées à cette adresse. Ce module analyse le code de la réponse HTTP et considère les codes 401 et 403 comme une authentification invalide et tout autre valeur comme une authentification valide." ); diff --git a/apps/user_webdavauth/l10n/lt_LT.php b/apps/user_webdavauth/l10n/lt_LT.php index 90fc2d5ac3e..41a7fa9502d 100644 --- a/apps/user_webdavauth/l10n/lt_LT.php +++ b/apps/user_webdavauth/l10n/lt_LT.php @@ -1,5 +1,7 @@ <?php $TRANSLATIONS = array( -"WebDAV Authentication" => "WebDAV autorizavimas" +"WebDAV Authentication" => "WebDAV autentikacija", +"Address: " => "Adresas:", +"The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "Naudotojo duomenys bus nusiųsti šiuo adresu. Šis įskiepis patikrins gautą atsakymą ir interpretuos HTTP būsenos kodą 401 ir 403 kaip negaliojančius duomenis, ir visus kitus gautus atsakymus kaip galiojančius duomenis. " ); $PLURAL_FORMS = "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);"; diff --git a/apps/user_webdavauth/l10n/nn_NO.php b/apps/user_webdavauth/l10n/nn_NO.php index 519b942f9f5..909231b5f58 100644 --- a/apps/user_webdavauth/l10n/nn_NO.php +++ b/apps/user_webdavauth/l10n/nn_NO.php @@ -1,5 +1,7 @@ <?php $TRANSLATIONS = array( -"WebDAV Authentication" => "WebDAV-autentisering" +"WebDAV Authentication" => "WebDAV-autentisering", +"Address: " => "Adresse:", +"The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials." => "Innloggingsinformasjon blir sendt til denne nettadressa. Dette programtillegget kontrollerer svaret og tolkar HTTP-statuskodane 401 og 403 som ugyldige, og alle andre svar som gyldige." ); $PLURAL_FORMS = "nplurals=2; plural=(n != 1);"; |