summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files/index.php2
-rw-r--r--apps/files/js/fileactions.js2
-rw-r--r--apps/files/l10n/el.php3
-rw-r--r--apps/files/l10n/et_EE.php5
-rw-r--r--apps/files/l10n/pl_PL.php5
-rw-r--r--apps/files/l10n/ro.php2
-rw-r--r--apps/files/templates/admin.php42
-rw-r--r--apps/files/tests/js/fileactionsSpec.js26
-rw-r--r--apps/files_encryption/l10n/el.php1
-rw-r--r--apps/files_encryption/l10n/et_EE.php1
-rw-r--r--apps/files_encryption/lib/proxy.php92
-rw-r--r--apps/files_encryption/lib/stream.php28
-rw-r--r--apps/files_encryption/lib/util.php33
-rw-r--r--apps/files_encryption/templates/settings-admin.php113
-rw-r--r--apps/files_encryption/templates/settings-personal.php119
-rwxr-xr-xapps/files_encryption/tests/share.php6
-rw-r--r--apps/files_external/l10n/bg_BG.php2
-rw-r--r--apps/files_external/l10n/bn_BD.php2
-rw-r--r--apps/files_external/l10n/ca.php2
-rw-r--r--apps/files_external/l10n/cs_CZ.php2
-rw-r--r--apps/files_external/l10n/da.php2
-rw-r--r--apps/files_external/l10n/de.php2
-rw-r--r--apps/files_external/l10n/de_CH.php2
-rw-r--r--apps/files_external/l10n/de_DE.php2
-rw-r--r--apps/files_external/l10n/el.php3
-rw-r--r--apps/files_external/l10n/en_GB.php2
-rw-r--r--apps/files_external/l10n/eo.php2
-rw-r--r--apps/files_external/l10n/es.php2
-rw-r--r--apps/files_external/l10n/es_AR.php2
-rw-r--r--apps/files_external/l10n/es_MX.php2
-rw-r--r--apps/files_external/l10n/et_EE.php4
-rw-r--r--apps/files_external/l10n/eu.php2
-rw-r--r--apps/files_external/l10n/fa.php2
-rw-r--r--apps/files_external/l10n/fi_FI.php2
-rw-r--r--apps/files_external/l10n/fr.php2
-rw-r--r--apps/files_external/l10n/gl.php2
-rw-r--r--apps/files_external/l10n/he.php2
-rw-r--r--apps/files_external/l10n/hu_HU.php2
-rw-r--r--apps/files_external/l10n/id.php2
-rw-r--r--apps/files_external/l10n/is.php2
-rw-r--r--apps/files_external/l10n/it.php2
-rw-r--r--apps/files_external/l10n/ja.php2
-rw-r--r--apps/files_external/l10n/ka_GE.php2
-rw-r--r--apps/files_external/l10n/ko.php2
-rw-r--r--apps/files_external/l10n/lt_LT.php2
-rw-r--r--apps/files_external/l10n/lv.php2
-rw-r--r--apps/files_external/l10n/mk.php2
-rw-r--r--apps/files_external/l10n/nb_NO.php2
-rw-r--r--apps/files_external/l10n/nl.php2
-rw-r--r--apps/files_external/l10n/pl.php2
-rw-r--r--apps/files_external/l10n/pt_BR.php2
-rw-r--r--apps/files_external/l10n/pt_PT.php2
-rw-r--r--apps/files_external/l10n/ro.php2
-rw-r--r--apps/files_external/l10n/ru.php2
-rw-r--r--apps/files_external/l10n/si_LK.php2
-rw-r--r--apps/files_external/l10n/sk_SK.php3
-rw-r--r--apps/files_external/l10n/sl.php2
-rw-r--r--apps/files_external/l10n/sv.php2
-rw-r--r--apps/files_external/l10n/ta_LK.php2
-rw-r--r--apps/files_external/l10n/th_TH.php2
-rw-r--r--apps/files_external/l10n/tr.php2
-rw-r--r--apps/files_external/l10n/uk.php2
-rw-r--r--apps/files_external/l10n/vi.php2
-rw-r--r--apps/files_external/l10n/zh_CN.php2
-rw-r--r--apps/files_external/l10n/zh_TW.php2
-rw-r--r--apps/files_external/templates/settings.php271
-rw-r--r--apps/files_sharing/appinfo/update.php17
-rw-r--r--apps/files_sharing/appinfo/version2
-rw-r--r--apps/files_sharing/l10n/et_EE.php1
-rw-r--r--apps/files_sharing/l10n/sk_SK.php1
-rw-r--r--apps/files_sharing/lib/cache.php58
-rw-r--r--apps/files_sharing/lib/updater.php15
-rw-r--r--apps/files_sharing/tests/cache.php39
-rw-r--r--apps/files_sharing/tests/updater.php91
-rw-r--r--apps/user_ldap/l10n/el.php4
-rw-r--r--apps/user_ldap/l10n/et_EE.php5
-rw-r--r--apps/user_ldap/templates/settings.php2
-rwxr-xr-xapps/user_webdavauth/templates/settings.php14
78 files changed, 590 insertions, 512 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 73601d26217..4d765b69e41 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -40,7 +40,7 @@ $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : '';
$dir = \OC\Files\Filesystem::normalizePath($dir);
$dirInfo = \OC\Files\Filesystem::getFileInfo($dir);
// Redirect if directory does not exist
-if (!$dirInfo->getType() === 'dir') {
+if (!$dirInfo || !$dirInfo->getType() === 'dir') {
header('Location: ' . OCP\Util::getScriptName() . '');
exit();
}
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index a7d1fa9d8a2..732690f047a 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -180,7 +180,7 @@ var FileActions = {
}
var element = $(html);
element.data('action', actions['Delete']);
- element.on('click', {a: null, elem: parent, actionFunc: actions['Delete']}, actionHandler);
+ element.on('click', {a: null, elem: parent, actionFunc: actions['Delete'].action}, actionHandler);
parent.parent().children().last().append(element);
}
diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php
index 9144cf3ea10..c71aa9a35ab 100644
--- a/apps/files/l10n/el.php
+++ b/apps/files/l10n/el.php
@@ -5,6 +5,7 @@ $TRANSLATIONS = array(
"File name cannot be empty." => "Το όνομα αρχείου δεν μπορεί να είναι κενό.",
"\"%s\" is an invalid file name." => "Το \"%s\" είναι ένα μη έγκυρο όνομα αρχείου.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Μη έγκυρο όνομα, '\\', '/', '<', '>', ':', '\"', '|', '?' και '*' δεν επιτρέπονται.",
+"The target folder has been moved or deleted." => "Ο φάκελος προορισμού έχει μετακινηθεί ή διαγραφεί.",
"The name %s is already used in the folder %s. Please choose a different name." => "Το όνομα %s χρησιμοποιείτε ήδη στον φάκελο %s. Παρακαλώ επιλέξτε ένα άλλο όνομα.",
"Not a valid source" => "Μη έγκυρη πηγή",
"Server is not allowed to open URLs, please check the server configuration" => "Ο διακομιστής δεν επιτρέπεται να ανοίγει URL, παρακαλώ ελέγξτε τις ρυθμίσεις του διακομιστή",
@@ -28,6 +29,8 @@ $TRANSLATIONS = array(
"Invalid directory." => "Μη έγκυρος φάκελος.",
"Files" => "Αρχεία",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "Αδυναμία φόρτωσης {filename} καθώς είναι κατάλογος αρχείων ή έχει 0 bytes",
+"Total file size {size1} exceeds upload limit {size2}" => "Το συνολικό μέγεθος αρχείου {size1} υπερβαίνει το όριο μεταφόρτωσης {size2}",
+"Not enough free space, you are uploading {size1} but only {size2} is left" => "Δεν υπάρχει αρκετός ελεύθερος χώρος, μεταφορτώνετε μέγεθος {size1} αλλά υπάρχει χώρος μόνο {size2}",
"Upload cancelled." => "Η αποστολή ακυρώθηκε.",
"Could not get result from server." => "Αδυναμία λήψης αποτελέσματος από το διακομιστή.",
"File upload is in progress. Leaving the page now will cancel the upload." => "Η αποστολή του αρχείου βρίσκεται σε εξέλιξη. Το κλείσιμο της σελίδας θα ακυρώσει την αποστολή.",
diff --git a/apps/files/l10n/et_EE.php b/apps/files/l10n/et_EE.php
index f1fdc82673c..74818f99f11 100644
--- a/apps/files/l10n/et_EE.php
+++ b/apps/files/l10n/et_EE.php
@@ -3,7 +3,9 @@ $TRANSLATIONS = array(
"Could not move %s - File with this name already exists" => "Ei saa liigutada faili %s - samanimeline fail on juba olemas",
"Could not move %s" => "%s liigutamine ebaõnnestus",
"File name cannot be empty." => "Faili nimi ei saa olla tühi.",
+"\"%s\" is an invalid file name." => "\"%s\" on vigane failinimi.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Vigane nimi, '\\', '/', '<', '>', ':', '\"', '|', '?' ja '*' pole lubatud.",
+"The target folder has been moved or deleted." => "Sihtkataloog on ümber tõstetud või kustutatud.",
"The name %s is already used in the folder %s. Please choose a different name." => "Nimi %s on juba kasutusel kataloogis %s. Palun vali mõni teine nimi.",
"Not a valid source" => "Pole korrektne lähteallikas",
"Server is not allowed to open URLs, please check the server configuration" => "Server ei võimalda URL-ide avamist, palun kontrolli serveri seadistust",
@@ -27,6 +29,8 @@ $TRANSLATIONS = array(
"Invalid directory." => "Vigane kaust.",
"Files" => "Failid",
"Unable to upload {filename} as it is a directory or has 0 bytes" => "Ei saa üles laadida {filename}, kuna see on kataloog või selle suurus on 0 baiti",
+"Total file size {size1} exceeds upload limit {size2}" => "Faili suurus {size1} ületab faili üleslaadimise mahu piirangu {size2}.",
+"Not enough free space, you are uploading {size1} but only {size2} is left" => "Pole piisavalt vaba ruumi. Sa laadid üles {size1}, kuid ainult {size2} on saadaval.",
"Upload cancelled." => "Üleslaadimine tühistati.",
"Could not get result from server." => "Serverist ei saadud tulemusi",
"File upload is in progress. Leaving the page now will cancel the upload." => "Faili üleslaadimine on töös. Lehelt lahkumine katkestab selle üleslaadimise.",
@@ -48,6 +52,7 @@ $TRANSLATIONS = array(
"_%n file_::_%n files_" => array("%n fail","%n faili"),
"{dirs} and {files}" => "{dirs} ja {files}",
"_Uploading %n file_::_Uploading %n files_" => array("Laadin üles %n faili","Laadin üles %n faili"),
+"\"{name}\" is an invalid file name." => "\"{name}\" on vigane failinimi.",
"Your storage is full, files can not be updated or synced anymore!" => "Sinu andmemaht on täis! Faile ei uuendata ega sünkroniseerita!",
"Your storage is almost full ({usedSpacePercent}%)" => "Su andmemaht on peaaegu täis ({usedSpacePercent}%)",
"Encryption App is enabled but your keys are not initialized, please log-out and log-in again" => "Krüpteerimisrakend on lubatud, kuid võtmeid pole lähtestatud. Palun logi välja ning uuesti sisse.",
diff --git a/apps/files/l10n/pl_PL.php b/apps/files/l10n/pl_PL.php
deleted file mode 100644
index b67f67b972e..00000000000
--- a/apps/files/l10n/pl_PL.php
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-$TRANSLATIONS = array(
-"Save" => "Zapisz"
-);
-$PLURAL_FORMS = "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);";
diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php
index 7686025e35c..3f192df5b43 100644
--- a/apps/files/l10n/ro.php
+++ b/apps/files/l10n/ro.php
@@ -4,7 +4,9 @@ $TRANSLATIONS = array(
"Could not move %s" => "Nu se poate muta %s",
"File name cannot be empty." => "Numele fișierului nu poate rămâne gol.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nume nevalide, '\\', '/', '<', '>', ':', '\"', '|', '?' și '*' nu sunt permise.",
+"Error while downloading %s to %s" => "Eroare la descarcarea %s in %s",
"Error when creating the file" => "Eroare la crearea fisierului",
+"Folder name cannot be empty." => "Numele folderului nu poate fi liber.",
"Error when creating the folder" => "Eroare la crearea folderului",
"Unable to set upload directory." => "Imposibil de a seta directorul pentru incărcare.",
"Invalid Token" => "Jeton Invalid",
diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php
index a5afd55fbc3..5f7d3261d6c 100644
--- a/apps/files/templates/admin.php
+++ b/apps/files/templates/admin.php
@@ -1,28 +1,26 @@
<?php OCP\Util::addscript('files', 'admin'); ?>
-<form name="filesForm" action='#' method='post'>
- <fieldset class="personalblock">
- <h2><?php p($l->t('File handling')); ?></h2>
- <?php if($_['uploadChangable']):?>
- <label for="maxUploadSize"><?php p($l->t( 'Maximum upload size' )); ?> </label>
- <input type="text" name='maxUploadSize' id="maxUploadSize" value='<?php p($_['uploadMaxFilesize']) ?>'/>
- <?php if($_['displayMaxPossibleUploadSize']):?>
- (<?php p($l->t('max. possible: ')); p($_['maxPossibleUploadSize']) ?>)
- <?php endif;?>
- <br/>
+<form name="filesForm" class="section" action="#" method="post">
+ <h2><?php p($l->t('File handling')); ?></h2>
+ <?php if($_['uploadChangable']):?>
+ <label for="maxUploadSize"><?php p($l->t( 'Maximum upload size' )); ?> </label>
+ <input type="text" name='maxUploadSize' id="maxUploadSize" value='<?php p($_['uploadMaxFilesize']) ?>'/>
+ <?php if($_['displayMaxPossibleUploadSize']):?>
+ (<?php p($l->t('max. possible: ')); p($_['maxPossibleUploadSize']) ?>)
<?php endif;?>
- <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1"
- title="<?php p($l->t( 'Needed for multi-file and folder downloads.' )); ?>"
- <?php if ($_['allowZipDownload']): ?> checked="checked"<?php endif; ?> />
- <label for="allowZipDownload"><?php p($l->t( 'Enable ZIP-download' )); ?></label><br/>
+ <br/>
+ <?php endif;?>
+ <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1"
+ title="<?php p($l->t( 'Needed for multi-file and folder downloads.' )); ?>"
+ <?php if ($_['allowZipDownload']): ?> checked="checked"<?php endif; ?> />
+ <label for="allowZipDownload"><?php p($l->t( 'Enable ZIP-download' )); ?></label><br/>
- <input type="text" name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php p($_['maxZipInputSize']) ?>'
- title="<?php p($l->t( '0 is unlimited' )); ?>"
- <?php if (!$_['allowZipDownload']): ?> disabled="disabled"<?php endif; ?> /><br />
- <em><?php p($l->t( 'Maximum input size for ZIP files' )); ?> </em><br />
+ <input type="text" name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php p($_['maxZipInputSize']) ?>'
+ title="<?php p($l->t( '0 is unlimited' )); ?>"
+ <?php if (!$_['allowZipDownload']): ?> disabled="disabled"<?php endif; ?> /><br />
+ <em><?php p($l->t( 'Maximum input size for ZIP files' )); ?> </em><br />
- <input type="hidden" value="<?php p($_['requesttoken']); ?>" name="requesttoken" />
- <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings"
- value="<?php p($l->t( 'Save' )); ?>"/>
- </fieldset>
+ <input type="hidden" value="<?php p($_['requesttoken']); ?>" name="requesttoken" />
+ <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings"
+ value="<?php p($l->t( 'Save' )); ?>"/>
</form>
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js
index ef7ddcb874a..80c04b5b242 100644
--- a/apps/files/tests/js/fileactionsSpec.js
+++ b/apps/files/tests/js/fileactionsSpec.js
@@ -38,15 +38,17 @@ describe('FileActions tests', function() {
var $tr = FileList.addFile('testName.txt', 1234, new Date(), false, false, {download_url: 'test/download/url'});
// no actions before call
- expect($tr.find('.action[data-action=Download]').length).toEqual(0);
- expect($tr.find('.action[data-action=Rename]').length).toEqual(0);
+ expect($tr.find('.action.action-download').length).toEqual(0);
+ expect($tr.find('.action.action-rename').length).toEqual(0);
expect($tr.find('.action.delete').length).toEqual(0);
FileActions.display($tr.find('td.filename'), true);
// actions defined after cal
- expect($tr.find('.action[data-action=Download]').length).toEqual(1);
- expect($tr.find('.nametext .action[data-action=Rename]').length).toEqual(1);
+ expect($tr.find('.action.action-download').length).toEqual(1);
+ expect($tr.find('.action.action-download').attr('data-action')).toEqual('Download');
+ expect($tr.find('.nametext .action.action-rename').length).toEqual(1);
+ expect($tr.find('.nametext .action.action-rename').attr('data-action')).toEqual('Rename');
expect($tr.find('.action.delete').length).toEqual(1);
});
it('calling display() twice correctly replaces file actions', function() {
@@ -56,8 +58,8 @@ describe('FileActions tests', function() {
FileActions.display($tr.find('td.filename'), true);
// actions defined after cal
- expect($tr.find('.action[data-action=Download]').length).toEqual(1);
- expect($tr.find('.nametext .action[data-action=Rename]').length).toEqual(1);
+ expect($tr.find('.action.action-download').length).toEqual(1);
+ expect($tr.find('.nametext .action.action-rename').length).toEqual(1);
expect($tr.find('.action.delete').length).toEqual(1);
});
it('redirects to download URL when clicking download', function() {
@@ -66,10 +68,20 @@ describe('FileActions tests', function() {
var $tr = FileList.addFile('test download File.txt', 1234, new Date(), false, false, {download_url: 'test/download/url'});
FileActions.display($tr.find('td.filename'), true);
- $tr.find('.action[data-action=Download]').click();
+ $tr.find('.action-download').click();
expect(redirectStub.calledOnce).toEqual(true);
expect(redirectStub.getCall(0).args[0]).toEqual(OC.webroot + '/index.php/apps/files/ajax/download.php?dir=%2Fsubdir&files=test%20download%20File.txt');
redirectStub.restore();
});
+ it('deletes file when clicking delete', function() {
+ var deleteStub = sinon.stub(FileList, 'do_delete');
+ var $tr = FileList.addFile('test delete File.txt', 1234, new Date());
+ FileActions.display($tr.find('td.filename'), true);
+
+ $tr.find('.action.delete').click();
+
+ expect(deleteStub.calledOnce).toEqual(true);
+ deleteStub.restore();
+ });
});
diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php
index ad8617bc6d2..972d7d7138c 100644
--- a/apps/files_encryption/l10n/el.php
+++ b/apps/files_encryption/l10n/el.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Παρακαλώ επιβεβαιώστε ότι η PHP 5.3.3 ή νεότερη είναι εγκατεστημένη και ότι το OpenSSL μαζί με το PHP extension είναι ενεργοποιήμένο και έχει ρυθμιστεί σωστά. Προς το παρόν, η εφαρμογή κρυπτογράφησης είναι απενεργοποιημένη.",
"Following users are not set up for encryption:" => "Οι κάτωθι χρήστες δεν έχουν ρυθμιστεί για κρυπογράφηση:",
"Initial encryption started... This can take some time. Please wait." => "Η αρχική κρυπτογράφηση άρχισε... Αυτό μπορεί να πάρει κάποια ώρα. Παρακαλώ περιμένετε.",
+"Initial encryption running... Please try again later." => "Εκτέλεση αρχικής κρυπτογράφησης... Παρακαλώ προσπαθήστε αργότερα.",
"Go directly to your " => "Πηγαίνε απευθείας στο ",
"personal settings" => "προσωπικές ρυθμίσεις",
"Encryption" => "Κρυπτογράφηση",
diff --git a/apps/files_encryption/l10n/et_EE.php b/apps/files_encryption/l10n/et_EE.php
index dcf035289fa..f82f9df9279 100644
--- a/apps/files_encryption/l10n/et_EE.php
+++ b/apps/files_encryption/l10n/et_EE.php
@@ -16,6 +16,7 @@ $TRANSLATIONS = array(
"Please make sure that PHP 5.3.3 or newer is installed and that OpenSSL together with the PHP extension is enabled and configured properly. For now, the encryption app has been disabled." => "Palun veendu, et on paigaldatud PHP 5.3.3 või uuem ning PHP OpenSSL laiendus on lubatud ning seadistatud korrektselt. Hetkel krüpteerimise rakendus on peatatud.",
"Following users are not set up for encryption:" => "Järgmised kasutajad pole seadistatud krüpteeringuks:",
"Initial encryption started... This can take some time. Please wait." => "Algne krüpteerimine käivitati... See võib võtta natuke aega. Palun oota.",
+"Initial encryption running... Please try again later." => "Toimub esmane krüpteerimine... Palun proovi hiljem uuesti.",
"Go directly to your " => "Liigu otse oma",
"personal settings" => "isiklikes seadetes",
"Encryption" => "Krüpteerimine",
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 6549273c8f1..8fd51178285 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -3,9 +3,10 @@
/**
* ownCloud
*
- * @author Sam Tuke, Robin Appelman
- * @copyright 2012 Sam Tuke samtuke@owncloud.com, Robin Appelman
- * icewind1991@gmail.com
+ * @author Bjoern Schiessle, Sam Tuke, Robin Appelman
+ * @copyright 2012 Sam Tuke <samtuke@owncloud.com>
+ * 2012 Robin Appelman <icewind1991@gmail.com>
+ * 2014 Bjoern Schiessle <schiessle@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
@@ -36,37 +37,40 @@ namespace OCA\Encryption;
*/
class Proxy extends \OC_FileProxy {
- private static $blackList = null; //mimetypes blacklisted from encryption
private static $unencryptedSizes = array(); // remember unencrypted size
private static $fopenMode = array(); // remember the fopen mode
+ private static $enableEncryption = false; // Enable encryption for the given path
/**
* Check if a file requires encryption
* @param string $path
+ * @param string $mode type of access
* @return bool
*
- * Tests if server side encryption is enabled, and file is allowed by blacklists
+ * Tests if server side encryption is enabled, and if we should call the
+ * crypt stream wrapper for the given file
*/
- private static function shouldEncrypt($path) {
+ private static function shouldEncrypt($path, $mode = 'w') {
$userId = Helper::getUser($path);
- if (\OCP\App::isEnabled('files_encryption') === false || Crypt::mode() !== 'server' ||
- strpos($path, '/' . $userId . '/files') !== 0) {
+ // don't call the crypt stream wrapper, if...
+ if (
+ \OCP\App::isEnabled('files_encryption') === false // encryption is disabled
+ || Crypt::mode() !== 'server' // we are not in server-side-encryption mode
+ || strpos($path, '/' . $userId . '/files') !== 0 // path is not in files/
+ || substr($path, 0, 8) === 'crypt://' // we are already in crypt mode
+ ) {
return false;
}
- if (is_null(self::$blackList)) {
- self::$blackList = explode(',', \OCP\Config::getAppValue('files_encryption', 'type_blacklist', ''));
- }
-
- if (Crypt::isCatfileContent($path)) {
- return true;
- }
-
- $extension = substr($path, strrpos($path, '.') + 1);
+ $view = new \OC_FilesystemView('');
+ $util = new Util($view, $userId);
- if (array_search($extension, self::$blackList) === false) {
+ // for write operation we always encrypt the files, for read operations
+ // we check if the existing file is encrypted or not decide if it needs to
+ // decrypt it.
+ if (($mode !== 'r' && $mode !== 'rb') || $util->isEncryptedPath($path)) {
return true;
}
@@ -222,7 +226,10 @@ class Proxy extends \OC_FileProxy {
* @param string $mode type of access
*/
public function preFopen($path, $mode) {
+
self::$fopenMode[$path] = $mode;
+ self::$enableEncryption = self::shouldEncrypt($path, $mode);
+
}
@@ -235,26 +242,14 @@ class Proxy extends \OC_FileProxy {
$path = \OC\Files\Filesystem::normalizePath($path);
- if (!$result) {
+ if (!$result || self::$enableEncryption === false) {
return $result;
}
- // split the path parts
- $pathParts = explode('/', $path);
-
- // don't try to encrypt/decrypt cache chunks or files in the trash bin
- if (isset($pathParts[2]) && ($pathParts[2] === 'cache' || $pathParts[2] === 'files_trashbin')) {
- return $result;
- }
-
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
// if we remember the mode from the pre proxy we re-use it
- // oterwise we fall back to stream_get_meta_data()
+ // otherwise we fall back to stream_get_meta_data()
if (isset(self::$fopenMode[$path])) {
$mode = self::$fopenMode[$path];
unset(self::$fopenMode[$path]);
@@ -263,35 +258,12 @@ class Proxy extends \OC_FileProxy {
$mode = $meta['mode'];
}
- $view = new \OC_FilesystemView('');
-
- $userId = Helper::getUser($path);
- $util = new Util($view, $userId);
+ // Close the original encrypted file
+ fclose($result);
- // If file is already encrypted, decrypt using crypto protocol
- if (
- Crypt::mode() === 'server'
- && $util->isEncryptedPath($path)
- ) {
-
- // Close the original encrypted file
- fclose($result);
-
- // Open the file using the crypto stream wrapper
- // protocol and let it do the decryption work instead
- $result = fopen('crypt://' . $path, $mode);
-
- } elseif (
- self::shouldEncrypt($path)
- and $mode !== 'r'
- and $mode !== 'rb'
-
- ) {
- $result = fopen('crypt://' . $path, $mode);
- }
-
- // Re-enable the proxy
- \OC_FileProxy::$enabled = $proxyStatus;
+ // Open the file using the crypto stream wrapper
+ // protocol and let it do the decryption work instead
+ $result = fopen('crypt://' . $path, $mode);
return $result;
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index 66871945882..df5de558867 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -568,21 +568,25 @@ class Stream {
// part file.
$path = Helper::stripPartialFileExtension($this->rawPath);
- // get file info
- $fileInfo = $this->rootView->getFileInfo($path);
- if ($fileInfo) {
- // set encryption data
- $fileInfo['encrypted'] = true;
- $fileInfo['size'] = $this->size;
- $fileInfo['unencrypted_size'] = $this->unencryptedSize;
-
- // set fileinfo
- $this->rootView->putFileInfo($path, $fileInfo);
- }
+ $fileInfo = array(
+ 'encrypted' => true,
+ 'size' => $this->size,
+ 'unencrypted_size' => $this->unencryptedSize,
+ );
+
+ // set fileinfo
+ $this->rootView->putFileInfo($path, $fileInfo);
}
- return fclose($this->handle);
+ $result = fclose($this->handle);
+
+ if ($result === false) {
+ \OCP\Util::writeLog('Encryption library', 'Could not close stream, file could be corrupted', \OCP\Util::FATAL);
+ }
+
+ return $result;
+
}
}
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 4bf987d9255..b86815021a8 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -432,25 +432,28 @@ class Util {
$proxyStatus = \OC_FileProxy::$enabled;
\OC_FileProxy::$enabled = false;
- // we only need 24 byte from the last chunk
$data = '';
- $handle = $this->view->fopen($path, 'r');
- if (is_resource($handle)) {
- // suppress fseek warining, we handle the case that fseek doesn't
- // work in the else branch
- if (@fseek($handle, -24, SEEK_END) === 0) {
- $data = fgets($handle);
- } else {
- // if fseek failed on the storage we create a local copy from the file
- // and read this one
- fclose($handle);
- $localFile = $this->view->getLocalFile($path);
- $handle = fopen($localFile, 'r');
- if (is_resource($handle) && fseek($handle, -24, SEEK_END) === 0) {
+
+ // we only need 24 byte from the last chunk
+ if ($this->view->file_exists($path)) {
+ $handle = $this->view->fopen($path, 'r');
+ if (is_resource($handle)) {
+ // suppress fseek warining, we handle the case that fseek doesn't
+ // work in the else branch
+ if (@fseek($handle, -24, SEEK_END) === 0) {
$data = fgets($handle);
+ } else {
+ // if fseek failed on the storage we create a local copy from the file
+ // and read this one
+ fclose($handle);
+ $localFile = $this->view->getLocalFile($path);
+ $handle = fopen($localFile, 'r');
+ if (is_resource($handle) && fseek($handle, -24, SEEK_END) === 0) {
+ $data = fgets($handle);
+ }
}
+ fclose($handle);
}
- fclose($handle);
}
// re-enable proxy
diff --git a/apps/files_encryption/templates/settings-admin.php b/apps/files_encryption/templates/settings-admin.php
index 231a68b6a58..cf676c445ce 100644
--- a/apps/files_encryption/templates/settings-admin.php
+++ b/apps/files_encryption/templates/settings-admin.php
@@ -1,63 +1,60 @@
-<form id="encryption">
- <fieldset class="personalblock">
+<form id="encryption" class="section">
+ <h2><?php p($l->t('Encryption')); ?></h2>
- <h2><?php p($l->t('Encryption')); ?></h2>
+ <p>
+ <?php p($l->t("Enable recovery key (allow to recover users files in case of password loss):")); ?>
+ <br/>
+ <br/>
+ <input type="password" name="encryptionRecoveryPassword" id="encryptionRecoveryPassword"/>
+ <label for="recoveryPassword"><?php p($l->t("Recovery key password")); ?></label>
+ <br/>
+ <input type="password" name="encryptionRecoveryPassword" id="repeatEncryptionRecoveryPassword"/>
+ <label for="repeatEncryptionRecoveryPassword"><?php p($l->t("Repeat Recovery key password")); ?></label>
+ <br/>
+ <input
+ type='radio'
+ name='adminEnableRecovery'
+ value='1'
+ <?php echo($_["recoveryEnabled"] === '1' ? 'checked="checked"' : 'disabled'); ?> />
+ <?php p($l->t("Enabled")); ?>
+ <br/>
- <p>
- <?php p($l->t("Enable recovery key (allow to recover users files in case of password loss):")); ?>
- <br/>
- <br/>
- <input type="password" name="encryptionRecoveryPassword" id="encryptionRecoveryPassword"/>
- <label for="recoveryPassword"><?php p($l->t("Recovery key password")); ?></label>
- <br/>
- <input type="password" name="encryptionRecoveryPassword" id="repeatEncryptionRecoveryPassword"/>
- <label for="repeatEncryptionRecoveryPassword"><?php p($l->t("Repeat Recovery key password")); ?></label>
- <br/>
- <input
- type='radio'
- name='adminEnableRecovery'
- value='1'
- <?php echo($_["recoveryEnabled"] === '1' ? 'checked="checked"' : 'disabled'); ?> />
- <?php p($l->t("Enabled")); ?>
- <br/>
+ <input
+ type='radio'
+ name='adminEnableRecovery'
+ value='0'
+ <?php echo($_["recoveryEnabled"] === '0' ? 'checked="checked"' : 'disabled'); ?> />
+ <?php p($l->t("Disabled")); ?>
+ </p>
+ <br/><br/>
- <input
- type='radio'
- name='adminEnableRecovery'
- value='0'
- <?php echo($_["recoveryEnabled"] === '0' ? 'checked="checked"' : 'disabled'); ?> />
- <?php p($l->t("Disabled")); ?>
- </p>
+ <p name="changeRecoveryPasswordBlock" <?php if ($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
+ <strong><?php p($l->t("Change recovery key password:")); ?></strong>
<br/><br/>
-
- <p name="changeRecoveryPasswordBlock" <?php if ($_['recoveryEnabled'] === '0') print_unescaped('class="hidden"');?>>
- <strong><?php p($l->t("Change recovery key password:")); ?></strong>
- <br/><br/>
- <input
- type="password"
- name="changeRecoveryPassword"
- id="oldEncryptionRecoveryPassword"
- <label for="oldEncryptionRecoveryPassword"><?php p($l->t("Old Recovery key password")); ?></label>
- <br/>
- <br/>
- <input
- type="password"
- name="changeRecoveryPassword"
- id="newEncryptionRecoveryPassword"
- <label for="newEncryptionRecoveryPassword"><?php p($l->t("New Recovery key password")); ?></label>
- <br/>
- <input
- type="password"
- name="changeRecoveryPassword"
- id="repeatedNewEncryptionRecoveryPassword"
- <label for="repeatEncryptionRecoveryPassword"><?php p($l->t("Repeat New Recovery key password")); ?></label>
- <br/>
- <button
- type="button"
- name="submitChangeRecoveryKey"
- disabled><?php p($l->t("Change Password")); ?>
- </button>
- <span class="msg"></span>
- </p>
- </fieldset>
+ <input
+ type="password"
+ name="changeRecoveryPassword"
+ id="oldEncryptionRecoveryPassword"
+ <label for="oldEncryptionRecoveryPassword"><?php p($l->t("Old Recovery key password")); ?></label>
+ <br/>
+ <br/>
+ <input
+ type="password"
+ name="changeRecoveryPassword"
+ id="newEncryptionRecoveryPassword"
+ <label for="newEncryptionRecoveryPassword"><?php p($l->t("New Recovery key password")); ?></label>
+ <br/>
+ <input
+ type="password"
+ name="changeRecoveryPassword"
+ id="repeatedNewEncryptionRecoveryPassword"
+ <label for="repeatEncryptionRecoveryPassword"><?php p($l->t("Repeat New Recovery key password")); ?></label>
+ <br/>
+ <button
+ type="button"
+ name="submitChangeRecoveryKey"
+ disabled><?php p($l->t("Change Password")); ?>
+ </button>
+ <span class="msg"></span>
+ </p>
</form>
diff --git a/apps/files_encryption/templates/settings-personal.php b/apps/files_encryption/templates/settings-personal.php
index 1b4239d82cd..8139ece1950 100644
--- a/apps/files_encryption/templates/settings-personal.php
+++ b/apps/files_encryption/templates/settings-personal.php
@@ -1,66 +1,63 @@
-<form id="encryption">
- <fieldset class="personalblock">
- <h2><?php p( $l->t( 'Encryption' ) ); ?></h2>
+<form id="encryption" class="section">
+ <h2><?php p( $l->t( 'Encryption' ) ); ?></h2>
- <?php if ( $_["initialized"] === '1' ): ?>
- <p>
- <a name="changePKPasswd" />
- <label for="changePrivateKeyPasswd">
- <?php p( $l->t( "Your private key password no longer match your log-in password:" ) ); ?>
- </label>
- <br />
- <em><?php p( $l->t( "Set your old private key password to your current log-in password." ) ); ?>
- <?php if ( $_["recoveryEnabledForUser"] ):
- p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
- endif; ?>
- </em>
- <br />
- <input
- type="password"
- name="changePrivateKeyPassword"
- id="oldPrivateKeyPassword" />
- <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
- <br />
- <input
- type="password"
- name="changePrivateKeyPassword"
- id="newPrivateKeyPassword" />
- <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
- <br />
- <button
- type="button"
- name="submitChangePrivateKeyPassword"
- disabled><?php p($l->t( "Update Private Key Password" )); ?>
- </button>
- <span class="msg"></span>
- </p>
- <?php endif; ?>
-
- <?php if ( $_["recoveryEnabled"] && $_["privateKeySet"] ): ?>
+ <?php if ( $_["initialized"] === '1' ): ?>
+ <p>
+ <a name="changePKPasswd" />
+ <label for="changePrivateKeyPasswd">
+ <?php p( $l->t( "Your private key password no longer match your log-in password:" ) ); ?>
+ </label>
+ <br />
+ <em><?php p( $l->t( "Set your old private key password to your current log-in password." ) ); ?>
+ <?php if ( $_["recoveryEnabledForUser"] ):
+ p( $l->t( " If you don't remember your old password you can ask your administrator to recover your files." ) );
+ endif; ?>
+ </em>
+ <br />
+ <input
+ type="password"
+ name="changePrivateKeyPassword"
+ id="oldPrivateKeyPassword" />
+ <label for="oldPrivateKeyPassword"><?php p($l->t( "Old log-in password" )); ?></label>
+ <br />
+ <input
+ type="password"
+ name="changePrivateKeyPassword"
+ id="newPrivateKeyPassword" />
+ <label for="newRecoveryPassword"><?php p($l->t( "Current log-in password" )); ?></label>
<br />
- <p>
- <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
- <br />
- <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
- <br />
- <input
- type='radio'
- name='userEnableRecovery'
- value='1'
- <?php echo ( $_["recoveryEnabledForUser"] == 1 ? 'checked="checked"' : '' ); ?> />
- <?php p( $l->t( "Enabled" ) ); ?>
- <br />
+ <button
+ type="button"
+ name="submitChangePrivateKeyPassword"
+ disabled><?php p($l->t( "Update Private Key Password" )); ?>
+ </button>
+ <span class="msg"></span>
+ </p>
+ <?php endif; ?>
- <input
- type='radio'
- name='userEnableRecovery'
- value='0'
- <?php echo ( $_["recoveryEnabledForUser"] == 0 ? 'checked="checked"' : '' ); ?> />
- <?php p( $l->t( "Disabled" ) ); ?>
- <div id="recoveryEnabledSuccess"><?php p( $l->t( 'File recovery settings updated' ) ); ?></div>
- <div id="recoveryEnabledError"><?php p( $l->t( 'Could not update file recovery' ) ); ?></div>
- </p>
- <?php endif; ?>
+ <?php if ( $_["recoveryEnabled"] && $_["privateKeySet"] ): ?>
+ <br />
+ <p>
+ <label for="userEnableRecovery"><?php p( $l->t( "Enable password recovery:" ) ); ?></label>
+ <br />
+ <em><?php p( $l->t( "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" ) ); ?></em>
+ <br />
+ <input
+ type='radio'
+ name='userEnableRecovery'
+ value='1'
+ <?php echo ( $_["recoveryEnabledForUser"] == 1 ? 'checked="checked"' : '' ); ?> />
+ <?php p( $l->t( "Enabled" ) ); ?>
+ <br />
- </fieldset>
+ <input
+ type='radio'
+ name='userEnableRecovery'
+ value='0'
+ <?php echo ( $_["recoveryEnabledForUser"] == 0 ? 'checked="checked"' : '' ); ?> />
+ <?php p( $l->t( "Disabled" ) ); ?>
+ <div id="recoveryEnabledSuccess"><?php p( $l->t( 'File recovery settings updated' ) ); ?></div>
+ <div id="recoveryEnabledError"><?php p( $l->t( 'Could not update file recovery' ) ); ?></div>
+ </p>
+ <?php endif; ?>
</form>
diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php
index be56968ac09..1f57d7cb635 100755
--- a/apps/files_encryption/tests/share.php
+++ b/apps/files_encryption/tests/share.php
@@ -100,11 +100,11 @@ class Test_Encryption_Share extends \PHPUnit_Framework_TestCase {
$this->filename = 'share-tmp.test';
- // we don't want to tests with app files_trashbin enabled
- \OC_App::disable('files_trashbin');
-
// remember files_trashbin state
$this->stateFilesTrashbin = OC_App::isEnabled('files_trashbin');
+
+ // we don't want to tests with app files_trashbin enabled
+ \OC_App::disable('files_trashbin');
}
function tearDown() {
diff --git a/apps/files_external/l10n/bg_BG.php b/apps/files_external/l10n/bg_BG.php
index d59a4b8c80b..118da27f74a 100644
--- a/apps/files_external/l10n/bg_BG.php
+++ b/apps/files_external/l10n/bg_BG.php
@@ -6,8 +6,6 @@ $TRANSLATIONS = array(
"Folder name" => "Име на папката",
"Configuration" => "Конфигурация",
"Options" => "Опции",
-"Applicable" => "Приложимо",
-"None set" => "Няма избрано",
"All Users" => "Всички потребители",
"Groups" => "Групи",
"Users" => "Потребители",
diff --git a/apps/files_external/l10n/bn_BD.php b/apps/files_external/l10n/bn_BD.php
index 065d61acfca..6c8f5777958 100644
--- a/apps/files_external/l10n/bn_BD.php
+++ b/apps/files_external/l10n/bn_BD.php
@@ -8,8 +8,6 @@ $TRANSLATIONS = array(
"External Storage" => "বাহ্যিক সংরক্ষণাগার",
"Configuration" => "কনফিগারেসন",
"Options" => "বিকল্পসমূহ",
-"Applicable" => "প্রযোজ্য",
-"None set" => "কোনটিই নির্ধারণ করা হয় নি",
"All Users" => "সমস্ত ব্যবহারকারী",
"Groups" => "গোষ্ঠীসমূহ",
"Users" => "ব্যবহারকারী",
diff --git a/apps/files_external/l10n/ca.php b/apps/files_external/l10n/ca.php
index 3e722046296..94033f0c599 100644
--- a/apps/files_external/l10n/ca.php
+++ b/apps/files_external/l10n/ca.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Emmagatzemament extern",
"Configuration" => "Configuració",
"Options" => "Options",
-"Applicable" => "Aplicable",
"Add storage" => "Afegeix emmagatzemament",
-"None set" => "Cap d'establert",
"All Users" => "Tots els usuaris",
"Groups" => "Grups",
"Users" => "Usuaris",
diff --git a/apps/files_external/l10n/cs_CZ.php b/apps/files_external/l10n/cs_CZ.php
index 1b92e35c456..279030ef1a6 100644
--- a/apps/files_external/l10n/cs_CZ.php
+++ b/apps/files_external/l10n/cs_CZ.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Externí úložiště",
"Configuration" => "Nastavení",
"Options" => "Možnosti",
-"Applicable" => "Přístupný pro",
"Add storage" => "Přidat úložiště",
-"None set" => "Nenastaveno",
"All Users" => "Všichni uživatelé",
"Groups" => "Skupiny",
"Users" => "Uživatelé",
diff --git a/apps/files_external/l10n/da.php b/apps/files_external/l10n/da.php
index f3ac35e42e0..0d2b5f35d0d 100644
--- a/apps/files_external/l10n/da.php
+++ b/apps/files_external/l10n/da.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Eksternt lager",
"Configuration" => "Opsætning",
"Options" => "Valgmuligheder",
-"Applicable" => "Kan anvendes",
"Add storage" => "Tilføj lager",
-"None set" => "Ingen sat",
"All Users" => "Alle brugere",
"Groups" => "Grupper",
"Users" => "Brugere",
diff --git a/apps/files_external/l10n/de.php b/apps/files_external/l10n/de.php
index a78728b4c20..9a885c69e47 100644
--- a/apps/files_external/l10n/de.php
+++ b/apps/files_external/l10n/de.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Externer Speicher",
"Configuration" => "Konfiguration",
"Options" => "Optionen",
-"Applicable" => "Zutreffend",
"Add storage" => "Speicher hinzufügen",
-"None set" => "Nicht definiert",
"All Users" => "Alle Benutzer",
"Groups" => "Gruppen",
"Users" => "Benutzer",
diff --git a/apps/files_external/l10n/de_CH.php b/apps/files_external/l10n/de_CH.php
index 8a13c7cdd57..33a5a4894a3 100644
--- a/apps/files_external/l10n/de_CH.php
+++ b/apps/files_external/l10n/de_CH.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Externer Speicher",
"Configuration" => "Konfiguration",
"Options" => "Optionen",
-"Applicable" => "Zutreffend",
"Add storage" => "Speicher hinzufügen",
-"None set" => "Nicht definiert",
"All Users" => "Alle Benutzer",
"Groups" => "Gruppen",
"Users" => "Benutzer",
diff --git a/apps/files_external/l10n/de_DE.php b/apps/files_external/l10n/de_DE.php
index 5ffe946c699..088dfd75b44 100644
--- a/apps/files_external/l10n/de_DE.php
+++ b/apps/files_external/l10n/de_DE.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Externer Speicher",
"Configuration" => "Konfiguration",
"Options" => "Optionen",
-"Applicable" => "Zutreffend",
"Add storage" => "Speicher hinzufügen",
-"None set" => "Nicht definiert",
"All Users" => "Alle Benutzer",
"Groups" => "Gruppen",
"Users" => "Benutzer",
diff --git a/apps/files_external/l10n/el.php b/apps/files_external/l10n/el.php
index 4dcd93d7ac8..43d0a79eac4 100644
--- a/apps/files_external/l10n/el.php
+++ b/apps/files_external/l10n/el.php
@@ -14,14 +14,13 @@ $TRANSLATIONS = array(
"External storage" => "Εξωτερική αποθήκευση",
"Configuration" => "Ρυθμίσεις",
"Options" => "Επιλογές",
-"Applicable" => "Εφαρμόσιμο",
"Add storage" => "Προσθηκη αποθηκευσης",
-"None set" => "Κανένα επιλεγμένο",
"All Users" => "Όλοι οι Χρήστες",
"Groups" => "Ομάδες",
"Users" => "Χρήστες",
"Delete" => "Διαγραφή",
"Enable User External Storage" => "Ενεργοποίηση Εξωτερικού Αποθηκευτικού Χώρου Χρήστη",
+"Allow users to mount the following external storage" => "Χορήγηση άδειας στους χρήστες να συνδέσουν τα παρακάτω εξωτερικά μέσα αποθήκευσης",
"SSL root certificates" => "Πιστοποιητικά SSL root",
"Import Root Certificate" => "Εισαγωγή Πιστοποιητικού Root"
);
diff --git a/apps/files_external/l10n/en_GB.php b/apps/files_external/l10n/en_GB.php
index f7fdbf2f0d1..9901d49bb79 100644
--- a/apps/files_external/l10n/en_GB.php
+++ b/apps/files_external/l10n/en_GB.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "External storage",
"Configuration" => "Configuration",
"Options" => "Options",
-"Applicable" => "Applicable",
"Add storage" => "Add storage",
-"None set" => "None set",
"All Users" => "All Users",
"Groups" => "Groups",
"Users" => "Users",
diff --git a/apps/files_external/l10n/eo.php b/apps/files_external/l10n/eo.php
index aba16e2efa8..5312872c07a 100644
--- a/apps/files_external/l10n/eo.php
+++ b/apps/files_external/l10n/eo.php
@@ -9,8 +9,6 @@ $TRANSLATIONS = array(
"Folder name" => "Dosierujnomo",
"Configuration" => "Agordo",
"Options" => "Malneproj",
-"Applicable" => "Aplikebla",
-"None set" => "Nenio agordita",
"All Users" => "Ĉiuj uzantoj",
"Groups" => "Grupoj",
"Users" => "Uzantoj",
diff --git a/apps/files_external/l10n/es.php b/apps/files_external/l10n/es.php
index ea831c947f4..46d93cbd7f1 100644
--- a/apps/files_external/l10n/es.php
+++ b/apps/files_external/l10n/es.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Almacenamiento externo",
"Configuration" => "Configuración",
"Options" => "Opciones",
-"Applicable" => "Aplicable",
"Add storage" => "Añadir almacenamiento",
-"None set" => "No se ha configurado",
"All Users" => "Todos los usuarios",
"Groups" => "Grupos",
"Users" => "Usuarios",
diff --git a/apps/files_external/l10n/es_AR.php b/apps/files_external/l10n/es_AR.php
index 05204b748c4..3518eba2479 100644
--- a/apps/files_external/l10n/es_AR.php
+++ b/apps/files_external/l10n/es_AR.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Almacenamiento externo",
"Configuration" => "Configuración",
"Options" => "Opciones",
-"Applicable" => "Aplicable",
"Add storage" => "Añadir almacenamiento",
-"None set" => "No fue configurado",
"All Users" => "Todos los usuarios",
"Groups" => "Grupos",
"Users" => "Usuarios",
diff --git a/apps/files_external/l10n/es_MX.php b/apps/files_external/l10n/es_MX.php
index 5d3fd44bec6..4ce3eac986f 100644
--- a/apps/files_external/l10n/es_MX.php
+++ b/apps/files_external/l10n/es_MX.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Almacenamiento externo",
"Configuration" => "Configuración",
"Options" => "Opciones",
-"Applicable" => "Aplicable",
"Add storage" => "Añadir almacenamiento",
-"None set" => "No se ha configurado",
"All Users" => "Todos los usuarios",
"Groups" => "Grupos",
"Users" => "Usuarios",
diff --git a/apps/files_external/l10n/et_EE.php b/apps/files_external/l10n/et_EE.php
index c6450f95e18..d3aa683673e 100644
--- a/apps/files_external/l10n/et_EE.php
+++ b/apps/files_external/l10n/et_EE.php
@@ -5,6 +5,7 @@ $TRANSLATIONS = array(
"Grant access" => "Anna ligipääs",
"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",
+"Saved" => "Salvestatud",
"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Hoiatus:</b> \"smbclient\" pole paigaldatud. Jagatud CIFS/SMB hoidlate ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata SAMBA tugi.",
"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Hoiatus:</b> PHP-s puudub FTP tugi. Jagatud FTP hoidlate ühendamine pole võimalik. Palu oma süsteemihalduril paigaldata FTP tugi.",
"<b>Warning:</b> The Curl support in PHP is not enabled or installed. Mounting of ownCloud / WebDAV or GoogleDrive is not possible. Please ask your system administrator to install it." => "<b>Hoiatus:</b> PHP-s puudub Curl tugi. Jagatud ownCloud / WebDAV või GoogleDrive ühendamine pole võimalik. Palu oma süsteemihalduril see paigaldada.",
@@ -13,14 +14,13 @@ $TRANSLATIONS = array(
"External storage" => "Väline andmehoidla",
"Configuration" => "Seadistamine",
"Options" => "Valikud",
-"Applicable" => "Rakendatav",
"Add storage" => "Lisa andmehoidla",
-"None set" => "Pole määratud",
"All Users" => "Kõik kasutajad",
"Groups" => "Grupid",
"Users" => "Kasutajad",
"Delete" => "Kustuta",
"Enable User External Storage" => "Luba kasutajatele väline salvestamine",
+"Allow users to mount the following external storage" => "Võimalda kasutajatel ühendada järgmist välist andmehoidlat",
"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 bdc5cf56760..caaf96516bc 100644
--- a/apps/files_external/l10n/eu.php
+++ b/apps/files_external/l10n/eu.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Kanpoko biltegiratzea",
"Configuration" => "Konfigurazioa",
"Options" => "Aukerak",
-"Applicable" => "Aplikagarria",
"Add storage" => "Gehitu biltegiratzea",
-"None set" => "Ezarri gabe",
"All Users" => "Erabiltzaile guztiak",
"Groups" => "Taldeak",
"Users" => "Erabiltzaileak",
diff --git a/apps/files_external/l10n/fa.php b/apps/files_external/l10n/fa.php
index 544b8a14d5c..4b74443d40d 100644
--- a/apps/files_external/l10n/fa.php
+++ b/apps/files_external/l10n/fa.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "حافظه خارجی",
"Configuration" => "پیکربندی",
"Options" => "تنظیمات",
-"Applicable" => "قابل اجرا",
"Add storage" => "اضافه کردن حافظه",
-"None set" => "تنظیم نشده",
"All Users" => "تمام کاربران",
"Groups" => "گروه ها",
"Users" => "کاربران",
diff --git a/apps/files_external/l10n/fi_FI.php b/apps/files_external/l10n/fi_FI.php
index d2f9d1a73a5..289bbdd3ad5 100644
--- a/apps/files_external/l10n/fi_FI.php
+++ b/apps/files_external/l10n/fi_FI.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Ulkoinen tallennustila",
"Configuration" => "Asetukset",
"Options" => "Valinnat",
-"Applicable" => "Sovellettavissa",
"Add storage" => "Lisää tallennustila",
-"None set" => "Ei asetettu",
"All Users" => "Kaikki käyttäjät",
"Groups" => "Ryhmät",
"Users" => "Käyttäjät",
diff --git a/apps/files_external/l10n/fr.php b/apps/files_external/l10n/fr.php
index 4b8e2b905b6..d9e2dbfcaed 100644
--- a/apps/files_external/l10n/fr.php
+++ b/apps/files_external/l10n/fr.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Stockage externe",
"Configuration" => "Configuration",
"Options" => "Options",
-"Applicable" => "Disponible",
"Add storage" => "Ajouter un support de stockage",
-"None set" => "Aucun spécifié",
"All Users" => "Tous les utilisateurs",
"Groups" => "Groupes",
"Users" => "Utilisateurs",
diff --git a/apps/files_external/l10n/gl.php b/apps/files_external/l10n/gl.php
index ec13fe241f6..1510df381b6 100644
--- a/apps/files_external/l10n/gl.php
+++ b/apps/files_external/l10n/gl.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Almacenamento externo",
"Configuration" => "Configuración",
"Options" => "Opcións",
-"Applicable" => "Aplicábel",
"Add storage" => "Engadir almacenamento",
-"None set" => "Ningún definido",
"All Users" => "Todos os usuarios",
"Groups" => "Grupos",
"Users" => "Usuarios",
diff --git a/apps/files_external/l10n/he.php b/apps/files_external/l10n/he.php
index 6aec07e78cf..e433f4fc306 100644
--- a/apps/files_external/l10n/he.php
+++ b/apps/files_external/l10n/he.php
@@ -9,8 +9,6 @@ $TRANSLATIONS = array(
"Folder name" => "שם התיקייה",
"Configuration" => "הגדרות",
"Options" => "אפשרויות",
-"Applicable" => "ניתן ליישום",
-"None set" => "לא הוגדרה",
"All Users" => "כל המשתמשים",
"Groups" => "קבוצות",
"Users" => "משתמשים",
diff --git a/apps/files_external/l10n/hu_HU.php b/apps/files_external/l10n/hu_HU.php
index 60661380433..9fed43e6267 100644
--- a/apps/files_external/l10n/hu_HU.php
+++ b/apps/files_external/l10n/hu_HU.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Külső tárolók",
"Configuration" => "Beállítások",
"Options" => "Opciók",
-"Applicable" => "Érvényességi kör",
"Add storage" => "Tároló becsatolása",
-"None set" => "Nincs beállítva",
"All Users" => "Az összes felhasználó",
"Groups" => "Csoportok",
"Users" => "Felhasználók",
diff --git a/apps/files_external/l10n/id.php b/apps/files_external/l10n/id.php
index 9f91fdf992f..94fa89077a8 100644
--- a/apps/files_external/l10n/id.php
+++ b/apps/files_external/l10n/id.php
@@ -12,9 +12,7 @@ $TRANSLATIONS = array(
"External storage" => "Penyimpanan eksternal",
"Configuration" => "Konfigurasi",
"Options" => "Opsi",
-"Applicable" => "Berlaku",
"Add storage" => "Tambahkan penyimpanan",
-"None set" => "Tidak satupun di set",
"All Users" => "Semua Pengguna",
"Groups" => "Grup",
"Users" => "Pengguna",
diff --git a/apps/files_external/l10n/is.php b/apps/files_external/l10n/is.php
index e86cfa108a6..5a350bad4a0 100644
--- a/apps/files_external/l10n/is.php
+++ b/apps/files_external/l10n/is.php
@@ -11,8 +11,6 @@ $TRANSLATIONS = array(
"Folder name" => "Nafn möppu",
"Configuration" => "Uppsetning",
"Options" => "Stillingar",
-"Applicable" => "Gilt",
-"None set" => "Ekkert sett",
"All Users" => "Allir notendur",
"Groups" => "Hópar",
"Users" => "Notendur",
diff --git a/apps/files_external/l10n/it.php b/apps/files_external/l10n/it.php
index d62d8e97327..75f60268c36 100644
--- a/apps/files_external/l10n/it.php
+++ b/apps/files_external/l10n/it.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Archiviazione esterna",
"Configuration" => "Configurazione",
"Options" => "Opzioni",
-"Applicable" => "Applicabile",
"Add storage" => "Aggiungi archiviazione",
-"None set" => "Nessuna impostazione",
"All Users" => "Tutti gli utenti",
"Groups" => "Gruppi",
"Users" => "Utenti",
diff --git a/apps/files_external/l10n/ja.php b/apps/files_external/l10n/ja.php
index 312dc85188d..e2d252d22a9 100644
--- a/apps/files_external/l10n/ja.php
+++ b/apps/files_external/l10n/ja.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "外部ストレージ",
"Configuration" => "設定",
"Options" => "オプション",
-"Applicable" => "適用範囲",
"Add storage" => "ストレージを追加",
-"None set" => "未設定",
"All Users" => "すべてのユーザー",
"Groups" => "グループ",
"Users" => "ユーザー",
diff --git a/apps/files_external/l10n/ka_GE.php b/apps/files_external/l10n/ka_GE.php
index 4953f91ce6a..7412bb145b6 100644
--- a/apps/files_external/l10n/ka_GE.php
+++ b/apps/files_external/l10n/ka_GE.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "ექსტერნალ საცავი",
"Configuration" => "კონფიგურაცია",
"Options" => "ოფცია",
-"Applicable" => "მიღებადი",
"Add storage" => "საცავის დამატება",
-"None set" => "არაფერია მითითებული",
"All Users" => "ყველა მომხმარებელი",
"Groups" => "ჯგუფები",
"Users" => "მომხმარებელი",
diff --git a/apps/files_external/l10n/ko.php b/apps/files_external/l10n/ko.php
index 088a419e1c1..87157e1f885 100644
--- a/apps/files_external/l10n/ko.php
+++ b/apps/files_external/l10n/ko.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "외부 저장소",
"Configuration" => "설정",
"Options" => "옵션",
-"Applicable" => "적용 가능",
"Add storage" => "저장소 추가",
-"None set" => "설정되지 않음",
"All Users" => "모든 사용자",
"Groups" => "그룹",
"Users" => "사용자",
diff --git a/apps/files_external/l10n/lt_LT.php b/apps/files_external/l10n/lt_LT.php
index c96119c8b68..abb43ab8adc 100644
--- a/apps/files_external/l10n/lt_LT.php
+++ b/apps/files_external/l10n/lt_LT.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Išorinė saugykla",
"Configuration" => "Konfigūracija",
"Options" => "Nustatymai",
-"Applicable" => "Pritaikyti",
"Add storage" => "Pridėti saugyklą",
-"None set" => "Nieko nepasirinkta",
"All Users" => "Visi vartotojai",
"Groups" => "Grupės",
"Users" => "Vartotojai",
diff --git a/apps/files_external/l10n/lv.php b/apps/files_external/l10n/lv.php
index 18e56178892..1512ff0dc2f 100644
--- a/apps/files_external/l10n/lv.php
+++ b/apps/files_external/l10n/lv.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Ārējā krātuve",
"Configuration" => "Konfigurācija",
"Options" => "Opcijas",
-"Applicable" => "Piemērojams",
"Add storage" => "Pievienot krātuvi",
-"None set" => "Neviens nav iestatīts",
"All Users" => "Visi lietotāji",
"Groups" => "Grupas",
"Users" => "Lietotāji",
diff --git a/apps/files_external/l10n/mk.php b/apps/files_external/l10n/mk.php
index b59bb138f1d..ddce2d5c178 100644
--- a/apps/files_external/l10n/mk.php
+++ b/apps/files_external/l10n/mk.php
@@ -11,8 +11,6 @@ $TRANSLATIONS = array(
"Folder name" => "Име на папка",
"Configuration" => "Конфигурација",
"Options" => "Опции",
-"Applicable" => "Применливо",
-"None set" => "Ништо поставено",
"All Users" => "Сите корисници",
"Groups" => "Групи",
"Users" => "Корисници",
diff --git a/apps/files_external/l10n/nb_NO.php b/apps/files_external/l10n/nb_NO.php
index c103112dbe3..3426e5589db 100644
--- a/apps/files_external/l10n/nb_NO.php
+++ b/apps/files_external/l10n/nb_NO.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Ekstern lagringsplass",
"Configuration" => "Konfigurasjon",
"Options" => "Innstillinger",
-"Applicable" => "Anvendelig",
"Add storage" => "Legg til lagringsplass",
-"None set" => "Ingen valgt",
"All Users" => "Alle brukere",
"Groups" => "Grupper",
"Users" => "Brukere",
diff --git a/apps/files_external/l10n/nl.php b/apps/files_external/l10n/nl.php
index 4fa579775f9..74bc7de4d8a 100644
--- a/apps/files_external/l10n/nl.php
+++ b/apps/files_external/l10n/nl.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Externe opslag",
"Configuration" => "Configuratie",
"Options" => "Opties",
-"Applicable" => "Van toepassing",
"Add storage" => "Toevoegen opslag",
-"None set" => "Niets ingesteld",
"All Users" => "Alle gebruikers",
"Groups" => "Groepen",
"Users" => "Gebruikers",
diff --git a/apps/files_external/l10n/pl.php b/apps/files_external/l10n/pl.php
index ece0620f754..d64292e0be2 100644
--- a/apps/files_external/l10n/pl.php
+++ b/apps/files_external/l10n/pl.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Zewnętrzne zasoby dyskowe",
"Configuration" => "Konfiguracja",
"Options" => "Opcje",
-"Applicable" => "Zastosowanie",
"Add storage" => "Dodaj zasoby dyskowe",
-"None set" => "Nie ustawione",
"All Users" => "Wszyscy uzytkownicy",
"Groups" => "Grupy",
"Users" => "Użytkownicy",
diff --git a/apps/files_external/l10n/pt_BR.php b/apps/files_external/l10n/pt_BR.php
index fbb945c5439..1d074a575ae 100644
--- a/apps/files_external/l10n/pt_BR.php
+++ b/apps/files_external/l10n/pt_BR.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Armazenamento Externo",
"Configuration" => "Configuração",
"Options" => "Opções",
-"Applicable" => "Aplicável",
"Add storage" => "Adicionar Armazenamento",
-"None set" => "Nenhum definido",
"All Users" => "Todos os Usuários",
"Groups" => "Grupos",
"Users" => "Usuários",
diff --git a/apps/files_external/l10n/pt_PT.php b/apps/files_external/l10n/pt_PT.php
index eb4d8feb41a..5bd2d0d43b6 100644
--- a/apps/files_external/l10n/pt_PT.php
+++ b/apps/files_external/l10n/pt_PT.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Armazenamento Externo",
"Configuration" => "Configuração",
"Options" => "Opções",
-"Applicable" => "Aplicável",
"Add storage" => "Adicionar armazenamento",
-"None set" => "Não definido",
"All Users" => "Todos os utilizadores",
"Groups" => "Grupos",
"Users" => "Utilizadores",
diff --git a/apps/files_external/l10n/ro.php b/apps/files_external/l10n/ro.php
index a90b0299e17..e6cdd8450ec 100644
--- a/apps/files_external/l10n/ro.php
+++ b/apps/files_external/l10n/ro.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Stocare externă",
"Configuration" => "Configurație",
"Options" => "Opțiuni",
-"Applicable" => "Aplicabil",
"Add storage" => "Adauga stocare",
-"None set" => "Niciunul",
"All Users" => "Toți utilizatorii",
"Groups" => "Grupuri",
"Users" => "Utilizatori",
diff --git a/apps/files_external/l10n/ru.php b/apps/files_external/l10n/ru.php
index 8ed437839cd..d4695c867af 100644
--- a/apps/files_external/l10n/ru.php
+++ b/apps/files_external/l10n/ru.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Внешний носитель данных",
"Configuration" => "Конфигурация",
"Options" => "Опции",
-"Applicable" => "Применимый",
"Add storage" => "Добавить носитель данных",
-"None set" => "Не установлено",
"All Users" => "Все пользователи",
"Groups" => "Группы",
"Users" => "Пользователи",
diff --git a/apps/files_external/l10n/si_LK.php b/apps/files_external/l10n/si_LK.php
index ac41f596340..a9f39a3bbc9 100644
--- a/apps/files_external/l10n/si_LK.php
+++ b/apps/files_external/l10n/si_LK.php
@@ -9,8 +9,6 @@ $TRANSLATIONS = array(
"Folder name" => "ෆොල්ඩරයේ නම",
"Configuration" => "වින්‍යාසය",
"Options" => "විකල්පයන්",
-"Applicable" => "අදාළ",
-"None set" => "කිසිවක් නැත",
"All Users" => "සියළු පරිශීලකයන්",
"Groups" => "කණ්ඩායම්",
"Users" => "පරිශීලකයන්",
diff --git a/apps/files_external/l10n/sk_SK.php b/apps/files_external/l10n/sk_SK.php
index aa288982576..1f1a150b8a1 100644
--- a/apps/files_external/l10n/sk_SK.php
+++ b/apps/files_external/l10n/sk_SK.php
@@ -5,6 +5,7 @@ $TRANSLATIONS = array(
"Grant access" => "Povoliť prístup",
"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",
+"Saved" => "Uložené",
"<b>Warning:</b> \"smbclient\" is not installed. Mounting of CIFS/SMB shares is not possible. Please ask your system administrator to install it." => "<b>Upozornenie:</b> \"smbclient\" nie je nainštalovaný. Nie je možné pripojenie oddielov CIFS/SMB. Požiadajte administrátora systému, nech ho nainštaluje.",
"<b>Warning:</b> The FTP support in PHP is not enabled or installed. Mounting of FTP shares is not possible. Please ask your system administrator to install it." => "<b>Upozornenie:</b> Podpora FTP v PHP nie je povolená alebo nainštalovaná. Nie je možné pripojenie oddielov FTP. Požiadajte administrátora systému, nech ho nainštaluje.",
"<b>Warning:</b> The Curl support in PHP is not enabled or installed. Mounting of ownCloud / WebDAV or GoogleDrive is not possible. Please ask your system administrator to install it." => "<b>Varovanie:</b> nie je nainštalovaná, alebo povolená, podpora Curl v PHP. Nie je možné pripojenie oddielov ownCloud, WebDAV, či GoogleDrive. Prosím požiadajte svojho administrátora systému, nech ju nainštaluje.",
@@ -13,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Externé úložisko",
"Configuration" => "Nastavenia",
"Options" => "Možnosti",
-"Applicable" => "Aplikovateľné",
"Add storage" => "Pridať úložisko",
-"None set" => "Žiadne nastavené",
"All Users" => "Všetci používatelia",
"Groups" => "Skupiny",
"Users" => "Používatelia",
diff --git a/apps/files_external/l10n/sl.php b/apps/files_external/l10n/sl.php
index 05e626fcf83..9d1970064e8 100644
--- a/apps/files_external/l10n/sl.php
+++ b/apps/files_external/l10n/sl.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Zunanja shramba",
"Configuration" => "Nastavitve",
"Options" => "Možnosti",
-"Applicable" => "Se uporablja",
"Add storage" => "Dodaj shrambo",
-"None set" => "Ni nastavljeno",
"All Users" => "Vsi uporabniki",
"Groups" => "Skupine",
"Users" => "Uporabniki",
diff --git a/apps/files_external/l10n/sv.php b/apps/files_external/l10n/sv.php
index 183df674b9d..0a50fd2cc7d 100644
--- a/apps/files_external/l10n/sv.php
+++ b/apps/files_external/l10n/sv.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Extern lagring",
"Configuration" => "Konfiguration",
"Options" => "Alternativ",
-"Applicable" => "Tillämplig",
"Add storage" => "Lägg till lagring",
-"None set" => "Ingen angiven",
"All Users" => "Alla användare",
"Groups" => "Grupper",
"Users" => "Användare",
diff --git a/apps/files_external/l10n/ta_LK.php b/apps/files_external/l10n/ta_LK.php
index 94ddaf9c5e1..fe5d2a8bc87 100644
--- a/apps/files_external/l10n/ta_LK.php
+++ b/apps/files_external/l10n/ta_LK.php
@@ -9,8 +9,6 @@ $TRANSLATIONS = array(
"Folder name" => "கோப்புறை பெயர்",
"Configuration" => "தகவமைப்பு",
"Options" => "தெரிவுகள்",
-"Applicable" => "பயன்படத்தக்க",
-"None set" => "தொகுப்பில்லா",
"All Users" => "பயனாளர்கள் எல்லாம்",
"Groups" => "குழுக்கள்",
"Users" => "பயனாளர்",
diff --git a/apps/files_external/l10n/th_TH.php b/apps/files_external/l10n/th_TH.php
index a1a56a4d2e4..0a5a419c5e5 100644
--- a/apps/files_external/l10n/th_TH.php
+++ b/apps/files_external/l10n/th_TH.php
@@ -11,8 +11,6 @@ $TRANSLATIONS = array(
"Folder name" => "ชื่อโฟลเดอร์",
"Configuration" => "การกำหนดค่า",
"Options" => "ตัวเลือก",
-"Applicable" => "สามารถใช้งานได้",
-"None set" => "ยังไม่มีการกำหนด",
"All Users" => "ผู้ใช้งานทั้งหมด",
"Groups" => "กลุ่ม",
"Users" => "ผู้ใช้งาน",
diff --git a/apps/files_external/l10n/tr.php b/apps/files_external/l10n/tr.php
index a835d6f174a..98331d39e3d 100644
--- a/apps/files_external/l10n/tr.php
+++ b/apps/files_external/l10n/tr.php
@@ -14,9 +14,7 @@ $TRANSLATIONS = array(
"External storage" => "Harici depolama",
"Configuration" => "Yapılandırma",
"Options" => "Seçenekler",
-"Applicable" => "Uygulanabilir",
"Add storage" => "Depo ekle",
-"None set" => "Hiçbiri",
"All Users" => "Tüm Kullanıcılar",
"Groups" => "Gruplar",
"Users" => "Kullanıcılar",
diff --git a/apps/files_external/l10n/uk.php b/apps/files_external/l10n/uk.php
index a7c028aa935..2f5767c9a1d 100644
--- a/apps/files_external/l10n/uk.php
+++ b/apps/files_external/l10n/uk.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Зовнішнє сховище",
"Configuration" => "Налаштування",
"Options" => "Опції",
-"Applicable" => "Придатний",
"Add storage" => "Додати сховище",
-"None set" => "Не встановлено",
"All Users" => "Усі користувачі",
"Groups" => "Групи",
"Users" => "Користувачі",
diff --git a/apps/files_external/l10n/vi.php b/apps/files_external/l10n/vi.php
index 5fd00dc2bf5..370bd71c31c 100644
--- a/apps/files_external/l10n/vi.php
+++ b/apps/files_external/l10n/vi.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "Lưu trữ ngoài",
"Configuration" => "Cấu hình",
"Options" => "Tùy chọn",
-"Applicable" => "Áp dụng",
"Add storage" => "Thêm bộ nhớ",
-"None set" => "không",
"All Users" => "Tất cả người dùng",
"Groups" => "Nhóm",
"Users" => "Người dùng",
diff --git a/apps/files_external/l10n/zh_CN.php b/apps/files_external/l10n/zh_CN.php
index bb85d0e4f49..3051df04d93 100644
--- a/apps/files_external/l10n/zh_CN.php
+++ b/apps/files_external/l10n/zh_CN.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "外部存储",
"Configuration" => "配置",
"Options" => "选项",
-"Applicable" => "适用的",
"Add storage" => "添加存储",
-"None set" => "未设置",
"All Users" => "所有用户",
"Groups" => "组",
"Users" => "用户",
diff --git a/apps/files_external/l10n/zh_TW.php b/apps/files_external/l10n/zh_TW.php
index 7c256cd2ab7..ae7d84b0ee3 100644
--- a/apps/files_external/l10n/zh_TW.php
+++ b/apps/files_external/l10n/zh_TW.php
@@ -13,9 +13,7 @@ $TRANSLATIONS = array(
"External storage" => "外部儲存",
"Configuration" => "設定",
"Options" => "選項",
-"Applicable" => "可用的",
"Add storage" => "增加儲存區",
-"None set" => "尚未設定",
"All Users" => "所有使用者",
"Groups" => "群組",
"Users" => "使用者",
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 80238666376..e8815acaf16 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -1,152 +1,152 @@
-<form id="files_external">
- <fieldset class="personalblock">
+<form id="files_external" class="section">
<h2><?php p($l->t('External Storage')); ?></h2>
- <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) print_unescaped(''.$_['dependencies'].''); ?>
- <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['isAdminPage'])); ?>'>
- <thead>
- <tr>
- <th></th>
- <th><?php p($l->t('Folder name')); ?></th>
- <th><?php p($l->t('External storage')); ?></th>
- <th><?php p($l->t('Configuration')); ?></th>
- <!--<th><?php p($l->t('Options')); ?></th> -->
- <?php if ($_['isAdminPage']) print_unescaped('<th>'.$l->t('Applicable').'</th>'); ?>
- <th>&nbsp;</th>
- </tr>
- </thead>
- <tbody width="100%">
- <?php $_['mounts'] = array_merge($_['mounts'], array('' => array())); ?>
- <?php foreach ($_['mounts'] as $mount): ?>
- <tr <?php print_unescaped(($mount['mountpoint'] !== '') ? 'class="'.OC_Util::sanitizeHTML($mount['class']).'"' : 'id="addMountPoint"'); ?>>
- <td class="status">
- <?php if (isset($mount['status'])): ?>
- <span class="<?php p(($mount['status']) ? 'success' : 'error'); ?>"></span>
- <?php endif; ?>
+ <?php if (isset($_['dependencies']) and ($_['dependencies']<>'')) print_unescaped(''.$_['dependencies'].''); ?>
+ <table id="externalStorage" class="grid" data-admin='<?php print_unescaped(json_encode($_['isAdminPage'])); ?>'>
+ <thead>
+ <tr>
+ <th></th>
+ <th><?php p($l->t('Folder name')); ?></th>
+ <th><?php p($l->t('External storage')); ?></th>
+ <th><?php p($l->t('Configuration')); ?></th>
+ <!--<th><?php p($l->t('Options')); ?></th> -->
+ <?php if ($_['isAdminPage']) print_unescaped('<th>'.$l->t('Available for').'</th>'); ?>
+ <th>&nbsp;</th>
+ </tr>
+ </thead>
+ <tbody width="100%">
+ <?php $_['mounts'] = array_merge($_['mounts'], array('' => array())); ?>
+ <?php foreach ($_['mounts'] as $mount): ?>
+ <tr <?php print_unescaped(($mount['mountpoint'] !== '') ? 'class="'.OC_Util::sanitizeHTML($mount['class']).'"' : 'id="addMountPoint"'); ?>>
+ <td class="status">
+ <?php if (isset($mount['status'])): ?>
+ <span class="<?php p(($mount['status']) ? 'success' : 'error'); ?>"></span>
+ <?php endif; ?>
+ </td>
+ <td class="mountPoint"><input type="text" name="mountPoint"
+ value="<?php p($mount['mountpoint']); ?>"
+ placeholder="<?php p($l->t('Folder name')); ?>" /></td>
+ <?php if ($mount['mountpoint'] == ''): ?>
+ <td class="backend">
+ <select id="selectBackend" data-configurations='<?php print_unescaped(json_encode($_['backends'])); ?>'>
+ <option value="" disabled selected
+ style="display:none;"><?php p($l->t('Add storage')); ?></option>
+ <?php foreach ($_['backends'] as $class => $backend): ?>
+ <option value="<?php p($class); ?>"><?php p($backend['backend']); ?></option>
+ <?php endforeach; ?>
+ </select>
</td>
- <td class="mountPoint"><input type="text" name="mountPoint"
- value="<?php p($mount['mountpoint']); ?>"
- placeholder="<?php p($l->t('Folder name')); ?>" /></td>
- <?php if ($mount['mountpoint'] == ''): ?>
- <td class="backend">
- <select id="selectBackend" data-configurations='<?php print_unescaped(json_encode($_['backends'])); ?>'>
- <option value="" disabled selected
- style="display:none;"><?php p($l->t('Add storage')); ?></option>
- <?php foreach ($_['backends'] as $class => $backend): ?>
- <option value="<?php p($class); ?>"><?php p($backend['backend']); ?></option>
- <?php endforeach; ?>
- </select>
- </td>
- <?php else: ?>
- <td class="backend"
- data-class="<?php p($mount['class']); ?>"><?php p($mount['backend']); ?></td>
- <?php endif; ?>
- <td class ="configuration" width="100%">
- <?php if (isset($mount['options'])): ?>
- <?php foreach ($mount['options'] as $parameter => $value): ?>
- <?php if (isset($_['backends'][$mount['class']]['configuration'][$parameter])): ?>
- <?php
- $placeholder = $_['backends'][$mount['class']]['configuration'][$parameter];
- $is_optional = FALSE;
- if (strpos($placeholder, '&') === 0) {
- $is_optional = TRUE;
- $placeholder = substr($placeholder, 1);
- }
- ?>
- <?php if (strpos($placeholder, '*') === 0): ?>
- <input type="password"
- <?php if ($is_optional): ?> class="optional"<?php endif; ?>
- data-parameter="<?php p($parameter); ?>"
- value="<?php p($value); ?>"
- placeholder="<?php p(substr($placeholder, 1)); ?>" />
- <?php elseif (strpos($placeholder, '!') === 0): ?>
- <label><input type="checkbox"
- data-parameter="<?php p($parameter); ?>"
- <?php if ($value == 'true'): ?> checked="checked"<?php endif; ?>
- /><?php p(substr($placeholder, 1)); ?></label>
- <?php elseif (strpos($placeholder, '#') === 0): ?>
- <input type="hidden"
- data-parameter="<?php p($parameter); ?>"
- value="<?php p($value); ?>" />
- <?php else: ?>
- <input type="text"
- <?php if ($is_optional): ?> class="optional"<?php endif; ?>
- data-parameter="<?php p($parameter); ?>"
- value="<?php p($value); ?>"
- placeholder="<?php p($placeholder); ?>" />
- <?php endif; ?>
+ <?php else: ?>
+ <td class="backend"
+ data-class="<?php p($mount['class']); ?>"><?php p($mount['backend']); ?></td>
+ <?php endif; ?>
+ <td class ="configuration" width="100%">
+ <?php if (isset($mount['options'])): ?>
+ <?php foreach ($mount['options'] as $parameter => $value): ?>
+ <?php if (isset($_['backends'][$mount['class']]['configuration'][$parameter])): ?>
+ <?php
+ $placeholder = $_['backends'][$mount['class']]['configuration'][$parameter];
+ $is_optional = FALSE;
+ if (strpos($placeholder, '&') === 0) {
+ $is_optional = TRUE;
+ $placeholder = substr($placeholder, 1);
+ }
+ ?>
+ <?php if (strpos($placeholder, '*') === 0): ?>
+ <input type="password"
+ <?php if ($is_optional): ?> class="optional"<?php endif; ?>
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>"
+ placeholder="<?php p(substr($placeholder, 1)); ?>" />
+ <?php elseif (strpos($placeholder, '!') === 0): ?>
+ <label><input type="checkbox"
+ data-parameter="<?php p($parameter); ?>"
+ <?php if ($value == 'true'): ?> checked="checked"<?php endif; ?>
+ /><?php p(substr($placeholder, 1)); ?></label>
+ <?php elseif (strpos($placeholder, '#') === 0): ?>
+ <input type="hidden"
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>" />
+ <?php else: ?>
+ <input type="text"
+ <?php if ($is_optional): ?> class="optional"<?php endif; ?>
+ data-parameter="<?php p($parameter); ?>"
+ value="<?php p($value); ?>"
+ placeholder="<?php p($placeholder); ?>" />
<?php endif; ?>
- <?php endforeach; ?>
- <?php if (isset($_['backends'][$mount['class']]['custom']) && !in_array('files_external/js/'.$_['backends'][$mount['class']]['custom'], \OC_Util::$scripts)): ?>
- <?php OCP\Util::addScript('files_external', $_['backends'][$mount['class']]['custom']); ?>
<?php endif; ?>
+ <?php endforeach; ?>
+ <?php if (isset($_['backends'][$mount['class']]['custom']) && !in_array('files_external/js/'.$_['backends'][$mount['class']]['custom'], \OC_Util::$scripts)): ?>
+ <?php OCP\Util::addScript('files_external', $_['backends'][$mount['class']]['custom']); ?>
<?php endif; ?>
- </td>
- <?php if ($_['isAdminPage']): ?>
- <td class="applicable"
- align="right"
- data-applicable-groups='<?php if (isset($mount['applicable']['groups']))
- print_unescaped(json_encode($mount['applicable']['groups'])); ?>'
- data-applicable-users='<?php if (isset($mount['applicable']['users']))
- print_unescaped(json_encode($mount['applicable']['users'])); ?>'>
- <select class="chzn-select"
- multiple style="width:20em;"
- data-placeholder="<?php p($l->t('None set')); ?>">
- <option value="all" <?php if (isset($mount['applicable']['users']) && in_array('all', $mount['applicable']['users'])) print_unescaped('selected="selected"');?> ><?php p($l->t('All Users')); ?></option>
- <optgroup label="<?php p($l->t('Groups')); ?>">
- <?php foreach ($_['groups'] as $group): ?>
- <option value="<?php p($group); ?>(group)"
- <?php if (isset($mount['applicable']['groups']) && in_array($group, $mount['applicable']['groups'])): ?>
- selected="selected"
- <?php endif; ?>><?php p($group); ?></option>
- <?php endforeach; ?>
- </optgroup>
- <optgroup label="<?php p($l->t('Users')); ?>">
- <?php foreach ($_['users'] as $user): ?>
- <option value="<?php p($user); ?>"
- <?php if (isset($mount['applicable']['users']) && in_array($user, $mount['applicable']['users'])): ?>
- selected="selected"
- <?php endif; ?>><?php p($_['userDisplayNames'][$user]); ?></option>
- <?php endforeach; ?>
- </optgroup>
- </select>
- </td>
<?php endif; ?>
- <td <?php if ($mount['mountpoint'] != ''): ?>class="remove"
- <?php else: ?>style="visibility:hidden;"
- <?php endif ?>><img alt="<?php p($l->t('Delete')); ?>"
- title="<?php p($l->t('Delete')); ?>"
- class="svg action"
- src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>" /></td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- <br />
+ </td>
+ <?php if ($_['isAdminPage']): ?>
+ <td class="applicable"
+ align="right"
+ data-applicable-groups='<?php if (isset($mount['applicable']['groups']))
+ print_unescaped(json_encode($mount['applicable']['groups'])); ?>'
+ data-applicable-users='<?php if (isset($mount['applicable']['users']))
+ print_unescaped(json_encode($mount['applicable']['users'])); ?>'>
+ <select class="chzn-select"
+ multiple style="width:20em;"
+ data-placeholder="<?php p($l->t('No user or group')); ?>">
+ <option value="all"
+ <?php if (empty($mount['class']) || (isset($mount['applicable']['users']) && in_array('all', $mount['applicable']['users']))) print_unescaped('selected="selected"');?> >
+ <?php p($l->t('All Users')); ?>
+ </option>
+ <optgroup label="<?php p($l->t('Groups')); ?>">
+ <?php foreach ($_['groups'] as $group): ?>
+ <option value="<?php p($group); ?>(group)"
+ <?php if (isset($mount['applicable']['groups']) && in_array($group, $mount['applicable']['groups'])): ?>
+ selected="selected"
+ <?php endif; ?>><?php p($group); ?></option>
+ <?php endforeach; ?>
+ </optgroup>
+ <optgroup label="<?php p($l->t('Users')); ?>">
+ <?php foreach ($_['users'] as $user): ?>
+ <option value="<?php p($user); ?>"
+ <?php if (isset($mount['applicable']['users']) && in_array($user, $mount['applicable']['users'])): ?>
+ selected="selected"
+ <?php endif; ?>><?php p($_['userDisplayNames'][$user]); ?></option>
+ <?php endforeach; ?>
+ </optgroup>
+ </select>
+ </td>
+ <?php endif; ?>
+ <td <?php if ($mount['mountpoint'] != ''): ?>class="remove"
+ <?php else: ?>style="visibility:hidden;"
+ <?php endif ?>><img alt="<?php p($l->t('Delete')); ?>"
+ title="<?php p($l->t('Delete')); ?>"
+ class="svg action"
+ src="<?php print_unescaped(image_path('core', 'actions/delete.svg')); ?>" /></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <br />
- <?php if ($_['isAdminPage']): ?>
- <br />
- <input type="checkbox" name="allowUserMounting" id="allowUserMounting"
- value="1" <?php if ($_['allowUserMounting'] == 'yes') print_unescaped(' checked="checked"'); ?> />
- <label for="allowUserMounting"><?php p($l->t('Enable User External Storage')); ?></label> <span id="userMountingMsg" class="msg"></span>
+ <?php if ($_['isAdminPage']): ?>
+ <br />
+ <input type="checkbox" name="allowUserMounting" id="allowUserMounting"
+ value="1" <?php if ($_['allowUserMounting'] == 'yes') print_unescaped(' checked="checked"'); ?> />
+ <label for="allowUserMounting"><?php p($l->t('Enable User External Storage')); ?></label> <span id="userMountingMsg" class="msg"></span>
- <p id="userMountingBackups"<?php if ($_['allowUserMounting'] != 'yes'): ?> class="hidden"<?php endif; ?>>
- <?php p($l->t('Allow users to mount the following external storage')); ?><br />
- <?php $i = 0; foreach ($_['personal_backends'] as $class => $backend): ?>
- <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($class); ?>" <?php if ($backend['enabled']) print_unescaped(' checked="checked"'); ?> />
- <label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend['backend']); ?></label> <br />
- <?php $i++; ?>
- <?php endforeach; ?>
- </p>
- <?php endif; ?>
- </fieldset>
+ <p id="userMountingBackups"<?php if ($_['allowUserMounting'] != 'yes'): ?> class="hidden"<?php endif; ?>>
+ <?php p($l->t('Allow users to mount the following external storage')); ?><br />
+ <?php $i = 0; foreach ($_['personal_backends'] as $class => $backend): ?>
+ <input type="checkbox" id="allowUserMountingBackends<?php p($i); ?>" name="allowUserMountingBackends[]" value="<?php p($class); ?>" <?php if ($backend['enabled']) print_unescaped(' checked="checked"'); ?> />
+ <label for="allowUserMountingBackends<?php p($i); ?>"><?php p($backend['backend']); ?></label> <br />
+ <?php $i++; ?>
+ <?php endforeach; ?>
+ </p>
+ <?php endif; ?>
</form>
<?php if ( ! $_['isAdminPage']): ?>
-<form id="files_external"
+<form id="files_external" class="section"
method="post"
enctype="multipart/form-data"
action="<?php p(OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php')); ?>">
-<fieldset class="personalblock">
<h2><?php p($l->t('SSL root certificates'));?></h2>
<table id="sslCertificate" data-admin='<?php print_unescaped(json_encode($_['isAdminPage'])); ?>'>
<tbody width="100%">
@@ -166,6 +166,5 @@
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']); ?>">
<input type="file" id="rootcert_import" name="rootcert_import">
<input type="submit" name="cert_import" value="<?php p($l->t('Import Root Certificate')); ?>" />
-</fieldset>
</form>
<?php endif; ?>
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index 4b716e764f4..ab32108ea25 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -71,19 +71,6 @@ if (version_compare($installedVersion, '0.3', '<')) {
}
// clean up oc_share table from files which are no longer exists
-if (version_compare($installedVersion, '0.3.5', '<')) {
-
- // get all shares where the original file no longer exists
- $findShares = \OC_DB::prepare('SELECT `file_source` FROM `*PREFIX*share` LEFT JOIN `*PREFIX*filecache` ON `file_source` = `*PREFIX*filecache`.`fileid` WHERE `*PREFIX*filecache`.`fileid` IS NULL AND `*PREFIX*share`.`item_type` IN (\'file\', \'folder\')');
- $sharesFound = $findShares->execute(array())->fetchAll();
-
- // delete those shares from the oc_share table
- if (is_array($sharesFound) && !empty($sharesFound)) {
- $delArray = array();
- foreach ($sharesFound as $share) {
- $delArray[] = $share['file_source'];
- }
- $removeShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share` WHERE `file_source` IN (?)');
- $result = $removeShares->execute(array(implode(',', $delArray)));
- }
+if (version_compare($installedVersion, '0.3.5.6', '<')) {
+ \OC\Files\Cache\Shared_Updater::fixBrokenSharesOnAppUpdate();
}
diff --git a/apps/files_sharing/appinfo/version b/apps/files_sharing/appinfo/version
index 09e9157034c..8f91d33378e 100644
--- a/apps/files_sharing/appinfo/version
+++ b/apps/files_sharing/appinfo/version
@@ -1 +1 @@
-0.3.5 \ No newline at end of file
+0.3.5.6
diff --git a/apps/files_sharing/l10n/et_EE.php b/apps/files_sharing/l10n/et_EE.php
index af5891fcc7f..7150f05da22 100644
--- a/apps/files_sharing/l10n/et_EE.php
+++ b/apps/files_sharing/l10n/et_EE.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"sharing is disabled" => "jagamine on peatatud",
"For more info, please ask the person who sent this link." => "Täpsema info saamiseks palun pöördu lingi saatnud isiku poole.",
"shared by %s" => "jagas %s",
+"Download %s" => "Laadi alla %s",
"Direct link" => "Otsene link"
);
$PLURAL_FORMS = "nplurals=2; plural=(n != 1);";
diff --git a/apps/files_sharing/l10n/sk_SK.php b/apps/files_sharing/l10n/sk_SK.php
index 4e9856da4a7..6856c0591f4 100644
--- a/apps/files_sharing/l10n/sk_SK.php
+++ b/apps/files_sharing/l10n/sk_SK.php
@@ -11,6 +11,7 @@ $TRANSLATIONS = array(
"sharing is disabled" => "zdieľanie je zakázané",
"For more info, please ask the person who sent this link." => "Pre viac informácií kontaktujte osobu, ktorá vám poslala tento odkaz.",
"shared by %s" => "Zdieľa %s",
+"Download %s" => "Stiahnuť %s",
"Direct link" => "Priama linka"
);
$PLURAL_FORMS = "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;";
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 01db29d72e2..eeb62c3cce2 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -20,6 +20,7 @@
*/
namespace OC\Files\Cache;
+
use OCP\Share_Backend_Collection;
/**
@@ -50,7 +51,7 @@ class Shared_Cache extends Cache {
\OC\Files\Filesystem::initMountPoints($source['fileOwner']);
$mount = \OC\Files\Filesystem::getMountByNumericId($source['storage']);
if (is_array($mount)) {
- $fullPath = $mount[key($mount)]->getMountPoint().$source['path'];
+ $fullPath = $mount[key($mount)]->getMountPoint() . $source['path'];
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($fullPath);
if ($storage) {
$this->files[$target] = $internalPath;
@@ -75,7 +76,7 @@ class Shared_Cache extends Cache {
/**
* get the stored metadata of a file or folder
*
- * @param string/int $file
+ * @param string /int $file
* @return array
*/
public function get($file) {
@@ -95,8 +96,8 @@ class Shared_Cache extends Cache {
} else {
$query = \OC_DB::prepare(
'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`,'
- .' `size`, `mtime`, `encrypted`, `unencrypted_size`'
- .' FROM `*PREFIX*filecache` WHERE `fileid` = ?');
+ . ' `size`, `mtime`, `encrypted`, `unencrypted_size`'
+ . ' FROM `*PREFIX*filecache` WHERE `fileid` = ?');
$result = $query->execute(array($file));
$data = $result->fetchRow();
$data['fileid'] = (int)$data['fileid'];
@@ -288,8 +289,7 @@ class Shared_Cache extends Cache {
foreach ($files as $file) {
if ($file['mimetype'] === 'httpd/unix-directory') {
$exploreDirs[] = ltrim($dir . '/' . $file['name'], '/');
- }
- else if (($mimepart && $file['mimepart'] === $mimepart) || ($mimetype && $file['mimetype'] === $mimetype)) {
+ } else if (($mimepart && $file['mimepart'] === $mimepart) || ($mimetype && $file['mimetype'] === $mimetype)) {
// usersPath not reliable
//$file['path'] = $file['usersPath'];
$file['path'] = ltrim($dir . '/' . $file['name'], '/');
@@ -344,8 +344,6 @@ class Shared_Cache extends Cache {
if ($row['encrypted'] or ($row['unencrypted_size'] > 0 and $row['mimetype'] === 'httpd/unix-directory')) {
$row['encrypted_size'] = $row['size'];
$row['size'] = $row['unencrypted_size'];
- } else {
- $row['size'] = $row['size'];
}
$files[] = $row;
}
@@ -402,4 +400,48 @@ class Shared_Cache extends Cache {
return false;
}
+ /**
+ * get the path of a file on this storage by it's id
+ *
+ * @param int $id
+ * @param string $pathEnd (optional) used internally for recursive calls
+ * @return string | null
+ */
+ public function getPathById($id, $pathEnd = '') {
+ // direct shares are easy
+ if ($path = $this->getShareById($id)) {
+ return $path . $pathEnd;
+ } else {
+ // if the item is a direct share we try and get the path of the parent and append the name of the item to it
+ list($parent, $name) = $this->getParentInfo($id);
+ if ($parent > 0) {
+ return $this->getPathById($parent, '/' . $name . $pathEnd);
+ } else {
+ return null;
+ }
+ }
+ }
+
+ private function getShareById($id) {
+ $item = \OCP\Share::getItemSharedWithBySource('file', $id);
+ if ($item) {
+ return trim($item['file_target'], '/');
+ }
+ $item = \OCP\Share::getItemSharedWithBySource('folder', $id);
+ if ($item) {
+ return trim($item['file_target'], '/');
+ }
+ return null;
+ }
+
+ private function getParentInfo($id) {
+ $sql = 'SELECT `parent`, `name` FROM `*PREFIX*filecache` WHERE `fileid` = ?';
+ $query = \OC_DB::prepare($sql);
+ $result = $query->execute(array($id));
+ if ($row = $result->fetchRow()) {
+ return array($row['parent'], $row['name']);
+ } else {
+ return array(-1, '');
+ }
+ }
}
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index 23ebc9fb811..e3a7679292d 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -135,4 +135,19 @@ class Shared_Updater {
}
}
+ /**
+ * clean up oc_share table from files which are no longer exists
+ *
+ * This fixes issues from updates from files_sharing < 0.3.5.6 (ownCloud 4.5)
+ * It will just be called during the update of the app
+ */
+ static public function fixBrokenSharesOnAppUpdate() {
+ // delete all shares where the original file no longer exists
+ $findAndRemoveShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share` ' .
+ 'WHERE `file_source` NOT IN ( ' .
+ 'SELECT `fileid` FROM `*PREFIX*filecache` WHERE `item_type` IN (\'file\', \'folder\'))'
+ );
+ $findAndRemoveShares->execute(array());
+ }
+
}
diff --git a/apps/files_sharing/tests/cache.php b/apps/files_sharing/tests/cache.php
index a75e1860527..47969833ab5 100644
--- a/apps/files_sharing/tests/cache.php
+++ b/apps/files_sharing/tests/cache.php
@@ -246,4 +246,43 @@ class Test_Files_Sharing_Cache extends Test_Files_Sharing_Base {
}
}
+ public function testGetPathByIdDirectShare() {
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
+ \OC\Files\Filesystem::file_put_contents('test.txt', 'foo');
+ $info = \OC\Files\Filesystem::getFileInfo('test.txt');
+ \OCP\Share::shareItem('file', $info->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL);
+ \OC_Util::tearDownFS();
+
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
+ $this->assertTrue(\OC\Files\Filesystem::file_exists('/Shared/test.txt'));
+ list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/Shared/test.txt');
+ /**
+ * @var \OC\Files\Storage\Shared $sharedStorage
+ */
+
+ $sharedCache = $sharedStorage->getCache();
+ $this->assertEquals('test.txt', $sharedCache->getPathById($info->getId()));
+ }
+
+ public function testGetPathByIdShareSubFolder() {
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER1);
+ \OC\Files\Filesystem::mkdir('foo');
+ \OC\Files\Filesystem::mkdir('foo/bar');
+ \OC\Files\Filesystem::touch('foo/bar/test.txt', 'bar');
+ $folderInfo = \OC\Files\Filesystem::getFileInfo('foo');
+ $fileInfo = \OC\Files\Filesystem::getFileInfo('foo/bar/test.txt');
+ \OCP\Share::shareItem('folder', $folderInfo->getId(), \OCP\Share::SHARE_TYPE_USER, self::TEST_FILES_SHARING_API_USER2, \OCP\PERMISSION_ALL);
+ \OC_Util::tearDownFS();
+
+ self::loginHelper(self::TEST_FILES_SHARING_API_USER2);
+ $this->assertTrue(\OC\Files\Filesystem::file_exists('/Shared/foo'));
+ list($sharedStorage) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/Shared/foo');
+ /**
+ * @var \OC\Files\Storage\Shared $sharedStorage
+ */
+
+ $sharedCache = $sharedStorage->getCache();
+ $this->assertEquals('foo', $sharedCache->getPathById($folderInfo->getId()));
+ $this->assertEquals('foo/bar/test.txt', $sharedCache->getPathById($fileInfo->getId()));
+ }
}
diff --git a/apps/files_sharing/tests/updater.php b/apps/files_sharing/tests/updater.php
new file mode 100644
index 00000000000..79ae4879b64
--- /dev/null
+++ b/apps/files_sharing/tests/updater.php
@@ -0,0 +1,91 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Morris Jobke
+ * @copyright 2014 Morris Jobke <morris.jobke@gmail.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/>.
+ *
+ */
+
+/**
+ * Class Test_Files_Sharing_Updater
+ */
+class Test_Files_Sharing_Updater extends \PHPUnit_Framework_TestCase {
+
+ function setUp() {
+ // some previous tests didn't clean up and therefore this has to be done here
+ // FIXME: DIRTY HACK - TODO: find tests, that don't clean up and fix it there
+ $this->tearDown();
+
+ // add items except one - because this is the test case for the broken share table
+ $addItems = \OC_DB::prepare('INSERT INTO `*PREFIX*filecache` (`storage`, `path_hash`, ' .
+ '`parent`, `mimetype`, `mimepart`, `size`, `mtime`, `storage_mtime`) ' .
+ 'VALUES (1, ?, 1, 1, 1, 1, 1, 1)');
+ $items = array(1, 3);
+ $fileIds = array();
+ foreach($items as $item) {
+ // the number is used as path_hash
+ $addItems->execute(array($item));
+ $fileIds[] = \OC_DB::insertId('*PREFIX*filecache');
+ }
+
+ $addShares = \OC_DB::prepare('INSERT INTO `*PREFIX*share` (`file_source`, `item_type`, `uid_owner`) VALUES (?, \'file\', 1)');
+ // the number is used as item_source
+ $addShares->execute(array($fileIds[0]));
+ $addShares->execute(array(200)); // id of "deleted" file
+ $addShares->execute(array($fileIds[1]));
+ }
+
+ function tearDown() {
+ $removeShares = \OC_DB::prepare('DELETE FROM `*PREFIX*share`');
+ $removeShares->execute();
+ $removeItems = \OC_DB::prepare('DELETE FROM `*PREFIX*filecache`');
+ $removeItems->execute();
+ }
+
+ /**
+ * @medium
+ */
+ function testRemoveBrokenShares() {
+ // check if there are just 3 shares (see setUp - precondition: empty table)
+ $countShares = \OC_DB::prepare('SELECT COUNT(`id`) FROM `*PREFIX*share`');
+ $result = $countShares->execute()->fetchOne();
+ $this->assertEquals(3, $result);
+
+ // check if there are just 2 items (see setUp - precondition: empty table)
+ $countItems = \OC_DB::prepare('SELECT COUNT(`fileid`) FROM `*PREFIX*filecache`');
+ $result = $countItems->execute()->fetchOne();
+ $this->assertEquals(2, $result);
+
+ // execute actual code which should be tested
+ \OC\Files\Cache\Shared_Updater::fixBrokenSharesOnAppUpdate();
+
+ // check if there are just 2 shares (one gets killed by the code as there is no filecache entry for this)
+ $countShares = \OC_DB::prepare('SELECT COUNT(`id`) FROM `*PREFIX*share`');
+ $result = $countShares->execute()->fetchOne();
+ $this->assertEquals(2, $result);
+
+ // check if the share of file '200' is removed as there is no entry for this in filecache table
+ $countShares = \OC_DB::prepare('SELECT COUNT(`id`) FROM `*PREFIX*share` WHERE `file_source` = 200');
+ $result = $countShares->execute()->fetchOne();
+ $this->assertEquals(0, $result);
+
+ // check if there are just 2 items
+ $countItems = \OC_DB::prepare('SELECT COUNT(`fileid`) FROM `*PREFIX*filecache`');
+ $result = $countItems->execute()->fetchOne();
+ $this->assertEquals(2, $result);
+ }
+}
diff --git a/apps/user_ldap/l10n/el.php b/apps/user_ldap/l10n/el.php
index 1e975911953..926419d86b2 100644
--- a/apps/user_ldap/l10n/el.php
+++ b/apps/user_ldap/l10n/el.php
@@ -33,12 +33,14 @@ $TRANSLATIONS = array(
"Save" => "Αποθήκευση",
"Test Configuration" => "Δοκιμαστικες ρυθμισεις",
"Help" => "Βοήθεια",
+"Groups meeting these criteria are available in %s:" => "Οι ομάδες που πληρούν τα κριτήρια είναι διαθέσιμες σε %s:",
"only those object classes:" => "μόνο αυτές οι κλάσεις αντικειμένων:",
"only from those groups:" => "μόνο από αυτές τις ομάδες:",
"Edit raw filter instead" => "Επεξεργασία πρωτογενούς φίλτρου αντί αυτού",
"Raw LDAP filter" => "Πρωτογενές φίλτρο ",
"The filter specifies which LDAP groups shall have access to the %s instance." => "Το φίλτρο καθορίζει ποιες ομάδες LDAP θα έχουν πρόσβαση στην εγκατάσταση %s.",
"groups found" => "ομάδες βρέθηκαν",
+"Users login with this attribute:" => "Οι χρήστες εισέρχονται με αυτό το χαρακτηριστικό:",
"LDAP Username:" => "Όνομα χρήστη LDAP:",
"LDAP Email Address:" => "Διεύθυνση ηλ. ταχυδρομείου LDAP:",
"Other Attributes:" => "Άλλες Ιδιότητες:",
@@ -53,6 +55,7 @@ $TRANSLATIONS = array(
"For anonymous access, leave DN and Password empty." => "Για ανώνυμη πρόσβαση, αφήστε κενά τα πεδία DN και Pasword.",
"One Base DN per line" => "Ένα DN Βάσης ανά γραμμή ",
"You can specify Base DN for users and groups in the Advanced tab" => "Μπορείτε να καθορίσετε το Base DN για χρήστες και ομάδες από την καρτέλα Προηγμένες ρυθμίσεις",
+"Limit %s access to users meeting these criteria:" => "Περιορισμός της πρόσβασης %s σε χρήστες που πληρούν τα κριτήρια:",
"The filter specifies which LDAP users shall have access to the %s instance." => "Το φίλτρο καθορίζει ποιοι χρήστες LDAP θα έχουν πρόσβαση στην εγκατάσταση %s.",
"users found" => "χρήστες βρέθηκαν",
"Back" => "Επιστροφή",
@@ -85,6 +88,7 @@ $TRANSLATIONS = array(
"One Group Base DN per line" => "Μια ομαδικη Βάση DN ανά γραμμή",
"Group Search Attributes" => "Ομάδα Χαρακτηριστικων Αναζήτηση",
"Group-Member association" => "Group-Member association",
+"Nested Groups" => "Φωλιασμένες ομάδες",
"Special Attributes" => "Ειδικά Χαρακτηριστικά ",
"Quota Field" => "Ποσοσταση πεδιου",
"Quota Default" => "Προκαθισμενο πεδιο",
diff --git a/apps/user_ldap/l10n/et_EE.php b/apps/user_ldap/l10n/et_EE.php
index 090accceda0..9bf3a189efd 100644
--- a/apps/user_ldap/l10n/et_EE.php
+++ b/apps/user_ldap/l10n/et_EE.php
@@ -33,12 +33,14 @@ $TRANSLATIONS = array(
"Save" => "Salvesta",
"Test Configuration" => "Testi seadistust",
"Help" => "Abiinfo",
+"Groups meeting these criteria are available in %s:" => "Kriteeriumiga sobivad grupid on saadaval %s:",
"only those object classes:" => "ainult need objektiklassid:",
"only from those groups:" => "ainult nendest gruppidest:",
"Edit raw filter instead" => "Selle asemel muuda filtrit",
"Raw LDAP filter" => "LDAP filter",
"The filter specifies which LDAP groups shall have access to the %s instance." => "Filter määrab millised LDAP grupid saavad ligipääsu sellele %s instantsile.",
"groups found" => "gruppi leitud",
+"Users login with this attribute:" => "Logimiseks kasutatkse atribuuti: ",
"LDAP Username:" => "LDAP kasutajanimi:",
"LDAP Email Address:" => "LDAP e-posti aadress:",
"Other Attributes:" => "Muud atribuudid:",
@@ -53,6 +55,7 @@ $TRANSLATIONS = array(
"For anonymous access, leave DN and Password empty." => "Anonüümseks ligipääsuks jäta DN ja parool tühjaks.",
"One Base DN per line" => "Üks baas-DN rea kohta",
"You can specify Base DN for users and groups in the Advanced tab" => "Sa saad kasutajate ja gruppide baas DN-i määrata lisavalikute vahekaardilt",
+"Limit %s access to users meeting these criteria:" => "Piira %s liigpääs kriteeriumiga sobivatele kasutajatele:",
"The filter specifies which LDAP users shall have access to the %s instance." => "Filter määrab millised LDAP kasutajad pääsevad ligi %s instantsile.",
"users found" => "kasutajat leitud",
"Back" => "Tagasi",
@@ -85,6 +88,8 @@ $TRANSLATIONS = array(
"One Group Base DN per line" => "Üks grupi baas-DN rea kohta",
"Group Search Attributes" => "Grupi otsingu atribuudid",
"Group-Member association" => "Grupiliikme seotus",
+"Nested Groups" => "Sisegrupp",
+"When switched on, groups that contain groups are supported. (Only works if the group member attribute contains DNs.)" => "Sisse lülitamisel on toetatakse gruppe sisaldavad gruppe. (Toimib, kui grupi liikme atribuut sisaldab DN-e.)",
"Special Attributes" => "Spetsiifilised atribuudid",
"Quota Field" => "Mahupiirangu atribuut",
"Quota Default" => "Vaikimisi mahupiirang",
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 79c4ae224c3..ee4a7df3cb8 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -1,5 +1,5 @@
<form id="ldap" action="#" method="post">
- <div id="ldapSettings" class="personalblock">
+ <div id="ldapSettings" class="section">
<ul>
<?php foreach($_['toc'] as $id => $title) { ?>
<li id="<?php p($id); ?>"><a href="<?php p($id); ?>"><?php p($title); ?></a></li>
diff --git a/apps/user_webdavauth/templates/settings.php b/apps/user_webdavauth/templates/settings.php
index ad1701add8c..4596fdf3c78 100755
--- a/apps/user_webdavauth/templates/settings.php
+++ b/apps/user_webdavauth/templates/settings.php
@@ -1,9 +1,7 @@
-<form id="webdavauth" action="#" method="post">
- <fieldset class="personalblock">
- <h2><?php p($l->t('WebDAV Authentication'));?></h2>
- <p><label for="webdav_url"><?php p($l->t('Address: '));?><input type="url" placeholder="https://example.com/webdav" id="webdav_url" name="webdav_url" value="<?php p($_['webdav_url']); ?>"></label>
- <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">
- <input type="submit" value="Save" />
- <br /><?php p($l->t('The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials.')); ?>
- </fieldset>
+<form id="webdavauth" class="section" action="#" method="post">
+ <h2><?php p($l->t('WebDAV Authentication'));?></h2>
+ <p><label for="webdav_url"><?php p($l->t('Address: '));?><input type="url" placeholder="https://example.com/webdav" id="webdav_url" name="webdav_url" value="<?php p($_['webdav_url']); ?>"></label>
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" id="requesttoken">
+ <input type="submit" value="Save" />
+ <br /><?php p($l->t('The user credentials will be sent to this address. This plugin checks the response and will interpret the HTTP statuscodes 401 and 403 as invalid credentials, and all other responses as valid credentials.')); ?>
</form>