diff options
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/newfile.php | 7 | ||||
-rw-r--r-- | apps/files/js/files.js | 17 | ||||
-rw-r--r-- | apps/files/l10n/eu.php | 13 | ||||
-rw-r--r-- | apps/files/l10n/hr.php | 20 | ||||
-rw-r--r-- | apps/files/l10n/pl.php | 12 | ||||
-rw-r--r-- | apps/files/templates/index.php | 2 | ||||
-rw-r--r-- | apps/files/templates/part.breadcrumb.php | 4 |
7 files changed, 64 insertions, 11 deletions
diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index c2d65d718c5..77d866979c3 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -8,12 +8,11 @@ if(!OC_User::isLoggedIn()) { } session_write_close(); - // Get the params -$dir = isset( $_REQUEST['dir'] ) ? stripslashes($_REQUEST['dir']) : ''; -$filename = isset( $_REQUEST['filename'] ) ? stripslashes($_REQUEST['filename']) : ''; +$dir = isset( $_REQUEST['dir'] ) ? trim($_REQUEST['dir'], '/\\') : ''; +$filename = isset( $_REQUEST['filename'] ) ? trim($_REQUEST['filename'], '/\\') : ''; $content = isset( $_REQUEST['content'] ) ? $_REQUEST['content'] : ''; -$source = isset( $_REQUEST['source'] ) ? stripslashes($_REQUEST['source']) : ''; +$source = isset( $_REQUEST['source'] ) ? trim($_REQUEST['source'], '/\\') : ''; if($source) { $eventSource=new OC_EventSource(); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 0c00fe8c922..b36e46813dc 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -178,7 +178,12 @@ $(document).ready(function() { var dir=$('#dir').val()||'/'; $('#notification').text(t('files','generating ZIP-file, it may take some time.')); $('#notification').fadeIn(); - window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: files }); + // use special download URL if provided, e.g. for public shared files + if ( (downloadURL = document.getElementById("downloadURL")) ) { + window.location=downloadURL.value+"&download&files="+files; + } else { + window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: files }); + } return false; }); @@ -194,7 +199,8 @@ $(document).ready(function() { $(document).bind('drop dragover', function (e) { e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone }); - + + if ( document.getElementById("data-upload-form") ) { $(function() { $('.file_upload_start').fileupload({ dropZone: $('#content'), // restrict dropZone to content div @@ -408,7 +414,7 @@ $(document).ready(function() { } }) }); - + } $.assocArraySize = function(obj) { // http://stackoverflow.com/a/6700/11236 var size = 0, key; @@ -592,7 +598,10 @@ $(document).ready(function() { var lastWidth = 0; var breadcrumbs = []; - var breadcrumbsWidth = $('#navigation').get(0).offsetWidth; + var breadcrumbsWidth = 0; + if ( document.getElementById("navigation") ) { + breadcrumbsWidth = $('#navigation').get(0).offsetWidth; + } var hiddenBreadcrumbs = 0; $.each($('.crumb'), function(index, breadcrumb) { diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php index 9c504880008..94212afe8c2 100644 --- a/apps/files/l10n/eu.php +++ b/apps/files/l10n/eu.php @@ -9,6 +9,7 @@ "Files" => "Fitxategiak", "Unshare" => "Ez partekatu", "Delete" => "Ezabatu", +"Rename" => "Berrizendatu", "already exists" => "dagoeneko existitzen da", "replace" => "ordeztu", "suggest name" => "aholkatu izena", @@ -22,6 +23,8 @@ "Unable to upload your file as it is a directory or has 0 bytes" => "Ezin da zure fitxategia igo, karpeta bat da edo 0 byt ditu", "Upload Error" => "Igotzean errore bat suertatu da", "Pending" => "Zain", +"1 file uploading" => "fitxategi 1 igotzen", +"files uploading" => "fitxategiak igotzen", "Upload cancelled." => "Igoera ezeztatuta", "File upload is in progress. Leaving the page now will cancel the upload." => "Fitxategien igoera martxan da. Orria orain uzteak igoera ezeztatutko du.", "Invalid name, '/' is not allowed." => "Baliogabeko izena, '/' ezin da erabili. ", @@ -34,6 +37,16 @@ "folders" => "Karpetak", "file" => "fitxategia", "files" => "fitxategiak", +"seconds ago" => "segundu", +"minute ago" => "minutu", +"minutes ago" => "minutu", +"today" => "gaur", +"yesterday" => "atzo", +"days ago" => "egun", +"last month" => "joan den hilabetean", +"months ago" => "hilabete", +"last year" => "joan den urtean", +"years ago" => "urte", "File handling" => "Fitxategien kudeaketa", "Maximum upload size" => "Igo daitekeen gehienezko tamaina", "max. possible: " => "max, posiblea:", diff --git a/apps/files/l10n/hr.php b/apps/files/l10n/hr.php index f3b26999e8f..412c97630d4 100644 --- a/apps/files/l10n/hr.php +++ b/apps/files/l10n/hr.php @@ -7,20 +7,29 @@ "Missing a temporary folder" => "Nedostaje privremena mapa", "Failed to write to disk" => "Neuspjelo pisanje na disk", "Files" => "Datoteke", +"Unshare" => "Prekini djeljenje", "Delete" => "Briši", +"Rename" => "Promjeni ime", "already exists" => "već postoji", "replace" => "zamjeni", +"suggest name" => "predloži ime", "cancel" => "odustani", "replaced" => "zamjenjeno", "undo" => "vrati", "with" => "sa", +"unshared" => "maknuto djeljenje", "deleted" => "izbrisano", "generating ZIP-file, it may take some time." => "generiranje ZIP datoteke, ovo može potrajati.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nemoguće poslati datoteku jer je prazna ili je direktorij", "Upload Error" => "Pogreška pri slanju", "Pending" => "U tijeku", +"1 file uploading" => "1 datoteka se učitava", +"files uploading" => "datoteke se učitavaju", "Upload cancelled." => "Slanje poništeno.", +"File upload is in progress. Leaving the page now will cancel the upload." => "Učitavanje datoteke. Napuštanjem stranice će prekinuti učitavanje.", "Invalid name, '/' is not allowed." => "Neispravan naziv, znak '/' nije dozvoljen.", +"files scanned" => "datoteka skenirana", +"error while scanning" => "grečka prilikom skeniranja", "Name" => "Naziv", "Size" => "Veličina", "Modified" => "Zadnja promjena", @@ -28,6 +37,16 @@ "folders" => "mape", "file" => "datoteka", "files" => "datoteke", +"seconds ago" => "sekundi prije", +"minute ago" => "minutu", +"minutes ago" => "minuta", +"today" => "danas", +"yesterday" => "jučer", +"days ago" => "dana", +"last month" => "prošli mjesec", +"months ago" => "mjeseci", +"last year" => "prošlu godinu", +"years ago" => "godina", "File handling" => "datoteka za rukovanje", "Maximum upload size" => "Maksimalna veličina prijenosa", "max. possible: " => "maksimalna moguća: ", @@ -35,6 +54,7 @@ "Enable ZIP-download" => "Omogući ZIP-preuzimanje", "0 is unlimited" => "0 je \"bez limita\"", "Maximum input size for ZIP files" => "Maksimalna veličina za ZIP datoteke", +"Save" => "Snimi", "New" => "novo", "Text file" => "tekstualna datoteka", "Folder" => "mapa", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index 1f823d0bb5e..425c6a5a18d 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -23,6 +23,8 @@ "Unable to upload your file as it is a directory or has 0 bytes" => "Nie można wczytać pliku jeśli jest katalogiem lub ma 0 bajtów", "Upload Error" => "Błąd wczytywania", "Pending" => "Oczekujące", +"1 file uploading" => "1 plik wczytany", +"files uploading" => "pliki wczytane", "Upload cancelled." => "Wczytywanie anulowane.", "File upload is in progress. Leaving the page now will cancel the upload." => "Wysyłanie pliku jest w toku. Teraz opuszczając stronę wysyłanie zostanie anulowane.", "Invalid name, '/' is not allowed." => "Nieprawidłowa nazwa '/' jest niedozwolone.", @@ -35,6 +37,16 @@ "folders" => "foldery", "file" => "plik", "files" => "pliki", +"seconds ago" => "sekund temu", +"minute ago" => "minutę temu", +"minutes ago" => "minut temu", +"today" => "dziś", +"yesterday" => "wczoraj", +"days ago" => "dni temu", +"last month" => "ostani miesiąc", +"months ago" => "miesięcy temu", +"last year" => "ostatni rok", +"years ago" => "lat temu", "File handling" => "Zarządzanie plikami", "Maximum upload size" => "Maksymalny rozmiar wysyłanego pliku", "max. possible: " => "max. możliwych", diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index aff484f0a7a..d49f2f4d5d3 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -12,7 +12,7 @@ </ul> </div> <div class="file_upload_wrapper svg"> - <form data-upload-id='1' class="file_upload_form" action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target_1"> + <form data-upload-id='1' id="data-upload-form" class="file_upload_form" action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target_1"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload"> <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)"> <input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir"> diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index 875fc747bb7..71b695f65f8 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,6 +1,6 @@ <?php for($i=0; $i<count($_["breadcrumb"]); $i++): $crumb = $_["breadcrumb"][$i]; ?> - <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo OCP\image_path('core','breadcrumb.png');?>")'> - <a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> + <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo urlencode($crumb["dir"]);?>' style='background-image:url("<?php echo OCP\image_path('core','breadcrumb.png');?>")'> + <a href="<?php echo $_['baseURL'].urlencode($crumb["dir"]); ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a> </div> <?php endfor;?> |