summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/ajax/addRootCertificate.php43
-rw-r--r--apps/files_external/ajax/removeRootCertificate.php10
-rw-r--r--apps/files_external/appinfo/info.xml2
-rw-r--r--apps/files_external/js/dropbox.js26
-rw-r--r--apps/files_external/js/google.js22
-rw-r--r--apps/files_external/l10n/ca.php12
-rw-r--r--apps/files_external/l10n/cs_CZ.php12
-rw-r--r--apps/files_external/l10n/da.php24
-rw-r--r--apps/files_external/l10n/de.php12
-rw-r--r--apps/files_external/l10n/de_DE.php24
-rw-r--r--apps/files_external/l10n/el.php20
-rw-r--r--apps/files_external/l10n/eo.php12
-rw-r--r--apps/files_external/l10n/es.php12
-rw-r--r--apps/files_external/l10n/es_AR.php24
-rw-r--r--apps/files_external/l10n/et_EE.php12
-rw-r--r--apps/files_external/l10n/eu.php12
-rw-r--r--apps/files_external/l10n/fi_FI.php11
-rw-r--r--apps/files_external/l10n/fr.php12
-rw-r--r--apps/files_external/l10n/gl.php18
-rw-r--r--apps/files_external/l10n/he.php6
-rw-r--r--apps/files_external/l10n/id.php14
-rw-r--r--apps/files_external/l10n/it.php12
-rw-r--r--apps/files_external/l10n/ja_JP.php12
-rw-r--r--apps/files_external/l10n/lt_LT.php17
-rw-r--r--apps/files_external/l10n/nl.php12
-rw-r--r--apps/files_external/l10n/pl.php12
-rw-r--r--apps/files_external/l10n/pt_BR.php24
-rw-r--r--apps/files_external/l10n/pt_PT.php24
-rw-r--r--apps/files_external/l10n/ro.php18
-rw-r--r--apps/files_external/l10n/ru.php12
-rw-r--r--apps/files_external/l10n/ru_RU.php24
-rw-r--r--apps/files_external/l10n/si_LK.php24
-rw-r--r--apps/files_external/l10n/sk_SK.php12
-rw-r--r--apps/files_external/l10n/sl.php12
-rw-r--r--apps/files_external/l10n/sv.php12
-rw-r--r--apps/files_external/l10n/th_TH.php12
-rw-r--r--apps/files_external/l10n/vi.php11
-rw-r--r--apps/files_external/l10n/zh_CN.GB2312.php24
-rw-r--r--apps/files_external/l10n/zh_CN.php24
-rwxr-xr-xapps/files_external/lib/config.php46
-rwxr-xr-xapps/files_external/lib/dropbox.php11
-rw-r--r--apps/files_external/lib/ftp.php6
-rw-r--r--apps/files_external/lib/google.php2
-rw-r--r--apps/files_external/lib/smb.php2
-rw-r--r--apps/files_external/lib/swift.php50
-rw-r--r--apps/files_external/lib/webdav.php17
-rw-r--r--apps/files_external/templates/settings.php26
-rw-r--r--apps/files_external/tests/amazons3.php63
-rw-r--r--apps/files_external/tests/config.php11
-rw-r--r--apps/files_external/tests/dropbox.php27
-rw-r--r--apps/files_external/tests/ftp.php25
-rw-r--r--apps/files_external/tests/google.php61
-rw-r--r--apps/files_external/tests/smb.php26
-rw-r--r--apps/files_external/tests/swift.php28
-rw-r--r--apps/files_external/tests/webdav.php25
55 files changed, 803 insertions, 261 deletions
diff --git a/apps/files_external/ajax/addRootCertificate.php b/apps/files_external/ajax/addRootCertificate.php
index a8719fc7a3d..72eb30009d1 100644
--- a/apps/files_external/ajax/addRootCertificate.php
+++ b/apps/files_external/ajax/addRootCertificate.php
@@ -2,26 +2,35 @@
OCP\JSON::checkAppEnabled('files_external');
-$view = \OCP\Files::getStorage("files_external");
-$from = $_FILES['rootcert_import']['tmp_name'];
-$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
-if(!file_exists($path)) mkdir($path,0700,true);
-$to = $path.$_FILES['rootcert_import']['name'];
-move_uploaded_file($from, $to);
-
-//check if it is a PEM certificate, otherwise convert it if possible
-$fh = fopen($to, 'r');
-$data = fread($fh, filesize($to));
+if ( !($filename = $_FILES['rootcert_import']['name']) ) {
+ header("Location: settings/personal.php");
+ exit;
+}
+
+$fh = fopen($_FILES['rootcert_import']['tmp_name'], 'r');
+$data = fread($fh, filesize($_FILES['rootcert_import']['tmp_name']));
fclose($fh);
-if (!strpos($data, 'BEGIN CERTIFICATE')) {
- $pem = chunk_split(base64_encode($data), 64, "\n");
- $pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n";
- $fh = fopen($to, 'w');
- fwrite($fh, $pem);
- fclose($fh);
+$filename = $_FILES['rootcert_import']['name'];
+
+$view = new \OC_FilesystemView('/'.\OCP\User::getUser().'/files_external/uploads');
+if (!$view->file_exists('')) $view->mkdir('');
+
+$isValid = openssl_pkey_get_public($data);
+
+//maybe it was just the wrong file format, try to convert it...
+if ($isValid == false) {
+ $data = chunk_split(base64_encode($data), 64, "\n");
+ $data = "-----BEGIN CERTIFICATE-----\n".$data."-----END CERTIFICATE-----\n";
+ $isValid = openssl_pkey_get_public($data);
}
-OC_Mount_Config::createCertificateBundle();
+// add the certificate if it could be verified
+if ( $isValid ) {
+ $view->file_put_contents($filename, $data);
+ OC_Mount_Config::createCertificateBundle();
+} else {
+ OCP\Util::writeLog("files_external", "Couldn't import SSL root certificate ($filename), allowed formats: PEM and DER", OCP\Util::WARN);
+}
header("Location: settings/personal.php");
exit;
diff --git a/apps/files_external/ajax/removeRootCertificate.php b/apps/files_external/ajax/removeRootCertificate.php
index 9b78e180d9e..664b3937e97 100644
--- a/apps/files_external/ajax/removeRootCertificate.php
+++ b/apps/files_external/ajax/removeRootCertificate.php
@@ -5,7 +5,9 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::callCheck();
$view = \OCP\Files::getStorage("files_external");
-$cert = $_POST['cert'];
-$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
-unlink($file);
-OC_Mount_Config::createCertificateBundle();
+$file = 'uploads/'.ltrim($_POST['cert'], "/\\.");
+
+if ( $view->file_exists($file) ) {
+ $view->unlink($file);
+ OC_Mount_Config::createCertificateBundle();
+}
diff --git a/apps/files_external/appinfo/info.xml b/apps/files_external/appinfo/info.xml
index e0301365d16..3da1913c5fc 100644
--- a/apps/files_external/appinfo/info.xml
+++ b/apps/files_external/appinfo/info.xml
@@ -5,7 +5,7 @@
<description>Mount external storage sources</description>
<licence>AGPL</licence>
<author>Robin Appelman, Michael Gapczynski</author>
- <require>4</require>
+ <require>4.9</require>
<shipped>true</shipped>
<types>
<filesystem/>
diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js
index 6082fdd2cb7..c1e38640708 100644
--- a/apps/files_external/js/dropbox.js
+++ b/apps/files_external/js/dropbox.js
@@ -4,7 +4,7 @@ $(document).ready(function() {
var configured = $(this).find('[data-parameter="configured"]');
if ($(configured).val() == 'true') {
$(this).find('.configuration input').attr('disabled', 'disabled');
- $(this).find('.configuration').append('<span id="access" style="padding-left:0.5em;">Access granted</span>');
+ $(this).find('.configuration').append('<span id="access" style="padding-left:0.5em;">'+t('files_external', 'Access granted')+'</span>');
} else {
var app_key = $(this).find('.configuration [data-parameter="app_key"]').val();
var app_secret = $(this).find('.configuration [data-parameter="app_secret"]').val();
@@ -22,14 +22,16 @@ $(document).ready(function() {
$(configured).val('true');
OC.MountConfig.saveStorage(tr);
$(tr).find('.configuration input').attr('disabled', 'disabled');
- $(tr).find('.configuration').append('<span id="access" style="padding-left:0.5em;">Access granted</span>');
+ $(tr).find('.configuration').append('<span id="access" style="padding-left:0.5em;">'+t('files_external', 'Access granted')+'</span>');
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Dropbox storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
});
}
} else if ($(this).find('.mountPoint input').val() != '' && $(config).find('[data-parameter="app_key"]').val() != '' && $(config).find('[data-parameter="app_secret"]').val() != '' && $(this).find('.dropbox').length == 0) {
- $(this).find('.configuration').append('<a class="button dropbox">Grant access</a>');
+ $(this).find('.configuration').append('<a class="button dropbox">'+t('files_external', 'Grant access')+'</a>');
}
}
});
@@ -40,7 +42,7 @@ $(document).ready(function() {
var config = $(tr).find('.configuration');
if ($(tr).find('.mountPoint input').val() != '' && $(config).find('[data-parameter="app_key"]').val() != '' && $(config).find('[data-parameter="app_secret"]').val() != '') {
if ($(tr).find('.dropbox').length == 0) {
- $(config).append('<a class="button dropbox">Grant access</a>');
+ $(config).append('<a class="button dropbox">'+t('files_external', 'Grant access')+'</a>');
} else {
$(tr).find('.dropbox').show();
}
@@ -67,14 +69,22 @@ $(document).ready(function() {
if (OC.MountConfig.saveStorage(tr)) {
window.location = result.data.url;
} else {
- OC.dialogs.alert('Fill out all required fields', 'Error configuring Dropbox storage');
+ OC.dialogs.alert(
+ t('files_external', 'Fill out all required fields'),
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Dropbox storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
});
} else {
- OC.dialogs.alert('Please provide a valid Dropbox app key and secret.', 'Error configuring Dropbox storage');
+ OC.dialogs.alert(
+ t('files_external', 'Please provide a valid Dropbox app key and secret.'),
+ t('files_external', 'Error configuring Dropbox storage')
+ );
}
});
diff --git a/apps/files_external/js/google.js b/apps/files_external/js/google.js
index 7c62297df4d..0b3c314eb5d 100644
--- a/apps/files_external/js/google.js
+++ b/apps/files_external/js/google.js
@@ -3,7 +3,8 @@ $(document).ready(function() {
$('#externalStorage tbody tr.OC_Filestorage_Google').each(function() {
var configured = $(this).find('[data-parameter="configured"]');
if ($(configured).val() == 'true') {
- $(this).find('.configuration').append('<span id="access" style="padding-left:0.5em;">Access granted</span>');
+ $(this).find('.configuration')
+ .append('<span id="access" style="padding-left:0.5em;">'+t('files_external', 'Access granted')+'</span>');
} else {
var token = $(this).find('[data-parameter="token"]');
var token_secret = $(this).find('[data-parameter="token_secret"]');
@@ -19,13 +20,15 @@ $(document).ready(function() {
$(token_secret).val(result.access_token_secret);
$(configured).val('true');
OC.MountConfig.saveStorage(tr);
- $(tr).find('.configuration').append('<span id="access" style="padding-left:0.5em;">Access granted</span>');
+ $(tr).find('.configuration').append('<span id="access" style="padding-left:0.5em;">'+t('files_external', 'Access granted')+'</span>');
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Google Drive storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Google Drive storage')
+ );
}
});
} else if ($(this).find('.google').length == 0) {
- $(this).find('.configuration').append('<a class="button google">Grant access</a>');
+ $(this).find('.configuration').append('<a class="button google">'+t('files_external', 'Grant access')+'</a>');
}
}
});
@@ -34,7 +37,7 @@ $(document).ready(function() {
if ($(this).hasClass('OC_Filestorage_Google') && $(this).find('[data-parameter="configured"]').val() != 'true') {
if ($(this).find('.mountPoint input').val() != '') {
if ($(this).find('.google').length == 0) {
- $(this).find('.configuration').append('<a class="button google">Grant access</a>');
+ $(this).find('.configuration').append('<a class="button google">'+t('files_external', 'Grant access')+'</a>');
}
}
}
@@ -65,10 +68,15 @@ $(document).ready(function() {
if (OC.MountConfig.saveStorage(tr)) {
window.location = result.data.url;
} else {
- OC.dialogs.alert('Fill out all required fields', 'Error configuring Google Drive storage');
+ OC.dialogs.alert(
+ t('files_external', 'Fill out all required fields'),
+ t('files_external', 'Error configuring Google Drive storage')
+ );
}
} else {
- OC.dialogs.alert(result.data.message, 'Error configuring Google Drive storage');
+ OC.dialogs.alert(result.data.message,
+ t('files_external', 'Error configuring Google Drive storage')
+ );
}
});
});
diff --git a/apps/files_external/l10n/ca.php b/apps/files_external/l10n/ca.php
index aa93379c358..fc6706381b7 100644
--- a/apps/files_external/l10n/ca.php
+++ b/apps/files_external/l10n/ca.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "S'ha concedit l'accés",
+"Error configuring Dropbox storage" => "Error en configurar l'emmagatzemament Dropbox",
+"Grant access" => "Concedeix accés",
+"Fill out all required fields" => "Ompliu els camps requerits",
+"Please provide a valid Dropbox app key and secret." => "Proporcioneu una clau d'aplicació i secret vàlids per a Dropbox",
+"Error configuring Google Drive storage" => "Error en configurar l'emmagatzemament Google Drive",
"External Storage" => "Emmagatzemament extern",
"Mount point" => "Punt de muntatge",
"Backend" => "Dorsal",
@@ -11,8 +17,8 @@
"Groups" => "Grups",
"Users" => "Usuaris",
"Delete" => "Elimina",
-"SSL root certificates" => "Certificats SSL root",
-"Import Root Certificate" => "Importa certificat root",
"Enable User External Storage" => "Habilita l'emmagatzemament extern d'usuari",
-"Allow users to mount their own external storage" => "Permet als usuaris muntar el seu emmagatzemament extern propi"
+"Allow users to mount their own external storage" => "Permet als usuaris muntar el seu emmagatzemament extern propi",
+"SSL root certificates" => "Certificats SSL root",
+"Import Root Certificate" => "Importa certificat root"
);
diff --git a/apps/files_external/l10n/cs_CZ.php b/apps/files_external/l10n/cs_CZ.php
index 75899603349..51951c19bfd 100644
--- a/apps/files_external/l10n/cs_CZ.php
+++ b/apps/files_external/l10n/cs_CZ.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Přístup povolen",
+"Error configuring Dropbox storage" => "Chyba při nastavení úložiště Dropbox",
+"Grant access" => "Povolit přístup",
+"Fill out all required fields" => "Vyplňte všechna povinná pole",
+"Please provide a valid Dropbox app key and secret." => "Zadejte, prosím, platný klíč a bezpečnostní frázi aplikace Dropbox.",
+"Error configuring Google Drive storage" => "Chyba při nastavení úložiště Google Drive",
"External Storage" => "Externí úložiště",
"Mount point" => "Přípojný bod",
"Backend" => "Podpůrná vrstva",
@@ -11,8 +17,8 @@
"Groups" => "Skupiny",
"Users" => "Uživatelé",
"Delete" => "Smazat",
-"SSL root certificates" => "Kořenové certifikáty SSL",
-"Import Root Certificate" => "Importovat kořenového certifikátu",
"Enable User External Storage" => "Zapnout externí uživatelské úložiště",
-"Allow users to mount their own external storage" => "Povolit uživatelům připojení jejich vlastních externích úložišť"
+"Allow users to mount their own external storage" => "Povolit uživatelům připojení jejich vlastních externích úložišť",
+"SSL root certificates" => "Kořenové certifikáty SSL",
+"Import Root Certificate" => "Importovat kořenového certifikátu"
);
diff --git a/apps/files_external/l10n/da.php b/apps/files_external/l10n/da.php
new file mode 100644
index 00000000000..00a81f3da16
--- /dev/null
+++ b/apps/files_external/l10n/da.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "Adgang godkendt",
+"Error configuring Dropbox storage" => "Fejl ved konfiguration af Dropbox plads",
+"Grant access" => "Godkend adgang",
+"Fill out all required fields" => "Udfyld alle nødvendige felter",
+"Please provide a valid Dropbox app key and secret." => "Angiv venligst en valid Dropbox app nøgle og hemmelighed",
+"Error configuring Google Drive storage" => "Fejl ved konfiguration af Google Drive plads",
+"External Storage" => "Ekstern opbevaring",
+"Mount point" => "Monteringspunkt",
+"Backend" => "Backend",
+"Configuration" => "Opsætning",
+"Options" => "Valgmuligheder",
+"Applicable" => "Kan anvendes",
+"Add mount point" => "Tilføj monteringspunkt",
+"None set" => "Ingen sat",
+"All Users" => "Alle brugere",
+"Groups" => "Grupper",
+"Users" => "Brugere",
+"Delete" => "Slet",
+"Enable User External Storage" => "Aktiver ekstern opbevaring for brugere",
+"Allow users to mount their own external storage" => "Tillad brugere at montere deres egne eksterne opbevaring",
+"SSL root certificates" => "SSL-rodcertifikater",
+"Import Root Certificate" => "Importer rodcertifikat"
+);
diff --git a/apps/files_external/l10n/de.php b/apps/files_external/l10n/de.php
index 4306ad33dc3..5d57e5e4598 100644
--- a/apps/files_external/l10n/de.php
+++ b/apps/files_external/l10n/de.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Zugriff gestattet",
+"Error configuring Dropbox storage" => "Fehler beim Einrichten von Dropbox",
+"Grant access" => "Zugriff gestatten",
+"Fill out all required fields" => "Bitte alle notwendigen Felder füllen",
+"Please provide a valid Dropbox app key and secret." => "Bitte trage einen gültigen Dropbox-App-Key mit Secret ein.",
+"Error configuring Google Drive storage" => "Fehler beim Einrichten von Google Drive",
"External Storage" => "Externer Speicher",
"Mount point" => "Mount-Point",
"Backend" => "Backend",
@@ -11,8 +17,8 @@
"Groups" => "Gruppen",
"Users" => "Benutzer",
"Delete" => "Löschen",
-"SSL root certificates" => "SSL-Root-Zertifikate",
-"Import Root Certificate" => "Root-Zertifikate importieren",
"Enable User External Storage" => "Externen Speicher für Benutzer aktivieren",
-"Allow users to mount their own external storage" => "Erlaubt Benutzern ihre eigenen externen Speicher einzubinden"
+"Allow users to mount their own external storage" => "Erlaubt Benutzern ihre eigenen externen Speicher einzubinden",
+"SSL root certificates" => "SSL-Root-Zertifikate",
+"Import Root Certificate" => "Root-Zertifikate importieren"
);
diff --git a/apps/files_external/l10n/de_DE.php b/apps/files_external/l10n/de_DE.php
new file mode 100644
index 00000000000..357968bd462
--- /dev/null
+++ b/apps/files_external/l10n/de_DE.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "Zugriff gestattet",
+"Error configuring Dropbox storage" => "Fehler beim Einrichten von Dropbox",
+"Grant access" => "Zugriff gestatten",
+"Fill out all required fields" => "Bitte alle notwendigen Felder füllen",
+"Please provide a valid Dropbox app key and secret." => "Bitte tragen Sie einen gültigen Dropbox-App-Key mit Secret ein.",
+"Error configuring Google Drive storage" => "Fehler beim Einrichten von Google Drive",
+"External Storage" => "Externer Speicher",
+"Mount point" => "Mount-Point",
+"Backend" => "Backend",
+"Configuration" => "Konfiguration",
+"Options" => "Optionen",
+"Applicable" => "Zutreffend",
+"Add mount point" => "Mount-Point hinzufügen",
+"None set" => "Nicht definiert",
+"All Users" => "Alle Benutzer",
+"Groups" => "Gruppen",
+"Users" => "Benutzer",
+"Delete" => "Löschen",
+"Enable User External Storage" => "Externen Speicher für Benutzer aktivieren",
+"Allow users to mount their own external storage" => "Erlaubt Benutzern ihre eigenen externen Speicher einzubinden",
+"SSL root certificates" => "SSL-Root-Zertifikate",
+"Import Root Certificate" => "Root-Zertifikate importieren"
+);
diff --git a/apps/files_external/l10n/el.php b/apps/files_external/l10n/el.php
index 7dcf13b3972..a1dae9d4888 100644
--- a/apps/files_external/l10n/el.php
+++ b/apps/files_external/l10n/el.php
@@ -1,10 +1,24 @@
<?php $TRANSLATIONS = array(
-"External Storage" => "Εξωτερική αποθήκευση",
+"Access granted" => "Προσβαση παρασχέθηκε",
+"Error configuring Dropbox storage" => "Σφάλμα ρυθμίζωντας αποθήκευση Dropbox ",
+"Grant access" => "Παροχή πρόσβασης",
+"Fill out all required fields" => "Συμπληρώστε όλα τα απαιτούμενα πεδία",
+"Please provide a valid Dropbox app key and secret." => "Παρακαλούμε δώστε έγκυρο κλειδί Dropbox και μυστικό.",
+"Error configuring Google Drive storage" => "Σφάλμα ρυθμίζωντας αποθήκευση Google Drive ",
+"External Storage" => "Εξωτερικό Αποθηκευτικό Μέσο",
"Mount point" => "Σημείο προσάρτησης",
+"Backend" => "Σύστημα υποστήριξης",
"Configuration" => "Ρυθμίσεις",
"Options" => "Επιλογές",
-"All Users" => "Όλοι οι χρήστες",
+"Applicable" => "Εφαρμόσιμο",
+"Add mount point" => "Προσθήκη σημείου προσάρτησης",
+"None set" => "Κανένα επιλεγμένο",
+"All Users" => "Όλοι οι Χρήστες",
"Groups" => "Ομάδες",
"Users" => "Χρήστες",
-"Delete" => "Διαγραφή"
+"Delete" => "Διαγραφή",
+"Enable User External Storage" => "Ενεργοποίηση Εξωτερικού Αποθηκευτικού Χώρου Χρήστη",
+"Allow users to mount their own external storage" => "Να επιτρέπεται στους χρήστες να προσαρτούν δικό τους εξωτερικό αποθηκευτικό χώρο",
+"SSL root certificates" => "Πιστοποιητικά SSL root",
+"Import Root Certificate" => "Εισαγωγή Πιστοποιητικού Root"
);
diff --git a/apps/files_external/l10n/eo.php b/apps/files_external/l10n/eo.php
index 3cb8255c522..97453aafedb 100644
--- a/apps/files_external/l10n/eo.php
+++ b/apps/files_external/l10n/eo.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Alirpermeso donita",
+"Error configuring Dropbox storage" => "Eraro dum agordado de la memorservo Dropbox",
+"Grant access" => "Doni alirpermeson",
+"Fill out all required fields" => "Plenigu ĉiujn neprajn kampojn",
+"Please provide a valid Dropbox app key and secret." => "Bonvolu provizi ŝlosilon de la aplikaĵo Dropbox validan kaj sekretan.",
+"Error configuring Google Drive storage" => "Eraro dum agordado de la memorservo Google Drive",
"External Storage" => "Malena memorilo",
"Mount point" => "Surmetingo",
"Backend" => "Motoro",
@@ -11,8 +17,8 @@
"Groups" => "Grupoj",
"Users" => "Uzantoj",
"Delete" => "Forigi",
-"SSL root certificates" => "Radikaj SSL-atestoj",
-"Import Root Certificate" => "Enporti radikan ateston",
"Enable User External Storage" => "Kapabligi malenan memorilon de uzanto",
-"Allow users to mount their own external storage" => "Permesi al uzantoj surmeti siajn proprajn malenajn memorilojn"
+"Allow users to mount their own external storage" => "Permesi al uzantoj surmeti siajn proprajn malenajn memorilojn",
+"SSL root certificates" => "Radikaj SSL-atestoj",
+"Import Root Certificate" => "Enporti radikan ateston"
);
diff --git a/apps/files_external/l10n/es.php b/apps/files_external/l10n/es.php
index 004c352c199..32a0d896874 100644
--- a/apps/files_external/l10n/es.php
+++ b/apps/files_external/l10n/es.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Acceso garantizado",
+"Error configuring Dropbox storage" => "Error configurando el almacenamiento de Dropbox",
+"Grant access" => "Garantizar acceso",
+"Fill out all required fields" => "Rellenar todos los campos requeridos",
+"Please provide a valid Dropbox app key and secret." => "Por favor , proporcione un secreto y una contraseña válida de la app Dropbox.",
+"Error configuring Google Drive storage" => "Error configurando el almacenamiento de Google Drive",
"External Storage" => "Almacenamiento externo",
"Mount point" => "Punto de montaje",
"Backend" => "Motor",
@@ -11,8 +17,8 @@
"Groups" => "Grupos",
"Users" => "Usuarios",
"Delete" => "Eliiminar",
-"SSL root certificates" => "Raíz de certificados SSL ",
-"Import Root Certificate" => "Importar certificado raíz",
"Enable User External Storage" => "Habilitar almacenamiento de usuario externo",
-"Allow users to mount their own external storage" => "Permitir a los usuarios montar su propio almacenamiento externo"
+"Allow users to mount their own external storage" => "Permitir a los usuarios montar su propio almacenamiento externo",
+"SSL root certificates" => "Raíz de certificados SSL ",
+"Import Root Certificate" => "Importar certificado raíz"
);
diff --git a/apps/files_external/l10n/es_AR.php b/apps/files_external/l10n/es_AR.php
new file mode 100644
index 00000000000..055fbe782e7
--- /dev/null
+++ b/apps/files_external/l10n/es_AR.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "Acceso permitido",
+"Error configuring Dropbox storage" => "Error al configurar el almacenamiento de Dropbox",
+"Grant access" => "Permitir acceso",
+"Fill out all required fields" => "Rellenar todos los campos requeridos",
+"Please provide a valid Dropbox app key and secret." => "Por favor, proporcioná un secreto y una contraseña válida para la aplicación Dropbox.",
+"Error configuring Google Drive storage" => "Error al configurar el almacenamiento de Google Drive",
+"External Storage" => "Almacenamiento externo",
+"Mount point" => "Punto de montaje",
+"Backend" => "Motor",
+"Configuration" => "Configuración",
+"Options" => "Opciones",
+"Applicable" => "Aplicable",
+"Add mount point" => "Añadir punto de montaje",
+"None set" => "No fue configurado",
+"All Users" => "Todos los usuarios",
+"Groups" => "Grupos",
+"Users" => "Usuarios",
+"Delete" => "Borrar",
+"Enable User External Storage" => "Habilitar almacenamiento de usuario externo",
+"Allow users to mount their own external storage" => "Permitir a los usuarios montar su propio almacenamiento externo",
+"SSL root certificates" => "certificados SSL raíz",
+"Import Root Certificate" => "Importar certificado raíz"
+);
diff --git a/apps/files_external/l10n/et_EE.php b/apps/files_external/l10n/et_EE.php
index f47ebc936b5..86922bc751b 100644
--- a/apps/files_external/l10n/et_EE.php
+++ b/apps/files_external/l10n/et_EE.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Ligipääs on antud",
+"Error configuring Dropbox storage" => "Viga Dropboxi salvestusruumi seadistamisel",
+"Grant access" => "Anna ligipääs",
+"Fill out all required fields" => "Täida kõik kohustuslikud lahtrid",
+"Please provide a valid Dropbox app key and secret." => "Palun sisesta korrektne Dropboxi rakenduse võti ja salasõna.",
+"Error configuring Google Drive storage" => "Viga Google Drive'i salvestusruumi seadistamisel",
"External Storage" => "Väline salvestuskoht",
"Mount point" => "Ühenduspunkt",
"Backend" => "Admin",
@@ -11,8 +17,8 @@
"Groups" => "Grupid",
"Users" => "Kasutajad",
"Delete" => "Kustuta",
-"SSL root certificates" => "SSL root sertifikaadid",
-"Import Root Certificate" => "Impordi root sertifikaadid",
"Enable User External Storage" => "Luba kasutajatele väline salvestamine",
-"Allow users to mount their own external storage" => "Luba kasutajatel ühendada külge nende enda välised salvestusseadmed"
+"Allow users to mount their own external storage" => "Luba kasutajatel ühendada külge nende enda välised salvestusseadmed",
+"SSL root certificates" => "SSL root sertifikaadid",
+"Import Root Certificate" => "Impordi root sertifikaadid"
);
diff --git a/apps/files_external/l10n/eu.php b/apps/files_external/l10n/eu.php
index 6299390c266..dccd377b119 100644
--- a/apps/files_external/l10n/eu.php
+++ b/apps/files_external/l10n/eu.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Sarrera baimendua",
+"Error configuring Dropbox storage" => "Errore bat egon da Dropbox biltegiratzea konfiguratzean",
+"Grant access" => "Baimendu sarrera",
+"Fill out all required fields" => "Bete eskatutako eremu guztiak",
+"Please provide a valid Dropbox app key and secret." => "Mesedez eman baliozkoa den Dropbox app giltza eta sekretua",
+"Error configuring Google Drive storage" => "Errore bat egon da Google Drive biltegiratzea konfiguratzean",
"External Storage" => "Kanpoko Biltegiratzea",
"Mount point" => "Montatze puntua",
"Backend" => "Motorra",
@@ -11,8 +17,8 @@
"Groups" => "Taldeak",
"Users" => "Erabiltzaileak",
"Delete" => "Ezabatu",
-"SSL root certificates" => "SSL erro ziurtagiriak",
-"Import Root Certificate" => "Inportatu Erro Ziurtagiria",
"Enable User External Storage" => "Gaitu erabiltzaileentzako Kanpo Biltegiratzea",
-"Allow users to mount their own external storage" => "Baimendu erabiltzaileak bere kanpo biltegiratzeak muntatzen"
+"Allow users to mount their own external storage" => "Baimendu erabiltzaileak bere kanpo biltegiratzeak muntatzen",
+"SSL root certificates" => "SSL erro ziurtagiriak",
+"Import Root Certificate" => "Inportatu Erro Ziurtagiria"
);
diff --git a/apps/files_external/l10n/fi_FI.php b/apps/files_external/l10n/fi_FI.php
index cea671368ed..d7b16e0d3ee 100644
--- a/apps/files_external/l10n/fi_FI.php
+++ b/apps/files_external/l10n/fi_FI.php
@@ -1,4 +1,9 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Pääsy sallittu",
+"Error configuring Dropbox storage" => "Virhe Dropbox levyn asetuksia tehtäessä",
+"Grant access" => "Salli pääsy",
+"Fill out all required fields" => "Täytä kaikki vaaditut kentät",
+"Error configuring Google Drive storage" => "Virhe Google Drive levyn asetuksia tehtäessä",
"External Storage" => "Erillinen tallennusväline",
"Mount point" => "Liitospiste",
"Backend" => "Taustaosa",
@@ -11,8 +16,8 @@
"Groups" => "Ryhmät",
"Users" => "Käyttäjät",
"Delete" => "Poista",
-"SSL root certificates" => "SSL-juurivarmenteet",
-"Import Root Certificate" => "Tuo juurivarmenne",
"Enable User External Storage" => "Ota käyttöön ulkopuoliset tallennuspaikat",
-"Allow users to mount their own external storage" => "Salli käyttäjien liittää omia erillisiä tallennusvälineitä"
+"Allow users to mount their own external storage" => "Salli käyttäjien liittää omia erillisiä tallennusvälineitä",
+"SSL root certificates" => "SSL-juurivarmenteet",
+"Import Root Certificate" => "Tuo juurivarmenne"
);
diff --git a/apps/files_external/l10n/fr.php b/apps/files_external/l10n/fr.php
index b3e76c63500..90007aafaaf 100644
--- a/apps/files_external/l10n/fr.php
+++ b/apps/files_external/l10n/fr.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Accès autorisé",
+"Error configuring Dropbox storage" => "Erreur lors de la configuration du support de stockage Dropbox",
+"Grant access" => "Autoriser l'accès",
+"Fill out all required fields" => "Veuillez remplir tous les champs requis",
+"Please provide a valid Dropbox app key and secret." => "Veuillez fournir une clé d'application (app key) ainsi qu'un mot de passe valides.",
+"Error configuring Google Drive storage" => "Erreur lors de la configuration du support de stockage Google Drive",
"External Storage" => "Stockage externe",
"Mount point" => "Point de montage",
"Backend" => "Infrastructure",
@@ -11,8 +17,8 @@
"Groups" => "Groupes",
"Users" => "Utilisateurs",
"Delete" => "Supprimer",
-"SSL root certificates" => "Certificats racine SSL",
-"Import Root Certificate" => "Importer un certificat racine",
"Enable User External Storage" => "Activer le stockage externe pour les utilisateurs",
-"Allow users to mount their own external storage" => "Autoriser les utilisateurs à monter leur propre stockage externe"
+"Allow users to mount their own external storage" => "Autoriser les utilisateurs à monter leur propre stockage externe",
+"SSL root certificates" => "Certificats racine SSL",
+"Import Root Certificate" => "Importer un certificat racine"
);
diff --git a/apps/files_external/l10n/gl.php b/apps/files_external/l10n/gl.php
new file mode 100644
index 00000000000..3830efb70bf
--- /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",
+"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",
+"SSL root certificates" => "Certificados raíz SSL",
+"Import Root Certificate" => "Importar Certificado Raíz"
+);
diff --git a/apps/files_external/l10n/he.php b/apps/files_external/l10n/he.php
index edfa9aa85f0..12dfa62e7c8 100644
--- a/apps/files_external/l10n/he.php
+++ b/apps/files_external/l10n/he.php
@@ -6,8 +6,8 @@
"Groups" => "קבוצות",
"Users" => "משתמשים",
"Delete" => "מחיקה",
-"SSL root certificates" => "שורש אישורי אבטחת SSL ",
-"Import Root Certificate" => "ייבוא אישור אבטחת שורש",
"Enable User External Storage" => "הפעלת אחסון חיצוני למשתמשים",
-"Allow users to mount their own external storage" => "יאפשר למשתמשים לעגן את האחסון החיצוני שלהם"
+"Allow users to mount their own external storage" => "יאפשר למשתמשים לעגן את האחסון החיצוני שלהם",
+"SSL root certificates" => "שורש אישורי אבטחת SSL ",
+"Import Root Certificate" => "ייבוא אישור אבטחת שורש"
);
diff --git a/apps/files_external/l10n/id.php b/apps/files_external/l10n/id.php
new file mode 100644
index 00000000000..4b7850025f4
--- /dev/null
+++ b/apps/files_external/l10n/id.php
@@ -0,0 +1,14 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "akses diberikan",
+"Grant access" => "berikan hak akses",
+"Fill out all required fields" => "isi semua field yang dibutuhkan",
+"External Storage" => "penyimpanan eksternal",
+"Configuration" => "konfigurasi",
+"Options" => "pilihan",
+"Applicable" => "berlaku",
+"None set" => "tidak satupun di set",
+"All Users" => "semua pengguna",
+"Groups" => "grup",
+"Users" => "pengguna",
+"Delete" => "hapus"
+);
diff --git a/apps/files_external/l10n/it.php b/apps/files_external/l10n/it.php
index 5c5d32b214c..49effebdfc3 100644
--- a/apps/files_external/l10n/it.php
+++ b/apps/files_external/l10n/it.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Accesso consentito",
+"Error configuring Dropbox storage" => "Errore durante la configurazione dell'archivio Dropbox",
+"Grant access" => "Concedi l'accesso",
+"Fill out all required fields" => "Compila tutti i campi richiesti",
+"Please provide a valid Dropbox app key and secret." => "Fornisci chiave di applicazione e segreto di Dropbox validi.",
+"Error configuring Google Drive storage" => "Errore durante la configurazione dell'archivio Google Drive",
"External Storage" => "Archiviazione esterna",
"Mount point" => "Punto di mount",
"Backend" => "Motore",
@@ -11,8 +17,8 @@
"Groups" => "Gruppi",
"Users" => "Utenti",
"Delete" => "Elimina",
-"SSL root certificates" => "Certificati SSL radice",
-"Import Root Certificate" => "Importa certificato radice",
"Enable User External Storage" => "Abilita la memoria esterna dell'utente",
-"Allow users to mount their own external storage" => "Consenti agli utenti di montare la propria memoria esterna"
+"Allow users to mount their own external storage" => "Consenti agli utenti di montare la propria memoria esterna",
+"SSL root certificates" => "Certificati SSL radice",
+"Import Root Certificate" => "Importa certificato radice"
);
diff --git a/apps/files_external/l10n/ja_JP.php b/apps/files_external/l10n/ja_JP.php
index c7d38d88321..92f74ce9f72 100644
--- a/apps/files_external/l10n/ja_JP.php
+++ b/apps/files_external/l10n/ja_JP.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "アクセスは許可されました",
+"Error configuring Dropbox storage" => "Dropboxストレージの設定エラー",
+"Grant access" => "アクセスを許可",
+"Fill out all required fields" => "すべての必須フィールドを埋めて下さい",
+"Please provide a valid Dropbox app key and secret." => "有効なDropboxアプリのキーとパスワードを入力して下さい。",
+"Error configuring Google Drive storage" => "Googleドライブストレージの設定エラー",
"External Storage" => "外部ストレージ",
"Mount point" => "マウントポイント",
"Backend" => "バックエンド",
@@ -11,8 +17,8 @@
"Groups" => "グループ",
"Users" => "ユーザ",
"Delete" => "削除",
-"SSL root certificates" => "SSLルート証明書",
-"Import Root Certificate" => "ルート証明書をインポート",
"Enable User External Storage" => "ユーザの外部ストレージを有効にする",
-"Allow users to mount their own external storage" => "ユーザに外部ストレージのマウントを許可する"
+"Allow users to mount their own external storage" => "ユーザに外部ストレージのマウントを許可する",
+"SSL root certificates" => "SSLルート証明書",
+"Import Root Certificate" => "ルート証明書をインポート"
);
diff --git a/apps/files_external/l10n/lt_LT.php b/apps/files_external/l10n/lt_LT.php
index 00022aa3d38..6cd3ca2bbfd 100644
--- a/apps/files_external/l10n/lt_LT.php
+++ b/apps/files_external/l10n/lt_LT.php
@@ -1,9 +1,24 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Priėjimas suteiktas",
+"Error configuring Dropbox storage" => "Klaida nustatinėjantDropbox talpyklą",
+"Grant access" => "Suteikti priėjimą",
+"Fill out all required fields" => "Užpildykite visus reikalingus laukelius",
+"Please provide a valid Dropbox app key and secret." => "Prašome įvesti teisingus Dropbox \"app key\" ir \"secret\".",
+"Error configuring Google Drive storage" => "Klaida nustatinėjant Google Drive talpyklą",
+"External Storage" => "Išorinės saugyklos",
+"Mount point" => "Saugyklos pavadinimas",
+"Backend" => "Posistemės pavadinimas",
"Configuration" => "Konfigūracija",
"Options" => "Nustatymai",
+"Applicable" => "Pritaikyti",
+"Add mount point" => "Pridėti išorinę saugyklą",
"None set" => "Nieko nepasirinkta",
"All Users" => "Visi vartotojai",
"Groups" => "Grupės",
"Users" => "Vartotojai",
-"Delete" => "Ištrinti"
+"Delete" => "Ištrinti",
+"Enable User External Storage" => "Įjungti vartotojų išorines saugyklas",
+"Allow users to mount their own external storage" => "Leisti vartotojams pridėti savo išorines saugyklas",
+"SSL root certificates" => "SSL sertifikatas",
+"Import Root Certificate" => "Įkelti pagrindinį sertifikatą"
);
diff --git a/apps/files_external/l10n/nl.php b/apps/files_external/l10n/nl.php
index f3f38260a8a..87ab87cfc9f 100644
--- a/apps/files_external/l10n/nl.php
+++ b/apps/files_external/l10n/nl.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Toegang toegestaan",
+"Error configuring Dropbox storage" => "Fout tijdens het configureren van Dropbox opslag",
+"Grant access" => "Sta toegang toe",
+"Fill out all required fields" => "Vul alle verplichte in",
+"Please provide a valid Dropbox app key and secret." => "Geef een geldige Dropbox key en secret.",
+"Error configuring Google Drive storage" => "Fout tijdens het configureren van Google Drive opslag",
"External Storage" => "Externe opslag",
"Mount point" => "Aankoppelpunt",
"Backend" => "Backend",
@@ -11,8 +17,8 @@
"Groups" => "Groepen",
"Users" => "Gebruikers",
"Delete" => "Verwijder",
-"SSL root certificates" => "SSL root certificaten",
-"Import Root Certificate" => "Importeer root certificaat",
"Enable User External Storage" => "Zet gebruiker's externe opslag aan",
-"Allow users to mount their own external storage" => "Sta gebruikers toe om hun eigen externe opslag aan te koppelen"
+"Allow users to mount their own external storage" => "Sta gebruikers toe om hun eigen externe opslag aan te koppelen",
+"SSL root certificates" => "SSL root certificaten",
+"Import Root Certificate" => "Importeer root certificaat"
);
diff --git a/apps/files_external/l10n/pl.php b/apps/files_external/l10n/pl.php
index df0ed54e80f..00514e59a5f 100644
--- a/apps/files_external/l10n/pl.php
+++ b/apps/files_external/l10n/pl.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Dostęp do",
+"Error configuring Dropbox storage" => "Wystąpił błąd podczas konfigurowania zasobu Dropbox",
+"Grant access" => "Udziel dostępu",
+"Fill out all required fields" => "Wypełnij wszystkie wymagane pola",
+"Please provide a valid Dropbox app key and secret." => "Proszę podać prawidłowy klucz aplikacji Dropbox i klucz sekretny.",
+"Error configuring Google Drive storage" => "Wystąpił błąd podczas konfigurowania zasobu Google Drive",
"External Storage" => "Zewnętrzna zasoby dyskowe",
"Mount point" => "Punkt montowania",
"Backend" => "Zaplecze",
@@ -11,8 +17,8 @@
"Groups" => "Grupy",
"Users" => "Użytkownicy",
"Delete" => "Usuń",
-"SSL root certificates" => "Główny certyfikat SSL",
-"Import Root Certificate" => "Importuj główny certyfikat",
"Enable User External Storage" => "Włącz zewnętrzne zasoby dyskowe użytkownika",
-"Allow users to mount their own external storage" => "Zezwalaj użytkownikom na montowanie ich własnych zewnętrznych zasobów dyskowych"
+"Allow users to mount their own external storage" => "Zezwalaj użytkownikom na montowanie ich własnych zewnętrznych zasobów dyskowych",
+"SSL root certificates" => "Główny certyfikat SSL",
+"Import Root Certificate" => "Importuj główny certyfikat"
);
diff --git a/apps/files_external/l10n/pt_BR.php b/apps/files_external/l10n/pt_BR.php
new file mode 100644
index 00000000000..26e927a423e
--- /dev/null
+++ b/apps/files_external/l10n/pt_BR.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "Acesso concedido",
+"Error configuring Dropbox storage" => "Erro ao configurar armazenamento do Dropbox",
+"Grant access" => "Permitir acesso",
+"Fill out all required fields" => "Preencha todos os campos obrigatórios",
+"Please provide a valid Dropbox app key and secret." => "Por favor forneça um app key e secret válido do Dropbox",
+"Error configuring Google Drive storage" => "Erro ao configurar armazenamento do Google Drive",
+"External Storage" => "Armazenamento Externo",
+"Mount point" => "Ponto de montagem",
+"Backend" => "Backend",
+"Configuration" => "Configuração",
+"Options" => "Opções",
+"Applicable" => "Aplicável",
+"Add mount point" => "Adicionar ponto de montagem",
+"None set" => "Nenhum definido",
+"All Users" => "Todos os Usuários",
+"Groups" => "Grupos",
+"Users" => "Usuários",
+"Delete" => "Remover",
+"Enable User External Storage" => "Habilitar Armazenamento Externo do Usuário",
+"Allow users to mount their own external storage" => "Permitir usuários a montar seus próprios armazenamentos externos",
+"SSL root certificates" => "Certificados SSL raíz",
+"Import Root Certificate" => "Importar Certificado Raíz"
+);
diff --git a/apps/files_external/l10n/pt_PT.php b/apps/files_external/l10n/pt_PT.php
new file mode 100644
index 00000000000..4795a51a6b7
--- /dev/null
+++ b/apps/files_external/l10n/pt_PT.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "Acesso autorizado",
+"Error configuring Dropbox storage" => "Erro ao configurar o armazenamento do Dropbox",
+"Grant access" => "Conceder acesso",
+"Fill out all required fields" => "Preencha todos os campos obrigatórios",
+"Please provide a valid Dropbox app key and secret." => "Por favor forneça uma \"app key\" e \"secret\" do Dropbox válidas.",
+"Error configuring Google Drive storage" => "Erro ao configurar o armazenamento do Google Drive",
+"External Storage" => "Armazenamento Externo",
+"Mount point" => "Ponto de montagem",
+"Backend" => "Backend",
+"Configuration" => "Configuração",
+"Options" => "Opções",
+"Applicable" => "Aplicável",
+"Add mount point" => "Adicionar ponto de montagem",
+"None set" => "Nenhum configurado",
+"All Users" => "Todos os utilizadores",
+"Groups" => "Grupos",
+"Users" => "Utilizadores",
+"Delete" => "Apagar",
+"Enable User External Storage" => "Activar Armazenamento Externo para o Utilizador",
+"Allow users to mount their own external storage" => "Permitir que os utilizadores montem o seu próprio armazenamento externo",
+"SSL root certificates" => "Certificados SSL de raiz",
+"Import Root Certificate" => "Importar Certificado Root"
+);
diff --git a/apps/files_external/l10n/ro.php b/apps/files_external/l10n/ro.php
new file mode 100644
index 00000000000..6a152786808
--- /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",
+"Enable User External Storage" => "Permite stocare externă pentru utilizatori",
+"Allow users to mount their own external storage" => "Permite utilizatorilor să monteze stocare externă proprie",
+"SSL root certificates" => "Certificate SSL root",
+"Import Root Certificate" => "Importă certificat root"
+);
diff --git a/apps/files_external/l10n/ru.php b/apps/files_external/l10n/ru.php
index 7ee43786621..34d34a18eda 100644
--- a/apps/files_external/l10n/ru.php
+++ b/apps/files_external/l10n/ru.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Доступ предоставлен",
+"Error configuring Dropbox storage" => "Ошибка при настройке хранилища Dropbox",
+"Grant access" => "Предоставление доступа",
+"Fill out all required fields" => "Заполните все обязательные поля",
+"Please provide a valid Dropbox app key and secret." => "Пожалуйста, предоставьте действующий ключ Dropbox и пароль.",
+"Error configuring Google Drive storage" => "Ошибка при настройке хранилища Google Drive",
"External Storage" => "Внешний носитель",
"Mount point" => "Точка монтирования",
"Backend" => "Подсистема",
@@ -11,8 +17,8 @@
"Groups" => "Группы",
"Users" => "Пользователи",
"Delete" => "Удалить",
-"SSL root certificates" => "Корневые сертификаты SSL",
-"Import Root Certificate" => "Импортировать корневые сертификаты",
"Enable User External Storage" => "Включить пользовательские внешние носители",
-"Allow users to mount their own external storage" => "Разрешить пользователям монтировать их собственные внешние носители"
+"Allow users to mount their own external storage" => "Разрешить пользователям монтировать их собственные внешние носители",
+"SSL root certificates" => "Корневые сертификаты SSL",
+"Import Root Certificate" => "Импортировать корневые сертификаты"
);
diff --git a/apps/files_external/l10n/ru_RU.php b/apps/files_external/l10n/ru_RU.php
new file mode 100644
index 00000000000..493e3f5bee4
--- /dev/null
+++ b/apps/files_external/l10n/ru_RU.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "Доступ разрешен",
+"Error configuring Dropbox storage" => "Ошибка при конфигурировании хранилища Dropbox",
+"Grant access" => "Предоставить доступ",
+"Fill out all required fields" => "Заполните все требуемые поля",
+"Please provide a valid Dropbox app key and secret." => "Пожалуйста представьте допустимый ключ приложения Dropbox и пароль.",
+"Error configuring Google Drive storage" => "Ошибка настройки хранилища Google Drive",
+"External Storage" => "Внешние системы хранения данных",
+"Mount point" => "Точка монтирования",
+"Backend" => "Бэкэнд",
+"Configuration" => "Конфигурация",
+"Options" => "Опции",
+"Applicable" => "Применимый",
+"Add mount point" => "Добавить точку монтирования",
+"None set" => "Не задан",
+"All Users" => "Все пользователи",
+"Groups" => "Группы",
+"Users" => "Пользователи",
+"Delete" => "Удалить",
+"Enable User External Storage" => "Включить пользовательскую внешнюю систему хранения данных",
+"Allow users to mount their own external storage" => "Разрешить пользователям монтировать их собственную внешнюю систему хранения данных",
+"SSL root certificates" => "Корневые сертификаты SSL",
+"Import Root Certificate" => "Импортировать корневые сертификаты"
+);
diff --git a/apps/files_external/l10n/si_LK.php b/apps/files_external/l10n/si_LK.php
new file mode 100644
index 00000000000..b8e2c5714b3
--- /dev/null
+++ b/apps/files_external/l10n/si_LK.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "පිවිසීමට හැක",
+"Error configuring Dropbox storage" => "Dropbox ගබඩාව වින්‍යාස කිරීමේ දෝශයක් ඇත",
+"Grant access" => "පිවිසුම ලබාදෙන්න",
+"Fill out all required fields" => "අත්‍යාවශ්‍ය තොරතුරු සියල්ල සම්පුර්ණ කරන්න",
+"Please provide a valid Dropbox app key and secret." => "කරුණාකර වලංගු Dropbox යෙදුම් යතුරක් හා රහසක් ලබාදෙන්න.",
+"Error configuring Google Drive storage" => "Google Drive ගබඩාව වින්‍යාස කිරීමේ දෝශයක් ඇත",
+"External Storage" => "භාහිර ගබඩාව",
+"Mount point" => "මවුන්ට් කළ ස්ථානය",
+"Backend" => "පසු පද්ධතිය",
+"Configuration" => "වින්‍යාසය",
+"Options" => "විකල්පයන්",
+"Applicable" => "අදාළ",
+"Add mount point" => "මවුන්ට් කරන ස්ථානයක් එකතු කරන්න",
+"None set" => "කිසිවක් නැත",
+"All Users" => "සියළු පරිශීලකයන්",
+"Groups" => "කණ්ඩායම්",
+"Users" => "පරිශීලකයන්",
+"Delete" => "මකා දමන්න",
+"Enable User External Storage" => "පරිශීලක භාහිර ගබඩාවන් සක්‍රිය කරන්න",
+"Allow users to mount their own external storage" => "පරිශීලකයන්ට තමාගේම භාහිර ගබඩාවන් මවුන්ට් කිරීමේ අයිතිය දෙන්න",
+"SSL root certificates" => "SSL මූල සහතිකයන්",
+"Import Root Certificate" => "මූල සහතිකය ආයාත කරන්න"
+);
diff --git a/apps/files_external/l10n/sk_SK.php b/apps/files_external/l10n/sk_SK.php
index 24087ea7feb..04d5e3c7ee4 100644
--- a/apps/files_external/l10n/sk_SK.php
+++ b/apps/files_external/l10n/sk_SK.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Prístup povolený",
+"Error configuring Dropbox storage" => "Chyba pri konfigurácii úložiska Dropbox",
+"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",
@@ -11,8 +17,8 @@
"Groups" => "Skupiny",
"Users" => "Užívatelia",
"Delete" => "Odstrániť",
-"SSL root certificates" => "Koreňové SSL certifikáty",
-"Import Root Certificate" => "Importovať koreňový certifikát",
"Enable User External Storage" => "Povoliť externé úložisko",
-"Allow users to mount their own external storage" => "Povoliť užívateľom pripojiť ich vlastné externé úložisko"
+"Allow users to mount their own external storage" => "Povoliť užívateľom pripojiť ich vlastné externé úložisko",
+"SSL root certificates" => "Koreňové SSL certifikáty",
+"Import Root Certificate" => "Importovať koreňový certifikát"
);
diff --git a/apps/files_external/l10n/sl.php b/apps/files_external/l10n/sl.php
index d588844467e..713e89578e2 100644
--- a/apps/files_external/l10n/sl.php
+++ b/apps/files_external/l10n/sl.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Dostop je odobren",
+"Error configuring Dropbox storage" => "Napaka nastavljanja shrambe Dropbox",
+"Grant access" => "Odobri dostop",
+"Fill out all required fields" => "Zapolni vsa zahtevana polja",
+"Please provide a valid Dropbox app key and secret." => "Vpišite veljaven ključ programa in kodo za Dropbox",
+"Error configuring Google Drive storage" => "Napaka nastavljanja shrambe Google Drive",
"External Storage" => "Zunanja podatkovna shramba",
"Mount point" => "Priklopna točka",
"Backend" => "Zaledje",
@@ -11,8 +17,8 @@
"Groups" => "Skupine",
"Users" => "Uporabniki",
"Delete" => "Izbriši",
-"SSL root certificates" => "SSL korenski certifikati",
-"Import Root Certificate" => "Uvozi korenski certifikat",
"Enable User External Storage" => "Omogoči uporabo zunanje podatkovne shrambe za uporabnike",
-"Allow users to mount their own external storage" => "Dovoli uporabnikom priklop lastne zunanje podatkovne shrambe"
+"Allow users to mount their own external storage" => "Dovoli uporabnikom priklop lastne zunanje podatkovne shrambe",
+"SSL root certificates" => "Korenska potrdila SSL",
+"Import Root Certificate" => "Uvozi korensko potrdilo"
);
diff --git a/apps/files_external/l10n/sv.php b/apps/files_external/l10n/sv.php
index 0838df6a32b..0a5e1c66d99 100644
--- a/apps/files_external/l10n/sv.php
+++ b/apps/files_external/l10n/sv.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Åtkomst beviljad",
+"Error configuring Dropbox storage" => "Fel vid konfigurering av Dropbox",
+"Grant access" => "Bevilja åtkomst",
+"Fill out all required fields" => "Fyll i alla obligatoriska fält",
+"Please provide a valid Dropbox app key and secret." => "Ange en giltig Dropbox nyckel och hemlighet.",
+"Error configuring Google Drive storage" => "Fel vid konfigurering av Google Drive",
"External Storage" => "Extern lagring",
"Mount point" => "Monteringspunkt",
"Backend" => "Källa",
@@ -11,8 +17,8 @@
"Groups" => "Grupper",
"Users" => "Användare",
"Delete" => "Radera",
-"SSL root certificates" => "SSL rotcertifikat",
-"Import Root Certificate" => "Importera rotcertifikat",
"Enable User External Storage" => "Aktivera extern lagring för användare",
-"Allow users to mount their own external storage" => "Tillåt användare att montera egen extern lagring"
+"Allow users to mount their own external storage" => "Tillåt användare att montera egen extern lagring",
+"SSL root certificates" => "SSL rotcertifikat",
+"Import Root Certificate" => "Importera rotcertifikat"
);
diff --git a/apps/files_external/l10n/th_TH.php b/apps/files_external/l10n/th_TH.php
index 84a233046eb..70ab8d33485 100644
--- a/apps/files_external/l10n/th_TH.php
+++ b/apps/files_external/l10n/th_TH.php
@@ -1,4 +1,10 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "การเข้าถึงได้รับอนุญาตแล้ว",
+"Error configuring Dropbox storage" => "เกิดข้อผิดพลาดในการกำหนดค่าพื้นที่จัดเก็บข้อมูล Dropbox",
+"Grant access" => "อนุญาตให้เข้าถึงได้",
+"Fill out all required fields" => "กรอกข้อมูลในช่องข้อมูลที่จำเป็นต้องกรอกทั้งหมด",
+"Please provide a valid Dropbox app key and secret." => "กรุณากรอกรหัส app key ของ Dropbox และรหัสลับ",
+"Error configuring Google Drive storage" => "เกิดข้อผิดพลาดในการกำหนดค่าการจัดเก็บข้อมูลในพื้นที่ของ Google Drive",
"External Storage" => "พื้นทีจัดเก็บข้อมูลจากภายนอก",
"Mount point" => "จุดชี้ตำแหน่ง",
"Backend" => "ด้านหลังระบบ",
@@ -11,8 +17,8 @@
"Groups" => "กลุ่ม",
"Users" => "ผู้ใช้งาน",
"Delete" => "ลบ",
-"SSL root certificates" => "ใบรับรองความปลอดภัยด้วยระบบ SSL จาก Root",
-"Import Root Certificate" => "นำเข้าข้อมูลใบรับรองความปลอดภัยจาก Root",
"Enable User External Storage" => "เปิดให้มีการใช้พื้นที่จัดเก็บข้อมูลของผู้ใช้งานจากภายนอกได้",
-"Allow users to mount their own external storage" => "อนุญาตให้ผู้ใช้งานสามารถชี้ตำแหน่งไปที่พื้นที่จัดเก็บข้อมูลภายนอกของตนเองได้"
+"Allow users to mount their own external storage" => "อนุญาตให้ผู้ใช้งานสามารถชี้ตำแหน่งไปที่พื้นที่จัดเก็บข้อมูลภายนอกของตนเองได้",
+"SSL root certificates" => "ใบรับรองความปลอดภัยด้วยระบบ SSL จาก Root",
+"Import Root Certificate" => "นำเข้าข้อมูลใบรับรองความปลอดภัยจาก Root"
);
diff --git a/apps/files_external/l10n/vi.php b/apps/files_external/l10n/vi.php
index 35312329da1..80328bf957a 100644
--- a/apps/files_external/l10n/vi.php
+++ b/apps/files_external/l10n/vi.php
@@ -1,4 +1,9 @@
<?php $TRANSLATIONS = array(
+"Access granted" => "Đã cấp quyền truy cập",
+"Error configuring Dropbox storage" => "Lỗi cấu hình lưu trữ Dropbox ",
+"Grant access" => "Cấp quyền truy cập",
+"Fill out all required fields" => "Điền vào tất cả các trường bắt buộc",
+"Error configuring Google Drive storage" => "Lỗi cấu hình lưu trữ Google Drive",
"External Storage" => "Lưu trữ ngoài",
"Mount point" => "Điểm gắn",
"Backend" => "phụ trợ",
@@ -11,8 +16,8 @@
"Groups" => "Nhóm",
"Users" => "Người dùng",
"Delete" => "Xóa",
-"SSL root certificates" => "Chứng chỉ SSL root",
-"Import Root Certificate" => "Nhập Root Certificate",
"Enable User External Storage" => "Kích hoạt tính năng lưu trữ ngoài",
-"Allow users to mount their own external storage" => "Cho phép người dùng kết nối với lưu trữ riêng bên ngoài của họ"
+"Allow users to mount their own external storage" => "Cho phép người dùng kết nối với lưu trữ riêng bên ngoài của họ",
+"SSL root certificates" => "Chứng chỉ SSL root",
+"Import Root Certificate" => "Nhập Root Certificate"
);
diff --git a/apps/files_external/l10n/zh_CN.GB2312.php b/apps/files_external/l10n/zh_CN.GB2312.php
new file mode 100644
index 00000000000..47983d3d7d4
--- /dev/null
+++ b/apps/files_external/l10n/zh_CN.GB2312.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "已授予权限",
+"Error configuring Dropbox storage" => "配置 Dropbox 存储出错",
+"Grant access" => "授予权限",
+"Fill out all required fields" => "填充全部必填字段",
+"Please provide a valid Dropbox app key and secret." => "请提供一个有效的 Dropbox app key 和 secret。",
+"Error configuring Google Drive storage" => "配置 Google Drive 存储失败",
+"External Storage" => "外部存储",
+"Mount point" => "挂载点",
+"Backend" => "后端",
+"Configuration" => "配置",
+"Options" => "选项",
+"Applicable" => "可应用",
+"Add mount point" => "添加挂载点",
+"None set" => "未设置",
+"All Users" => "所有用户",
+"Groups" => "群组",
+"Users" => "用户",
+"Delete" => "删除",
+"Enable User External Storage" => "启用用户外部存储",
+"Allow users to mount their own external storage" => "允许用户挂载他们的外部存储",
+"SSL root certificates" => "SSL 根证书",
+"Import Root Certificate" => "导入根证书"
+);
diff --git a/apps/files_external/l10n/zh_CN.php b/apps/files_external/l10n/zh_CN.php
new file mode 100644
index 00000000000..247ef7ce95c
--- /dev/null
+++ b/apps/files_external/l10n/zh_CN.php
@@ -0,0 +1,24 @@
+<?php $TRANSLATIONS = array(
+"Access granted" => "权限已授予。",
+"Error configuring Dropbox storage" => "配置Dropbox存储时出错",
+"Grant access" => "授权",
+"Fill out all required fields" => "完成所有必填项",
+"Please provide a valid Dropbox app key and secret." => "请提供有效的Dropbox应用key和secret",
+"Error configuring Google Drive storage" => "配置Google Drive存储时出错",
+"External Storage" => "外部存储",
+"Mount point" => "挂载点",
+"Backend" => "后端",
+"Configuration" => "配置",
+"Options" => "选项",
+"Applicable" => "适用的",
+"Add mount point" => "增加挂载点",
+"None set" => "未设置",
+"All Users" => "所有用户",
+"Groups" => "组",
+"Users" => "用户",
+"Delete" => "删除",
+"Enable User External Storage" => "启用用户外部存储",
+"Allow users to mount their own external storage" => "允许用户挂载自有外部存储",
+"SSL root certificates" => "SSL根证书",
+"Import Root Certificate" => "导入根证书"
+);
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index eec31ec2ef9..9dc3cdd7147 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_Filestorage_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)));
@@ -191,7 +231,7 @@ class OC_Mount_Config {
$file = OC::$SERVERROOT.'/config/mount.php';
}
if (is_file($file)) {
- $mountPoints = include($file);
+ $mountPoints = include $file;
if (is_array($mountPoints)) {
return $mountPoints;
}
@@ -248,6 +288,9 @@ class OC_Mount_Config {
if (!is_dir($path)) mkdir($path);
$result = array();
$handle = opendir($path);
+ if (!$handle) {
+ return array();
+ }
while (false !== ($file = readdir($handle))) {
if($file != '.' && $file != '..') $result[] = $file;
}
@@ -270,6 +313,7 @@ class OC_Mount_Config {
fclose($fh);
if (strpos($data, 'BEGIN CERTIFICATE')) {
fwrite($fh_certs, $data);
+ fwrite($fh_certs, "\r\n");
}
}
diff --git a/apps/files_external/lib/dropbox.php b/apps/files_external/lib/dropbox.php
index bb86894e55e..c8220832702 100755
--- a/apps/files_external/lib/dropbox.php
+++ b/apps/files_external/lib/dropbox.php
@@ -25,21 +25,25 @@ require_once 'Dropbox/autoload.php';
class OC_Filestorage_Dropbox extends OC_Filestorage_Common {
private $dropbox;
+ private $root;
private $metaData = array();
private static $tempFiles = array();
public function __construct($params) {
if (isset($params['configured']) && $params['configured'] == 'true' && isset($params['app_key']) && isset($params['app_secret']) && isset($params['token']) && isset($params['token_secret'])) {
+ $this->root=isset($params['root'])?$params['root']:'';
$oauth = new Dropbox_OAuth_Curl($params['app_key'], $params['app_secret']);
$oauth->setToken($params['token'], $params['token_secret']);
$this->dropbox = new Dropbox_API($oauth, 'dropbox');
+ $this->mkdir('');
} else {
throw new Exception('Creating OC_Filestorage_Dropbox storage failed');
}
}
private function getMetaData($path, $list = false) {
+ $path = $this->root.$path;
if (!$list && isset($this->metaData[$path])) {
return $this->metaData[$path];
} else {
@@ -76,6 +80,7 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common {
}
public function mkdir($path) {
+ $path = $this->root.$path;
try {
$this->dropbox->createFolder($path);
return true;
@@ -144,6 +149,7 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common {
}
public function unlink($path) {
+ $path = $this->root.$path;
try {
$this->dropbox->delete($path);
return true;
@@ -154,6 +160,8 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common {
}
public function rename($path1, $path2) {
+ $path1 = $this->root.$path1;
+ $path2 = $this->root.$path2;
try {
$this->dropbox->move($path1, $path2);
return true;
@@ -164,6 +172,8 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common {
}
public function copy($path1, $path2) {
+ $path1 = $this->root.$path1;
+ $path2 = $this->root.$path2;
try {
$this->dropbox->copy($path1, $path2);
return true;
@@ -174,6 +184,7 @@ class OC_Filestorage_Dropbox extends OC_Filestorage_Common {
}
public function fopen($path, $mode) {
+ $path = $this->root.$path;
switch ($mode) {
case 'r':
case 'rb':
diff --git a/apps/files_external/lib/ftp.php b/apps/files_external/lib/ftp.php
index 261141455cc..13d1387f287 100644
--- a/apps/files_external/lib/ftp.php
+++ b/apps/files_external/lib/ftp.php
@@ -53,7 +53,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
case 'ab':
//these are supported by the wrapper
$context = stream_context_create(array('ftp' => array('overwrite' => true)));
- return fopen($this->constructUrl($path),$mode,false,$context);
+ return fopen($this->constructUrl($path),$mode, false,$context);
case 'r+':
case 'w+':
case 'wb+':
@@ -64,7 +64,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
case 'c+':
//emulate these
if(strrpos($path,'.')!==false) {
- $ext=substr($path,strrpos($path,'.'));
+ $ext=substr($path, strrpos($path,'.'));
}else{
$ext='';
}
@@ -80,7 +80,7 @@ class OC_FileStorage_FTP extends OC_FileStorage_StreamWrapper{
public function writeBack($tmpFile) {
if(isset(self::$tempFiles[$tmpFile])) {
- $this->uploadFile($tmpFile,self::$tempFiles[$tmpFile]);
+ $this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
unlink($tmpFile);
}
}
diff --git a/apps/files_external/lib/google.php b/apps/files_external/lib/google.php
index 9b83dcee537..32d57ed3cef 100644
--- a/apps/files_external/lib/google.php
+++ b/apps/files_external/lib/google.php
@@ -395,7 +395,7 @@ class OC_Filestorage_Google extends OC_Filestorage_Common {
case 'c':
case 'c+':
if (strrpos($path,'.') !== false) {
- $ext = substr($path,strrpos($path,'.'));
+ $ext = substr($path, strrpos($path,'.'));
} else {
$ext = '';
}
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index e5ba7a17743..eed2582dc99 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -59,7 +59,7 @@ class OC_FileStorage_SMB extends OC_FileStorage_StreamWrapper{
}
public function filetype($path) {
- return (bool)@$this->opendir($path);//using opendir causes the same amount of requests and caches the content of the folder in one go
+ return (bool)@$this->opendir($path) ? 'dir' : 'file';//using opendir causes the same amount of requests and caches the content of the folder in one go
}
/**
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index c29d28b44c1..632c72c280f 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -39,7 +39,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
* @return string
*/
private function getContainerName($path) {
- $path=trim($this->root.$path,'/');
+ $path=trim(trim($this->root,'/')."/".$path,'/.');
return str_replace('/','\\',$path);
}
@@ -70,11 +70,11 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
* @return CF_Container
*/
private function createContainer($path) {
- if($path=='' or $path=='/') {
+ if($path=='' or $path=='/' or $path=='.') {
return $this->conn->create_container($this->getContainerName($path));
}
$parent=dirname($path);
- if($parent=='' or $parent=='/') {
+ if($parent=='' or $parent=='/' or $parent=='.') {
$parentContainer=$this->rootContainer;
}else{
if(!$this->containerExists($parent)) {
@@ -83,7 +83,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
$parentContainer=$this->getContainer($parent);
}
}
- $this->addSubContainer($parentContainer,basename($path));
+ $this->addSubContainer($parentContainer, basename($path));
return $this->conn->create_container($this->getContainerName($path));
}
@@ -100,6 +100,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
if(is_null($container)) {
return null;
}else{
+ if ($path=="/" or $path=='') {
+ return null;
+ }
try{
$obj=$container->get_object(basename($path));
$this->objects[$path]=$obj;
@@ -135,7 +138,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
private function createObject($path) {
$container=$this->getContainer(dirname($path));
if(!is_null($container)) {
- $container=$this->createContainer($path);
+ $container=$this->createContainer(dirname($path));
}
return $container->create_object(basename($path));
}
@@ -242,7 +245,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
return false;
}else{
unset($containers[$i]);
- file_put_contents($tmpFile,implode("\n",$containers)."\n");
+ file_put_contents($tmpFile, implode("\n",$containers)."\n");
}
$obj->load_from_filename($tmpFile);
@@ -277,7 +280,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
$this->conn = new CF_Connection($this->auth);
- if(!$this->containerExists($this->root)) {
+ if(!$this->containerExists('/')) {
$this->rootContainer=$this->createContainer('/');
}else{
$this->rootContainer=$this->getContainer('/');
@@ -301,7 +304,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
$this->emptyContainer($path);
if($path!='' and $path!='/') {
$parentContainer=$this->getContainer(dirname($path));
- $this->removeSubContainer($parentContainer,basename($path));
+ $this->removeSubContainer($parentContainer, basename($path));
}
$this->conn->delete_container($this->getContainerName($path));
@@ -391,6 +394,9 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
}
public function unlink($path) {
+ if($this->containerExists($path)) {
+ return $this->rmdir($path);
+ }
if($this->objectExists($path)) {
$container=$this->getContainer(dirname($path));
$container->delete_object(basename($path));
@@ -401,13 +407,13 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
}
public function fopen($path,$mode) {
- $obj=$this->getObject($path);
- if(is_null($obj)) {
- return false;
- }
switch($mode) {
case 'r':
case 'rb':
+ $obj=$this->getObject($path);
+ if (is_null($obj)) {
+ return false;
+ }
$fp = fopen('php://temp', 'r+');
$obj->stream($fp);
@@ -434,13 +440,13 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
public function writeBack($tmpFile) {
if(isset(self::$tempFiles[$tmpFile])) {
- $this->fromTmpFile($tmpFile,self::$tempFiles[$tmpFile]);
+ $this->fromTmpFile($tmpFile, self::$tempFiles[$tmpFile]);
unlink($tmpFile);
}
}
public function free_space($path) {
- return 0;
+ return 1024*1024*1024*8;
}
public function touch($path,$mtime=null) {
@@ -460,7 +466,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
public function rename($path1,$path2) {
$sourceContainer=$this->getContainer(dirname($path1));
$targetContainer=$this->getContainer(dirname($path2));
- $result=$sourceContainer->move_object_to(basename($path1),$targetContainer,basename($path2));
+ $result=$sourceContainer->move_object_to(basename($path1),$targetContainer, basename($path2));
unset($this->objects[$path1]);
if($result) {
$targetObj=$this->getObject($path2);
@@ -472,7 +478,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
public function copy($path1,$path2) {
$sourceContainer=$this->getContainer(dirname($path1));
$targetContainer=$this->getContainer(dirname($path2));
- $result=$sourceContainer->copy_object_to(basename($path1),$targetContainer,basename($path2));
+ $result=$sourceContainer->copy_object_to(basename($path1),$targetContainer, basename($path2));
if($result) {
$targetObj=$this->getObject($path2);
$this->resetMTime($targetObj);
@@ -481,7 +487,17 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
}
public function stat($path) {
+ $container=$this->getContainer($path);
+ if (!is_null($container)) {
+ return array(
+ 'mtime'=>-1,
+ 'size'=>$container->bytes_used,
+ 'ctime'=>-1
+ );
+ }
+
$obj=$this->getObject($path);
+
if(is_null($obj)) {
return false;
}
@@ -505,7 +521,7 @@ class OC_FileStorage_SWIFT extends OC_Filestorage_Common{
$obj->save_to_filename($tmpFile);
return $tmpFile;
}else{
- return false;
+ return OCP\Files::tmpFile();
}
}
diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index 3c18b227fa6..74e468a2838 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -65,12 +65,12 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
public function mkdir($path) {
$path=$this->cleanPath($path);
- return $this->simpleResponse('MKCOL',$path,null,201);
+ return $this->simpleResponse('MKCOL',$path, null,201);
}
public function rmdir($path) {
$path=$this->cleanPath($path);
- return $this->simpleResponse('DELETE',$path,null,204);
+ return $this->simpleResponse('DELETE',$path, null,204);
}
public function opendir($path) {
@@ -123,7 +123,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
}
public function unlink($path) {
- return $this->simpleResponse('DELETE',$path,null,204);
+ return $this->simpleResponse('DELETE',$path, null,204);
}
public function fopen($path,$mode) {
@@ -131,6 +131,9 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
switch($mode) {
case 'r':
case 'rb':
+ if(!$this->file_exists($path)) {
+ return false;
+ }
//straight up curl instead of sabredav here, sabredav put's the entire get result in memory
$curl = curl_init();
$fp = fopen('php://temp', 'r+');
@@ -156,7 +159,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
case 'c+':
//emulate these
if(strrpos($path,'.')!==false) {
- $ext=substr($path,strrpos($path,'.'));
+ $ext=substr($path, strrpos($path,'.'));
}else{
$ext='';
}
@@ -172,7 +175,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
public function writeBack($tmpFile) {
if(isset(self::$tempFiles[$tmpFile])) {
- $this->uploadFile($tmpFile,self::$tempFiles[$tmpFile]);
+ $this->uploadFile($tmpFile, self::$tempFiles[$tmpFile]);
unlink($tmpFile);
}
}
@@ -222,7 +225,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
try{
- $response=$this->client->request('MOVE',$path1,null,array('Destination'=>$path2));
+ $response=$this->client->request('MOVE', $path1, null, array('Destination'=>$path2));
return true;
}catch(Exception $e) {
echo $e;
@@ -236,7 +239,7 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
$path1=$this->cleanPath($path1);
$path2=$this->root.$this->cleanPath($path2);
try{
- $response=$this->client->request('COPY',$path1,null,array('Destination'=>$path2));
+ $response=$this->client->request('COPY', $path1, null, array('Destination'=>$path2));
return true;
}catch(Exception $e) {
echo $e;
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index c44b09b180f..367ce2bc03e 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -1,4 +1,4 @@
-<form id="files_external" method="post" enctype="multipart/form-data" action="<?php echo OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php'); ?>">
+<form id="files_external">
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('External Storage'); ?></strong></legend>
<table id="externalStorage" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
@@ -81,7 +81,18 @@
</table>
<br />
- <?php if (!$_['isAdminPage']): ?>
+ <?php if ($_['isAdminPage']): ?>
+ <br />
+ <input type="checkbox" name="allowUserMounting" id="allowUserMounting" value="1" <?php if ($_['allowUserMounting'] == 'yes') echo ' checked="checked"'; ?> />
+ <label for="allowUserMounting"><?php echo $l->t('Enable User External Storage'); ?></label><br/>
+ <em><?php echo $l->t('Allow users to mount their own external storage'); ?></em>
+ <?php endif; ?>
+ </fieldset>
+</form>
+
+<form id="files_external" method="post" enctype="multipart/form-data" action="<?php echo OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php'); ?>">
+<fieldset class="personalblock">
+<?php if (!$_['isAdminPage']): ?>
<table id="sslCertificate" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
<thead>
<tr>
@@ -101,12 +112,5 @@
<input type="file" id="rootcert_import" name="rootcert_import" style="width:230px;">
<input type="submit" name="cert_import" value="<?php echo $l->t('Import Root Certificate'); ?>" />
<?php endif; ?>
-
- <?php if ($_['isAdminPage']): ?>
- <br />
- <input type="checkbox" name="allowUserMounting" id="allowUserMounting" value="1" <?php if ($_['allowUserMounting'] == 'yes') echo ' checked="checked"'; ?> />
- <label for="allowUserMounting"><?php echo $l->t('Enable User External Storage'); ?></label><br/>
- <em><?php echo $l->t('Allow users to mount their own external storage'); ?></em>
- <?php endif; ?>
- </fieldset>
-</form>
+</fieldset>
+</form> \ No newline at end of file
diff --git a/apps/files_external/tests/amazons3.php b/apps/files_external/tests/amazons3.php
index b9b4cf65bd6..725f4ba05da 100644
--- a/apps/files_external/tests/amazons3.php
+++ b/apps/files_external/tests/amazons3.php
@@ -1,43 +1,42 @@
<?php
/**
-* ownCloud
-*
-* @author Michael Gapczynski
-* @copyright 2012 Michael Gapczynski mtgap@owncloud.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*/
+ * ownCloud
+ *
+ * @author Michael Gapczynski
+ * @copyright 2012 Michael Gapczynski mtgap@owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
-$config = include('apps/files_external/tests/config.php');
-if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['run']) {
- abstract class Test_Filestorage_AmazonS3 extends Test_FileStorage{}
- return;
-} else {
- class Test_Filestorage_AmazonS3 extends Test_FileStorage {
+class Test_Filestorage_AmazonS3 extends Test_FileStorage {
- private $config;
- private $id;
+ private $config;
+ private $id;
- public function setUp() {
- $id = uniqid();
- $this->config = include('apps/files_external/tests/config.php');
- $this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in
- $this->instance = new OC_Filestorage_AmazonS3($this->config['amazons3']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['amazons3']) or !$this->config['amazons3']['run']) {
+ $this->markTestSkipped('AmazonS3 backend not configured');
}
+ $this->config['amazons3']['bucket'] = $id; // Make sure we have a new empty bucket to work in
+ $this->instance = new OC_Filestorage_AmazonS3($this->config['amazons3']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
$s3 = new AmazonS3(array('key' => $this->config['amazons3']['key'], 'secret' => $this->config['amazons3']['secret']));
if ($s3->delete_all_objects($this->id)) {
$s3->delete_bucket($this->id);
diff --git a/apps/files_external/tests/config.php b/apps/files_external/tests/config.php
index e58a87fabdf..ff16b1c1d8a 100644
--- a/apps/files_external/tests/config.php
+++ b/apps/files_external/tests/config.php
@@ -26,7 +26,7 @@ return array(
'run'=>false,
'user'=>'test:tester',
'token'=>'testing',
- 'host'=>'localhost:8080/auth',
+ 'host'=>'localhost.local:8080/auth',
'root'=>'/',
),
'smb'=>array(
@@ -43,4 +43,13 @@ return array(
'secret'=>'test',
'bucket'=>'bucket',
),
+ 'dropbox' => array (
+ 'run'=>false,
+ 'root'=>'owncloud',
+ 'configured' => 'true',
+ 'app_key' => '',
+ 'app_secret' => '',
+ 'token' => '',
+ 'token_secret' => ''
+ )
);
diff --git a/apps/files_external/tests/dropbox.php b/apps/files_external/tests/dropbox.php
new file mode 100644
index 00000000000..56319b9f5d7
--- /dev/null
+++ b/apps/files_external/tests/dropbox.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+class Test_Filestorage_Dropbox extends Test_FileStorage {
+ private $config;
+
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['dropbox']) or !$this->config['dropbox']['run']) {
+ $this->markTestSkipped('Dropbox backend not configured');
+ }
+ $this->config['dropbox']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
+ $this->instance = new OC_Filestorage_Dropbox($this->config['dropbox']);
+ }
+
+ public function tearDown() {
+ if ($this->instance) {
+ $this->instance->unlink('/');
+ }
+ }
+}
diff --git a/apps/files_external/tests/ftp.php b/apps/files_external/tests/ftp.php
index 12f3ec3908d..4549c420410 100644
--- a/apps/files_external/tests/ftp.php
+++ b/apps/files_external/tests/ftp.php
@@ -6,22 +6,21 @@
* See the COPYING-README file.
*/
-$config=include('apps/files_external/tests/config.php');
-if(!is_array($config) or !isset($config['ftp']) or !$config['ftp']['run']) {
- abstract class Test_Filestorage_FTP extends Test_FileStorage{}
- return;
-}else{
- class Test_Filestorage_FTP extends Test_FileStorage {
- private $config;
+class Test_Filestorage_FTP extends Test_FileStorage {
+ private $config;
- public function setUp() {
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['ftp']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_FTP($this->config['ftp']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['ftp']) or !$this->config['ftp']['run']) {
+ $this->markTestSkipped('FTP backend not configured');
}
+ $this->config['ftp']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
+ $this->instance = new OC_Filestorage_FTP($this->config['ftp']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
OCP\Files::rmdirr($this->instance->constructUrl(''));
}
}
diff --git a/apps/files_external/tests/google.php b/apps/files_external/tests/google.php
index d2a6358ade4..46e622cc180 100644
--- a/apps/files_external/tests/google.php
+++ b/apps/files_external/tests/google.php
@@ -1,42 +1,41 @@
<?php
/**
-* ownCloud
-*
-* @author Michael Gapczynski
-* @copyright 2012 Michael Gapczynski mtgap@owncloud.com
-*
-* This library is free software; you can redistribute it and/or
-* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
-* License as published by the Free Software Foundation; either
-* version 3 of the License, or any later version.
-*
-* This library is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
-*
-* You should have received a copy of the GNU Affero General Public
-* License along with this library. If not, see <http://www.gnu.org/licenses/>.
-*/
+ * ownCloud
+ *
+ * @author Michael Gapczynski
+ * @copyright 2012 Michael Gapczynski mtgap@owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
-$config=include('apps/files_external/tests/config.php');
-if(!is_array($config) or !isset($config['google']) or !$config['google']['run']) {
- abstract class Test_Filestorage_Google extends Test_FileStorage{}
- return;
-}else{
- class Test_Filestorage_Google extends Test_FileStorage {
+class Test_Filestorage_Google extends Test_FileStorage {
- private $config;
+ private $config;
- public function setUp() {
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_Google($this->config['google']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['google']) or !$this->config['google']['run']) {
+ $this->markTestSkipped('Google backend not configured');
}
+ $this->config['google']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
+ $this->instance = new OC_Filestorage_Google($this->config['google']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
$this->instance->rmdir('/');
}
}
diff --git a/apps/files_external/tests/smb.php b/apps/files_external/tests/smb.php
index 7de4fddbb34..2c03ef5dbd0 100644
--- a/apps/files_external/tests/smb.php
+++ b/apps/files_external/tests/smb.php
@@ -6,23 +6,21 @@
* See the COPYING-README file.
*/
-$config=include('apps/files_external/tests/config.php');
+class Test_Filestorage_SMB extends Test_FileStorage {
+ private $config;
-if(!is_array($config) or !isset($config['smb']) or !$config['smb']['run']) {
- abstract class Test_Filestorage_SMB extends Test_FileStorage{}
- return;
-}else{
- class Test_Filestorage_SMB extends Test_FileStorage {
- private $config;
-
- public function setUp() {
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['smb']['root'].=$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_SMB($this->config['smb']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['smb']) or !$this->config['smb']['run']) {
+ $this->markTestSkipped('Samba backend not configured');
}
+ $this->config['smb']['root'] .= $id; //make sure we have an new empty folder to work in
+ $this->instance = new OC_Filestorage_SMB($this->config['smb']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
OCP\Files::rmdirr($this->instance->constructUrl(''));
}
}
diff --git a/apps/files_external/tests/swift.php b/apps/files_external/tests/swift.php
index a6f5eace1c8..8cf2a3abc76 100644
--- a/apps/files_external/tests/swift.php
+++ b/apps/files_external/tests/swift.php
@@ -6,25 +6,23 @@
* See the COPYING-README file.
*/
-$config=include('apps/files_external/tests/config.php');
-if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']) {
- abstract class Test_Filestorage_SWIFT extends Test_FileStorage{}
- return;
-}else{
- class Test_Filestorage_SWIFT extends Test_FileStorage {
- private $config;
+class Test_Filestorage_SWIFT extends Test_FileStorage {
+ private $config;
- public function setUp() {
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['swift']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_SWIFT($this->config['swift']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['swift']) or !$this->config['swift']['run']) {
+ $this->markTestSkipped('OpenStack SWIFT backend not configured');
}
+ $this->config['swift']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
+ $this->instance = new OC_Filestorage_SWIFT($this->config['swift']);
+ }
- public function tearDown() {
- $this->instance->rmdir('');
+ public function tearDown() {
+ if ($this->instance) {
+ $this->instance->rmdir('');
}
-
}
}
diff --git a/apps/files_external/tests/webdav.php b/apps/files_external/tests/webdav.php
index 74d980aa3f1..2da88f63edd 100644
--- a/apps/files_external/tests/webdav.php
+++ b/apps/files_external/tests/webdav.php
@@ -6,22 +6,21 @@
* See the COPYING-README file.
*/
-$config=include('apps/files_external/tests/config.php');
-if(!is_array($config) or !isset($config['webdav']) or !$config['webdav']['run']) {
- abstract class Test_Filestorage_DAV extends Test_FileStorage{}
- return;
-}else{
- class Test_Filestorage_DAV extends Test_FileStorage {
- private $config;
+class Test_Filestorage_DAV extends Test_FileStorage {
+ private $config;
- public function setUp() {
- $id=uniqid();
- $this->config=include('apps/files_external/tests/config.php');
- $this->config['webdav']['root'].='/'.$id;//make sure we have an new empty folder to work in
- $this->instance=new OC_Filestorage_DAV($this->config['webdav']);
+ public function setUp() {
+ $id = uniqid();
+ $this->config = include('files_external/tests/config.php');
+ if (!is_array($this->config) or !isset($this->config['webdav']) or !$this->config['webdav']['run']) {
+ $this->markTestSkipped('WebDAV backend not configured');
}
+ $this->config['webdav']['root'] .= '/' . $id; //make sure we have an new empty folder to work in
+ $this->instance = new OC_Filestorage_DAV($this->config['webdav']);
+ }
- public function tearDown() {
+ public function tearDown() {
+ if ($this->instance) {
$this->instance->rmdir('/');
}
}