diff --git a/apps/files/admin.php b/apps/files/admin.php index a8f2deffc9..547f2bd7dd 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -30,8 +30,11 @@ OCP\User::checkAdminUser(); $htaccessWorking=(getenv('htaccessWorking')=='true'); $upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); +$upload_max_filesize_possible = OCP\Util::computerFileSize(get_cfg_var('upload_max_filesize')); $post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); +$post_max_size_possible = OCP\Util::computerFileSize(get_cfg_var('post_max_size')); $maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size)); +$maxUploadFilesizePossible = OCP\Util::humanFileSize(min($upload_max_filesize_possible, $post_max_size_possible)); if($_POST) { if(isset($_POST['maxUploadSize'])) { if(($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) { @@ -56,7 +59,8 @@ $htaccessWritable=is_writable(OC::$SERVERROOT.'/.htaccess'); $tmpl = new OCP\Template( 'files', 'admin' ); $tmpl->assign( 'uploadChangable', $htaccessWorking and $htaccessWritable ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); -$tmpl->assign( 'maxPossibleUploadSize', OCP\Util::humanFileSize(PHP_INT_MAX)); +$tmpl->assign( 'maxPossibleUploadSize', $maxUploadFilesizePossible); $tmpl->assign( 'allowZipDownload', $allowZipDownload); $tmpl->assign( 'maxZipInputSize', $maxZipInputSize); -return $tmpl->fetchPage(); \ No newline at end of file +return $tmpl->fetchPage(); + diff --git a/apps/files/ajax/newfolder.php b/apps/files/ajax/newfolder.php index 34c2d0ca14..0f1f2f14eb 100644 --- a/apps/files/ajax/newfolder.php +++ b/apps/files/ajax/newfolder.php @@ -20,7 +20,13 @@ if(strpos($foldername, '/')!==false) { } if(OC_Files::newFile($dir, stripslashes($foldername), 'dir')) { - OCP\JSON::success(array("data" => array())); + if ( $dir != '/') { + $path = $dir.'/'.$foldername; + } else { + $path = '/'.$foldername; + } + $id = OC_FileCache::getId($path); + OCP\JSON::success(array("data" => array('id'=>$id))); exit(); } diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 4bce4a624e..de73357907 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -116,11 +116,14 @@ var FileList={ $('#emptyfolder').hide(); $('.file_upload_filename').removeClass('highlight'); }, - loadingDone:function(name){ + loadingDone:function(name, id){ var mime, tr=$('tr').filterAttr('data-file',name); tr.data('loading',false); mime=tr.data('mime'); tr.attr('data-mime',mime); + if (id != null) { + tr.attr('data-id', id); + } getMimeIcon(mime,function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); }); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index b36e46813d..64919acb5d 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -347,7 +347,7 @@ $(document).ready(function() { if(size==t('files','Pending')){ $('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); } - FileList.loadingDone(file.name); + FileList.loadingDone(file.name, file.id); } else { $('#notification').text(t('files', response.data.message)); $('#notification').fadeIn(); @@ -377,7 +377,7 @@ $(document).ready(function() { if(size==t('files','Pending')){ $('tr').filterAttr('data-file',file.name).find('td.filesize').text(file.size); } - FileList.loadingDone(file.name); + FileList.loadingDone(file.name, file.id); } else { $('#notification').text(t('files', response.data.message)); $('#notification').fadeIn(); @@ -519,6 +519,7 @@ $(document).ready(function() { FileList.addFile(name,0,date,false,hidden); var tr=$('tr').filterAttr('data-file',name); tr.data('mime','text/plain').data('id',result.data.id); + tr.attr('data-id', result.data.id); getMimeIcon('text/plain',function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); }); @@ -536,6 +537,8 @@ $(document).ready(function() { if (result.status == 'success') { var date=new Date(); FileList.addDir(name,0,date,hidden); + var tr=$('tr').filterAttr('data-file',name); + tr.attr('data-id', result.data.id); } else { OC.dialogs.alert(result.data.message, 'Error'); } @@ -572,6 +575,7 @@ $(document).ready(function() { FileList.addFile(localName,size,date,false,hidden); var tr=$('tr').filterAttr('data-file',localName); tr.data('mime',mime).data('id',id); + tr.attr('data-id', id); getMimeIcon(mime,function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); }); diff --git a/apps/files/l10n/pt_PT.php b/apps/files/l10n/pt_PT.php index a2b53824e8..5968769f2a 100644 --- a/apps/files/l10n/pt_PT.php +++ b/apps/files/l10n/pt_PT.php @@ -1,6 +1,6 @@ "Sem erro, ficheiro enviado com sucesso", -"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "O ficheiro enviado escede o diretivo upload_max_filesize no php.ini", +"The uploaded file exceeds the upload_max_filesize directive in php.ini" => "O ficheiro enviado excede a directiva upload_max_filesize no php.ini", "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "O ficheiro enviado excede o diretivo MAX_FILE_SIZE especificado no formulário HTML", "The uploaded file was only partially uploaded" => "O ficheiro enviado só foi enviado parcialmente", "No file was uploaded" => "Não foi enviado nenhum ficheiro", @@ -10,24 +10,24 @@ "Unshare" => "Deixar de partilhar", "Delete" => "Apagar", "Rename" => "Renomear", -"already exists" => "Já existe", +"already exists" => "já existe", "replace" => "substituir", "suggest name" => "Sugira um nome", "cancel" => "cancelar", -"replaced" => "substituido", +"replaced" => "substituído", "undo" => "desfazer", "with" => "com", "unshared" => "não partilhado", "deleted" => "apagado", "generating ZIP-file, it may take some time." => "a gerar o ficheiro ZIP, poderá demorar algum tempo.", -"Unable to upload your file as it is a directory or has 0 bytes" => "Não é possivel fazer o upload do ficheiro devido a ser uma pasta ou ter 0 bytes", -"Upload Error" => "Erro no upload", +"Unable to upload your file as it is a directory or has 0 bytes" => "Não é possível fazer o envio do ficheiro devido a ser uma pasta ou ter 0 bytes", +"Upload Error" => "Erro no envio", "Pending" => "Pendente", "1 file uploading" => "A enviar 1 ficheiro", "files uploading" => "ficheiros a serem enviados", -"Upload cancelled." => "O upload foi cancelado.", +"Upload cancelled." => "O envio foi cancelado.", "File upload is in progress. Leaving the page now will cancel the upload." => "Envio de ficheiro em progresso. Irá cancelar o envio se sair da página agora.", -"Invalid name, '/' is not allowed." => "nome inválido, '/' não permitido.", +"Invalid name, '/' is not allowed." => "Nome inválido, '/' não permitido.", "files scanned" => "ficheiros analisados", "error while scanning" => "erro ao analisar", "Name" => "Nome", @@ -37,21 +37,21 @@ "folders" => "pastas", "file" => "ficheiro", "files" => "ficheiros", -"seconds ago" => "à segundos", -"minute ago" => "à um minuto", -"minutes ago" => "à minutos", +"seconds ago" => "há segundos", +"minute ago" => "há um minuto", +"minutes ago" => "há minutos", "today" => "hoje", "yesterday" => "ontem", -"days ago" => "à dias", +"days ago" => "há dias", "last month" => "mês passado", -"months ago" => "à meses", +"months ago" => "há meses", "last year" => "ano passado", -"years ago" => "à anos", +"years ago" => "há anos", "File handling" => "Manuseamento de ficheiros", "Maximum upload size" => "Tamanho máximo de envio", "max. possible: " => "max. possivel: ", -"Needed for multi-file and folder downloads." => "Necessário para multi download de ficheiros e pastas", -"Enable ZIP-download" => "Ativar dowload de ficheiros ZIP", +"Needed for multi-file and folder downloads." => "Necessário para descarregamento múltiplo de ficheiros e pastas", +"Enable ZIP-download" => "Permitir descarregar em ficheiro ZIP", "0 is unlimited" => "0 é ilimitado", "Maximum input size for ZIP files" => "Tamanho máximo para ficheiros ZIP", "Save" => "Guardar", @@ -60,12 +60,12 @@ "Folder" => "Pasta", "From url" => "Do endereço", "Upload" => "Enviar", -"Cancel upload" => "Cancelar upload", -"Nothing in here. Upload something!" => "Vazio. Envia alguma coisa!", +"Cancel upload" => "Cancelar envio", +"Nothing in here. Upload something!" => "Vazio. Envie alguma coisa!", "Share" => "Partilhar", "Download" => "Transferir", "Upload too large" => "Envio muito grande", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Os ficheiro que estás a tentar enviar excedem o tamanho máximo de envio neste servidor.", +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Os ficheiros que está a tentar enviar excedem o tamanho máximo de envio permitido neste servidor.", "Files are being scanned, please wait." => "Os ficheiros estão a ser analisados, por favor aguarde.", "Current scanning" => "Análise actual" ); diff --git a/apps/files_external/l10n/sk_SK.php b/apps/files_external/l10n/sk_SK.php index 0b351d306e..04257a8014 100644 --- a/apps/files_external/l10n/sk_SK.php +++ b/apps/files_external/l10n/sk_SK.php @@ -1,4 +1,9 @@ "Prístup povolený", +"Grant access" => "Povoliť prístup", +"Fill out all required fields" => "Vyplňte všetky vyžadované kolónky", +"Please provide a valid Dropbox app key and secret." => "Zadajte platný kľúč aplikácie a heslo Dropbox", +"Error configuring Google Drive storage" => "Chyba pri konfigurácii úložiska Google drive", "External Storage" => "Externé úložisko", "Mount point" => "Prípojný bod", "Backend" => "Backend", diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 6d1bb1f55f..cb32fed203 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -109,6 +109,21 @@ class OC_Mount_Config { return $personal; } + /** + * Add directory for mount point to the filesystem + * @param OC_Fileview instance $view + * @param string path to mount point + */ + private static function addMountPointDirectory($view, $path) { + $dir = ''; + foreach ( explode('/', $path) as $pathPart) { + $dir = $dir.'/'.$pathPart; + if ( !$view->file_exists($dir)) { + $view->mkdir($dir); + } + } + } + /** * Add a mount point to the filesystem @@ -127,8 +142,33 @@ class OC_Mount_Config { if ($applicable != OCP\User::getUser() || $class == '\OC\Files\Storage\Local') { return false; } + $view = new OC_FilesystemView('/'.OCP\User::getUser().'/files'); + self::addMountPointDirectory($view, ltrim($mountPoint, '/')); $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/'); } else { + $view = new OC_FilesystemView('/'); + switch ($mountType) { + case 'user': + if ($applicable == "all") { + $users = OCP\User::getUsers(); + foreach ( $users as $user ) { + $path = $user.'/files/'.ltrim($mountPoint, '/'); + self::addMountPointDirectory($view, $path); + } + } else { + $path = $applicable.'/files/'.ltrim($mountPoint, '/'); + self::addMountPointDirectory($view, $path); + } + break; + case 'group' : + $groupMembers = OC_Group::usersInGroups(array($applicable)); + foreach ( $groupMembers as $user ) { + $path = $user.'/files/'.ltrim($mountPoint, '/'); + self::addMountPointDirectory($view, $path); + } + break; + } + $mountPoint = '/$user/files/'.ltrim($mountPoint, '/'); } $mount = array($applicable => array($mountPoint => array('class' => $class, 'options' => $classOptions))); diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index a171751589..bc94d78fb7 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -46,7 +46,7 @@ $(document).ready(function() { var appendTo = $(tr).find('td.filename'); // Check if drop down is already visible for a different file if (OC.Share.droppedDown) { - if (item != $('#dropdown').data('item')) { + if ($(tr).data('id') != $('#dropdown').attr('data-item-source')) { OC.Share.hideDropDown(function () { $(tr).addClass('mouseOver'); OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions); diff --git a/apps/files_sharing/l10n/he.php b/apps/files_sharing/l10n/he.php index 68a337241d..ff7be88af8 100644 --- a/apps/files_sharing/l10n/he.php +++ b/apps/files_sharing/l10n/he.php @@ -1,6 +1,8 @@ "ססמה", "Submit" => "שליחה", +"%s shared the folder %s with you" => "%s שיתף עמך את התיקייה %s", +"%s shared the file %s with you" => "%s שיתף עמך את הקובץ %s", "Download" => "הורדה", "No preview available for" => "אין תצוגה מקדימה זמינה עבור", "web services under your control" => "שירותי רשת תחת השליטה שלך" diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index 9075095d28..aa79cffeca 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -21,7 +21,7 @@ $(document).ready(function(){ } ,function(filename){ // Action to perform when clicked - if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback + if (scanFiles.scanning || !$('#dropdown').hasClass('drop-versions')){return;}//workaround to prevent additional http request block scanning feedback var file = $('#dir').val()+'/'+filename; // Check if drop down is already visible for a different file @@ -45,7 +45,7 @@ function createVersionsDropdown(filename, files) { var historyUrl = OC.linkTo('files_versions', 'history.php') + '?path='+encodeURIComponent( $( '#dir' ).val() ).replace( /%2F/g, '/' )+'/'+encodeURIComponent( filename ); - var html = '