summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-09-19 12:03:58 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-09-19 12:03:58 +0200
commitc199c4ad67737754c2274a97e3137cee33b7e2d9 (patch)
tree01fb451f21a6fb4cc51259885f3aa2c95610039f /apps
parent6596094a284f8e800a2b50f9cf82973ce7daea2f (diff)
parent518ca0ac58c7cf762d0fc51f75cc886cedd495b0 (diff)
downloadnextcloud-server-c199c4ad67737754c2274a97e3137cee33b7e2d9.tar.gz
nextcloud-server-c199c4ad67737754c2274a97e3137cee33b7e2d9.zip
Merge branch 'master' of github.com:owncloud/core
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js4
-rw-r--r--apps/files/l10n/cs_CZ.php2
-rw-r--r--apps/files/l10n/de.php4
-rw-r--r--apps/files/l10n/gl.php7
-rw-r--r--apps/files/l10n/it.php2
-rw-r--r--apps/files/l10n/pl.php2
-rw-r--r--apps/files/l10n/ro.php24
-rw-r--r--apps/files/l10n/sl.php2
-rw-r--r--apps/files/l10n/sv.php2
-rw-r--r--apps/files/l10n/th_TH.php2
-rw-r--r--apps/files/l10n/zh_CN.php2
-rw-r--r--apps/files_encryption/l10n/gl.php6
-rw-r--r--apps/files_encryption/l10n/ro.php6
-rw-r--r--apps/files_external/l10n/gl.php18
-rw-r--r--apps/files_external/l10n/ro.php18
-rw-r--r--apps/files_sharing/js/public.js17
-rw-r--r--apps/files_sharing/js/share.js6
-rw-r--r--apps/files_sharing/l10n/gl.php7
-rw-r--r--apps/files_sharing/l10n/ro.php7
-rw-r--r--apps/files_sharing/public.php104
-rwxr-xr-xapps/files_sharing/templates/public.php24
-rw-r--r--apps/files_versions/l10n/fi_FI.php4
-rw-r--r--apps/files_versions/l10n/gl.php7
-rw-r--r--apps/files_versions/l10n/nl.php4
-rw-r--r--apps/files_versions/l10n/pl.php4
-rw-r--r--apps/files_versions/l10n/ro.php7
26 files changed, 262 insertions, 30 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f2e04256231..fd4cee90fd1 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -157,7 +157,7 @@ var FileList={
tr.attr('data-file', newname);
var path = td.children('a.name').attr('href');
td.children('a.name').attr('href', path.replace(encodeURIComponent(name), encodeURIComponent(newname)));
- if (newname.indexOf('.') > 0) {
+ if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
var basename=newname.substr(0,newname.lastIndexOf('.'));
} else {
var basename=newname;
@@ -166,7 +166,7 @@ var FileList={
var span=$('<span class="nametext"></span>');
span.text(basename);
td.children('a.name').append(span);
- if (newname.indexOf('.') > 0) {
+ if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
span.append($('<span class="extension">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
}
tr.data('renaming',false);
diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php
index 41ef4e78499..fccf651dc34 100644
--- a/apps/files/l10n/cs_CZ.php
+++ b/apps/files/l10n/cs_CZ.php
@@ -25,6 +25,8 @@
"Upload cancelled." => "Odesílání zrušeno.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Probíhá odesílání souboru. Opuštění stránky vyústí ve zrušení nahrávání.",
"Invalid name, '/' is not allowed." => "Neplatný název, znak '/' není povolen",
+"files scanned" => "soubory prohledány",
+"error while scanning" => "chyba při prohledávání",
"Size" => "Velikost",
"Modified" => "Změněno",
"folder" => "složka",
diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php
index 701c3e877ad..837ca1eabe2 100644
--- a/apps/files/l10n/de.php
+++ b/apps/files/l10n/de.php
@@ -19,12 +19,14 @@
"unshared" => "Nicht mehr teilen",
"deleted" => "gelöscht",
"generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.",
-"Unable to upload your file as it is a directory or has 0 bytes" => "Ihre Datei kann nicht hochgeladen werden, da sie ein Verzeichnis ist oder 0 Bytes hat.",
+"Unable to upload your file as it is a directory or has 0 bytes" => "Ihre Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis ist oder 0 Bytes hat.",
"Upload Error" => "Fehler beim Hochladen",
"Pending" => "Ausstehend",
"Upload cancelled." => "Hochladen abgebrochen.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.",
"Invalid name, '/' is not allowed." => "Ungültiger Name: \"/\" ist nicht erlaubt.",
+"files scanned" => "Dateien gescannt",
+"error while scanning" => "Fehler beim Scannen",
"Size" => "Größe",
"Modified" => "Bearbeitet",
"folder" => "Ordner",
diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php
index 67293de5cb7..acf136d82f6 100644
--- a/apps/files/l10n/gl.php
+++ b/apps/files/l10n/gl.php
@@ -7,20 +7,26 @@
"Missing a temporary folder" => "Falta un cartafol temporal",
"Failed to write to disk" => "Erro ao escribir no disco",
"Files" => "Ficheiros",
+"Unshare" => "Deixar de compartir",
"Delete" => "Eliminar",
"already exists" => "xa existe",
"replace" => "substituír",
+"suggest name" => "suxira nome",
"cancel" => "cancelar",
"replaced" => "substituído",
"undo" => "desfacer",
"with" => "con",
+"unshared" => "non compartido",
"deleted" => "eliminado",
"generating ZIP-file, it may take some time." => "xerando ficheiro ZIP, pode levar un anaco.",
"Unable to upload your file as it is a directory or has 0 bytes" => "Non se puido subir o ficheiro pois ou é un directorio ou ten 0 bytes",
"Upload Error" => "Erro na subida",
"Pending" => "Pendentes",
"Upload cancelled." => "Subida cancelada.",
+"File upload is in progress. Leaving the page now will cancel the upload." => "A subida do ficheiro está en curso. Saír agora da páxina cancelará a subida.",
"Invalid name, '/' is not allowed." => "Nome non válido, '/' non está permitido.",
+"files scanned" => "ficheiros analizados",
+"error while scanning" => "erro mentras analizaba",
"Size" => "Tamaño",
"Modified" => "Modificado",
"folder" => "cartafol",
@@ -34,6 +40,7 @@
"Enable ZIP-download" => "Habilitar a descarga-ZIP",
"0 is unlimited" => "0 significa ilimitado",
"Maximum input size for ZIP files" => "Tamaño máximo de descarga para os ZIP",
+"Save" => "Gardar",
"New" => "Novo",
"Text file" => "Ficheiro de texto",
"Folder" => "Cartafol",
diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php
index c7046118a3a..574219cf913 100644
--- a/apps/files/l10n/it.php
+++ b/apps/files/l10n/it.php
@@ -25,6 +25,8 @@
"Upload cancelled." => "Invio annullato",
"File upload is in progress. Leaving the page now will cancel the upload." => "Caricamento del file in corso. La chiusura della pagina annullerà il caricamento.",
"Invalid name, '/' is not allowed." => "Nome non valido",
+"files scanned" => "file analizzati",
+"error while scanning" => "errore durante la scansione",
"Size" => "Dimensione",
"Modified" => "Modificato",
"folder" => "cartella",
diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php
index 289a6139158..22f1dd3df88 100644
--- a/apps/files/l10n/pl.php
+++ b/apps/files/l10n/pl.php
@@ -25,6 +25,8 @@
"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.",
+"files scanned" => "Pliki skanowane",
+"error while scanning" => "Wystąpił błąd podczas skanowania",
"Size" => "Rozmiar",
"Modified" => "Czas modyfikacji",
"folder" => "folder",
diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php
index 58a6d2454f5..5fd9b60ce6a 100644
--- a/apps/files/l10n/ro.php
+++ b/apps/files/l10n/ro.php
@@ -7,9 +7,32 @@
"Missing a temporary folder" => "Lipsește un dosar temporar",
"Failed to write to disk" => "Eroare la scriere pe disc",
"Files" => "Fișiere",
+"Unshare" => "Anulează partajarea",
"Delete" => "Șterge",
+"already exists" => "deja există",
+"replace" => "înlocuire",
+"suggest name" => "sugerează nume",
+"cancel" => "anulare",
+"replaced" => "înlocuit",
+"undo" => "Anulează ultima acțiune",
+"with" => "cu",
+"unshared" => "nepartajat",
+"deleted" => "șters",
+"generating ZIP-file, it may take some time." => "se generază fișierul ZIP, va dura ceva timp.",
+"Unable to upload your file as it is a directory or has 0 bytes" => "Nu s-a putut încărca fișierul tău deoarece pare să fie un director sau are 0 bytes.",
+"Upload Error" => "Eroare la încărcare",
+"Pending" => "În așteptare",
+"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.",
+"Invalid name, '/' is not allowed." => "Nume invalid, '/' nu este permis.",
+"files scanned" => "fișiere scanate",
+"error while scanning" => "eroare la scanarea",
"Size" => "Dimensiune",
"Modified" => "Modificat",
+"folder" => "director",
+"folders" => "directoare",
+"file" => "fișier",
+"files" => "fișiere",
"File handling" => "Manipulare fișiere",
"Maximum upload size" => "Dimensiune maximă admisă la încărcare",
"max. possible: " => "max. posibil:",
@@ -17,6 +40,7 @@
"Enable ZIP-download" => "Activează descărcare fișiere compresate",
"0 is unlimited" => "0 e nelimitat",
"Maximum input size for ZIP files" => "Dimensiunea maximă de intrare pentru fișiere compresate",
+"Save" => "Salvare",
"New" => "Nou",
"Text file" => "Fișier text",
"Folder" => "Dosar",
diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php
index 1a7ae8c0b10..a3b5ceeff65 100644
--- a/apps/files/l10n/sl.php
+++ b/apps/files/l10n/sl.php
@@ -25,6 +25,8 @@
"Upload cancelled." => "Nalaganje je bilo preklicano.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Nalaganje datoteke je v teku. Če zapustite to stran zdaj, boste nalaganje preklicali.",
"Invalid name, '/' is not allowed." => "Neveljavno ime. Znak '/' ni dovoljen.",
+"files scanned" => "pregledanih datotek",
+"error while scanning" => "napaka med pregledovanjem datotek",
"Size" => "Velikost",
"Modified" => "Spremenjeno",
"folder" => "mapa",
diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php
index 06d988d4512..78ddc95ff42 100644
--- a/apps/files/l10n/sv.php
+++ b/apps/files/l10n/sv.php
@@ -25,6 +25,8 @@
"Upload cancelled." => "Uppladdning avbruten.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Filuppladdning pågår. Lämnar du sidan så avbryts uppladdningen.",
"Invalid name, '/' is not allowed." => "Ogiltigt namn, '/' är inte tillåten.",
+"files scanned" => "filer skannade",
+"error while scanning" => "fel vid skanning",
"Size" => "Storlek",
"Modified" => "Ändrad",
"folder" => "mapp",
diff --git a/apps/files/l10n/th_TH.php b/apps/files/l10n/th_TH.php
index 2208051236c..988bfd50a2f 100644
--- a/apps/files/l10n/th_TH.php
+++ b/apps/files/l10n/th_TH.php
@@ -25,6 +25,8 @@
"Upload cancelled." => "การอัพโหลดถูกยกเลิก",
"File upload is in progress. Leaving the page now will cancel the upload." => "การอัพโหลดไฟล์กำลังอยู่ในระหว่างดำเนินการ การออกจากหน้าเว็บนี้จะทำให้การอัพโหลดถูกยกเลิก",
"Invalid name, '/' is not allowed." => "ชื่อที่ใช้ไม่ถูกต้อง '/' ไม่อนุญาตให้ใช้งาน",
+"files scanned" => "ไฟล์ต่างๆได้รับการสแกนแล้ว",
+"error while scanning" => "พบข้อผิดพลาดในระหว่างการสแกนไฟล์",
"Size" => "ขนาด",
"Modified" => "ปรับปรุงล่าสุด",
"folder" => "โฟลเดอร์",
diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php
index cd8dbe406a4..67289f8f483 100644
--- a/apps/files/l10n/zh_CN.php
+++ b/apps/files/l10n/zh_CN.php
@@ -25,6 +25,8 @@
"Upload cancelled." => "上传已取消",
"File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传中。现在离开此页会导致上传动作被取消。",
"Invalid name, '/' is not allowed." => "非法的名称,不允许使用‘/’。",
+"files scanned" => "已扫描文件",
+"error while scanning" => "扫描时出错",
"Size" => "大小",
"Modified" => "修改日期",
"folder" => "文件夹",
diff --git a/apps/files_encryption/l10n/gl.php b/apps/files_encryption/l10n/gl.php
new file mode 100644
index 00000000000..1434ff48aac
--- /dev/null
+++ b/apps/files_encryption/l10n/gl.php
@@ -0,0 +1,6 @@
+<?php $TRANSLATIONS = array(
+"Encryption" => "Encriptado",
+"Exclude the following file types from encryption" => "Excluír os seguintes tipos de ficheiro da encriptación",
+"None" => "Nada",
+"Enable Encryption" => "Habilitar encriptación"
+);
diff --git a/apps/files_encryption/l10n/ro.php b/apps/files_encryption/l10n/ro.php
new file mode 100644
index 00000000000..97f3f262d76
--- /dev/null
+++ b/apps/files_encryption/l10n/ro.php
@@ -0,0 +1,6 @@
+<?php $TRANSLATIONS = array(
+"Encryption" => "Încriptare",
+"Exclude the following file types from encryption" => "Exclude următoarele tipuri de fișiere de la încriptare",
+"None" => "Niciuna",
+"Enable Encryption" => "Activare încriptare"
+);
diff --git a/apps/files_external/l10n/gl.php b/apps/files_external/l10n/gl.php
new file mode 100644
index 00000000000..c6de7b837a6
--- /dev/null
+++ b/apps/files_external/l10n/gl.php
@@ -0,0 +1,18 @@
+<?php $TRANSLATIONS = array(
+"External Storage" => "Almacenamento externo",
+"Mount point" => "Punto de montaxe",
+"Backend" => "Almacén",
+"Configuration" => "Configuración",
+"Options" => "Opcións",
+"Applicable" => "Aplicable",
+"Add mount point" => "Engadir punto de montaxe",
+"None set" => "Non establecido",
+"All Users" => "Tódolos usuarios",
+"Groups" => "Grupos",
+"Users" => "Usuarios",
+"Delete" => "Eliminar",
+"SSL root certificates" => "Certificados raíz SSL",
+"Import Root Certificate" => "Importar Certificado Raíz",
+"Enable User External Storage" => "Habilitar almacenamento externo do usuario",
+"Allow users to mount their own external storage" => "Permitir aos usuarios montar os seus propios almacenamentos externos"
+);
diff --git a/apps/files_external/l10n/ro.php b/apps/files_external/l10n/ro.php
new file mode 100644
index 00000000000..f5114f61791
--- /dev/null
+++ b/apps/files_external/l10n/ro.php
@@ -0,0 +1,18 @@
+<?php $TRANSLATIONS = array(
+"External Storage" => "Stocare externă",
+"Mount point" => "Punctul de montare",
+"Backend" => "Backend",
+"Configuration" => "Configurație",
+"Options" => "Opțiuni",
+"Applicable" => "Aplicabil",
+"Add mount point" => "Adaugă punct de montare",
+"None set" => "Niciunul",
+"All Users" => "Toți utilizatorii",
+"Groups" => "Grupuri",
+"Users" => "Utilizatori",
+"Delete" => "Șterge",
+"SSL root certificates" => "Certificate SSL root",
+"Import Root Certificate" => "Importă certificat root",
+"Enable User External Storage" => "Permite stocare externă pentru utilizatori",
+"Allow users to mount their own external storage" => "Permite utilizatorilor să monteze stocare externă proprie"
+);
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 92b626bba18..def02374804 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -1,6 +1,10 @@
// Override download path to files_sharing/public.php
function fileDownloadPath(dir, file) {
- return $('#downloadURL').val();
+ var url = $('#downloadURL').val();
+ if (url.indexOf('&path=') != -1) {
+ url += '/'+file;
+ }
+ return url;
}
$(document).ready(function() {
@@ -13,10 +17,21 @@ $(document).ready(function() {
var action = FileActions.getDefault(mimetype, 'file', OC.PERMISSION_READ);
if (typeof action === 'undefined') {
$('#noPreview').show();
+ if (mimetype != 'httpd/unix-directory') {
+ // NOTE: Remove when a better file previewer solution exists
+ $('#content').remove();
+ $('table').remove();
+ }
} else {
action($('#filename').val());
}
}
+ FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename) {
+ var tr = $('tr').filterAttr('data-file', filename)
+ if (tr.length > 0) {
+ window.location = $(tr).find('a.name').attr('href');
+ }
+ });
}
}); \ No newline at end of file
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js
index 9d0e2c90f88..a171751589a 100644
--- a/apps/files_sharing/js/share.js
+++ b/apps/files_sharing/js/share.js
@@ -39,10 +39,8 @@ $(document).ready(function() {
var tr = $('tr').filterAttr('data-file', filename);
if ($(tr).data('type') == 'dir') {
var itemType = 'folder';
- var link = false;
} else {
var itemType = 'file';
- var link = true;
}
var possiblePermissions = $(tr).data('permissions');
var appendTo = $(tr).find('td.filename');
@@ -51,14 +49,14 @@ $(document).ready(function() {
if (item != $('#dropdown').data('item')) {
OC.Share.hideDropDown(function () {
$(tr).addClass('mouseOver');
- OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, link, possiblePermissions);
+ OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions);
});
} else {
OC.Share.hideDropDown();
}
} else {
$(tr).addClass('mouseOver');
- OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, link, possiblePermissions);
+ OC.Share.showDropDown(itemType, $(tr).data('id'), appendTo, true, possiblePermissions);
}
});
}
diff --git a/apps/files_sharing/l10n/gl.php b/apps/files_sharing/l10n/gl.php
new file mode 100644
index 00000000000..c9644d720e3
--- /dev/null
+++ b/apps/files_sharing/l10n/gl.php
@@ -0,0 +1,7 @@
+<?php $TRANSLATIONS = array(
+"Password" => "Contrasinal",
+"Submit" => "Enviar",
+"Download" => "Baixar",
+"No preview available for" => "Sen vista previa dispoñible para ",
+"web services under your control" => "servizos web baixo o seu control"
+);
diff --git a/apps/files_sharing/l10n/ro.php b/apps/files_sharing/l10n/ro.php
new file mode 100644
index 00000000000..4943fcc03c7
--- /dev/null
+++ b/apps/files_sharing/l10n/ro.php
@@ -0,0 +1,7 @@
+<?php $TRANSLATIONS = array(
+"Password" => "Parolă",
+"Submit" => "Trimite",
+"Download" => "Descarcă",
+"No preview available for" => "Nici o previzualizare disponibilă pentru ",
+"web services under your control" => "servicii web controlate de tine"
+);
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 010f6b9de18..bed1a19fd63 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -1,13 +1,21 @@
<?php
// Load other apps for file previews
OC_App::loadApps();
-if (isset($_GET['file'])) {
- $pos = strpos($_GET['file'], '/', 1);
- $uidOwner = substr($_GET['file'], 1, $pos - 1);
+if (isset($_GET['file']) || isset($_GET['dir'])) {
+ if (isset($_GET['dir'])) {
+ $type = 'folder';
+ $path = $_GET['dir'];
+ $baseDir = basename($path);
+ $dir = $baseDir;
+ } else {
+ $type = 'file';
+ $path = $_GET['file'];
+ }
+ $uidOwner = substr($path, 1, strpos($path, '/', 1) - 1);
if (OCP\User::userExists($uidOwner)) {
OC_Util::setupFS($uidOwner);
- $fileSource = OC_Filecache::getId($_GET['file'], '');
- if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink('file', $fileSource, $uidOwner))) {
+ $fileSource = OC_Filecache::getId($path, '');
+ if ($fileSource != -1 && ($linkItem = OCP\Share::getItemSharedWithByLink($type, $fileSource, $uidOwner))) {
if (isset($linkItem['share_with'])) {
// Check password
if (isset($_POST['password'])) {
@@ -35,6 +43,16 @@ if (isset($_GET['file'])) {
}
}
$path = $linkItem['path'];
+ if (isset($_GET['path'])) {
+ $path .= $_GET['path'];
+ $dir .= $_GET['path'];
+ if (!OC_Filesystem::file_exists($path)) {
+ header('HTTP/1.0 404 Not Found');
+ $tmpl = new OCP\Template('', '404', 'guest');
+ $tmpl->printPage();
+ exit();
+ }
+ }
// Download the file
if (isset($_GET['download'])) {
$mimetype = OC_Filesystem::getMimeType($path);
@@ -50,18 +68,84 @@ if (isset($_GET['file'])) {
OCP\Util::addScript('files_sharing', 'public');
OCP\Util::addScript('files', 'fileactions');
$tmpl = new OCP\Template('files_sharing', 'public', 'base');
- $tmpl->assign('details', $uidOwner.' shared the file '.basename($path).' with you');
$tmpl->assign('owner', $uidOwner);
- $tmpl->assign('name', basename($path));
// Show file list
if (OC_Filesystem::is_dir($path)) {
- // TODO
+ OCP\Util::addStyle('files', 'files');
+ OCP\Util::addScript('files', 'files');
+ OCP\Util::addScript('files', 'filelist');
+ $files = array();
+ $rootLength = strlen($baseDir) + 1;
+ foreach (OC_Files::getDirectoryContent($path) as $i) {
+ $i['date'] = OCP\Util::formatDate($i['mtime']);
+ if ($i['type'] == 'file') {
+ $fileinfo = pathinfo($i['name']);
+ $i['basename'] = $fileinfo['filename'];
+ $i['extension'] = isset($fileinfo['extension']) ? ('.'.$fileinfo['extension']) : '';
+ }
+ $i['directory'] = substr($i['directory'], $rootLength);
+ if ($i['directory'] == '/') {
+ $i['directory'] = '';
+ }
+ $i['permissions'] = OCP\Share::PERMISSION_READ;
+ $files[] = $i;
+ }
+ // Make breadcrumb
+ $breadcrumb = array();
+ $pathtohere = '';
+ foreach (explode('/', $dir) as $i) {
+ if ($i != '') {
+ if ($i != $baseDir) {
+ $pathtohere .= '/'.$i;
+ }
+ $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
+ }
+ }
+ $list = new OCP\Template('files', 'part.list', '');
+ $list->assign('files', $files, false);
+ $list->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'].'&path=', false);
+ $list->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path=', false);
+ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '' );
+ $breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
+ $breadcrumbNav->assign('baseURL', OCP\Util::linkToPublic('files').'&dir='.$_GET['dir'].'&path=', false);
+ $folder = new OCP\Template('files', 'index', '');
+ $folder->assign('fileList', $list->fetchPage(), false);
+ $folder->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
+ $folder->assign('dir', basename($dir));
+ $folder->assign('isCreatable', false);
+ $folder->assign('permissions', 0);
+ $folder->assign('files', $files);
+ $folder->assign('uploadMaxFilesize', 0);
+ $folder->assign('uploadMaxHumanFilesize', 0);
+ $folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
+ $tmpl->assign('folder', $folder->fetchPage(), false);
+ $tmpl->assign('details', $uidOwner.' shared the folder '.$baseDir.' with you');
+ $tmpl->assign('dir', basename($dir));
+ $tmpl->assign('filename', basename($path));
+ $tmpl->assign('mimetype', OC_Filesystem::getMimeType($path));
+ $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
+ if (isset($_GET['path'])) {
+ $getPath = $_GET['path'];
+ } else {
+ $getPath = '';
+ }
+ $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path='.$getPath, false);
} else {
// Show file preview if viewer is available
+ $tmpl->assign('details', $uidOwner.' shared the file '.basename($path).' with you');
$tmpl->assign('dir', dirname($path));
$tmpl->assign('filename', basename($path));
$tmpl->assign('mimetype', OC_Filesystem::getMimeType($path));
- $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&file='.$_GET['file'].'&download');
+ if ($type == 'file') {
+ $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&file='.$_GET['file'].'&download', false);
+ } else {
+ if (isset($_GET['path'])) {
+ $getPath = $_GET['path'];
+ } else {
+ $getPath = '';
+ }
+ $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files').'&download&dir='.$_GET['dir'].'&path='.$getPath, false);
+ }
}
$tmpl->printPage();
}
@@ -71,4 +155,4 @@ if (isset($_GET['file'])) {
}
header('HTTP/1.0 404 Not Found');
$tmpl = new OCP\Template('', '404', 'guest');
-$tmpl->printPage();
+$tmpl->printPage(); \ No newline at end of file
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index ca48a35575e..426b45b2681 100755
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -6,19 +6,25 @@
<a href="<?php echo link_to('', 'index.php'); ?>" title="" id="owncloud"><img class="svg" src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /></a>
<div class="header-right">
<span id="details"><?php echo $_['details']; ?></span>
- <a href="<?php echo $_['downloadURL']; ?>" id="download"><img class="svg" alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /><?php echo $l->t('Download')?></a>
+ <?php if (!isset($_['folder']) || $_['allowZipDownload']): ?>
+ <a href="<?php echo $_['downloadURL']; ?>" id="download"><img class="svg" alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /><?php echo $l->t('Download')?></a>
+ <?php endif; ?>
</div>
</div></header>
<div id="preview">
- <?php if (substr($_['mimetype'], 0 , strpos($_['mimetype'], '/')) == 'image'): ?>
- <img src="<?php echo $_['downloadURL']; ?>" />
+ <?php if (isset($_['folder'])): ?>
+ <?php echo $_['folder']; ?>
+ <?php else: ?>
+ <?php if (substr($_['mimetype'], 0 , strpos($_['mimetype'], '/')) == 'image'): ?>
+ <img src="<?php echo $_['downloadURL']; ?>" />
+ <?php endif; ?>
+ <ul id="noPreview">
+ <li class="error">
+ <?php echo $l->t('No preview available for').' '.$_['filename']; ?><br />
+ <a href="<?php echo $_['downloadURL']; ?>" id="download"><img class="svg" alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /><?php echo $l->t('Download')?></a>
+ </li>
+ </ul>
<?php endif; ?>
- <ul id="noPreview">
- <li class="error">
- <?php echo $l->t('No preview available for').' '.$_['filename']; ?><br />
- <a href="<?php echo $_['downloadURL']; ?>" id="download"><img class="svg" alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /><?php echo $l->t('Download')?></a>
- </li>
- </ul>
<div id="content"></div>
<table></table>
</div>
diff --git a/apps/files_versions/l10n/fi_FI.php b/apps/files_versions/l10n/fi_FI.php
index bc8aa67dc79..7e0894b3f18 100644
--- a/apps/files_versions/l10n/fi_FI.php
+++ b/apps/files_versions/l10n/fi_FI.php
@@ -1,5 +1,7 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Vanhenna kaikki versiot",
"Versions" => "Versiot",
-"This will delete all existing backup versions of your files" => "Tämä poistaa kaikki tiedostojesi olemassa olevat varmuuskopioversiot"
+"This will delete all existing backup versions of your files" => "Tämä poistaa kaikki tiedostojesi olemassa olevat varmuuskopioversiot",
+"Files Versioning" => "Tiedostojen versiointi",
+"Enable" => "Käytä"
);
diff --git a/apps/files_versions/l10n/gl.php b/apps/files_versions/l10n/gl.php
new file mode 100644
index 00000000000..c0d5937e1b1
--- /dev/null
+++ b/apps/files_versions/l10n/gl.php
@@ -0,0 +1,7 @@
+<?php $TRANSLATIONS = array(
+"Expire all versions" => "Caducar todas as versións",
+"Versions" => "Versións",
+"This will delete all existing backup versions of your files" => "Esto eliminará todas as copias de respaldo existentes dos seus ficheiros",
+"Files Versioning" => "Versionado de ficheiros",
+"Enable" => "Habilitar"
+);
diff --git a/apps/files_versions/l10n/nl.php b/apps/files_versions/l10n/nl.php
index 486b4ed45cf..61cdbc2778a 100644
--- a/apps/files_versions/l10n/nl.php
+++ b/apps/files_versions/l10n/nl.php
@@ -1,5 +1,7 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Alle versies laten verlopen",
"Versions" => "Versies",
-"This will delete all existing backup versions of your files" => "Dit zal alle bestaande backup versies van uw bestanden verwijderen"
+"This will delete all existing backup versions of your files" => "Dit zal alle bestaande backup versies van uw bestanden verwijderen",
+"Files Versioning" => "Bestand versies",
+"Enable" => "Zet aan"
);
diff --git a/apps/files_versions/l10n/pl.php b/apps/files_versions/l10n/pl.php
index a198792a5bc..949ec0889aa 100644
--- a/apps/files_versions/l10n/pl.php
+++ b/apps/files_versions/l10n/pl.php
@@ -1,5 +1,7 @@
<?php $TRANSLATIONS = array(
"Expire all versions" => "Wygasają wszystkie wersje",
"Versions" => "Wersje",
-"This will delete all existing backup versions of your files" => "Spowoduje to usunięcie wszystkich istniejących wersji kopii zapasowych plików"
+"This will delete all existing backup versions of your files" => "Spowoduje to usunięcie wszystkich istniejących wersji kopii zapasowych plików",
+"Files Versioning" => "Wersjonowanie plików",
+"Enable" => "Włącz"
);
diff --git a/apps/files_versions/l10n/ro.php b/apps/files_versions/l10n/ro.php
new file mode 100644
index 00000000000..597be7330c5
--- /dev/null
+++ b/apps/files_versions/l10n/ro.php
@@ -0,0 +1,7 @@
+<?php $TRANSLATIONS = array(
+"Expire all versions" => "Expiră toate versiunile",
+"Versions" => "Versiuni",
+"This will delete all existing backup versions of your files" => "Această acțiune va șterge toate versiunile salvate ale fișierelor tale",
+"Files Versioning" => "Versionare fișiere",
+"Enable" => "Activare"
+);