Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-01 03:38:06 +0400
committerFlorin Peter <github@florin-peter.de>2013-05-01 03:38:06 +0400
commit3c100af1329c1c101f38f23f2d74710954387fdf (patch)
tree9b8dff5ea23da3ca6ed6984f8cec741143e42833 /apps/files_encryption
parent5deba29bdfedc3ee2babece9eafff0bb709cd90c (diff)
revert changes to fbbc76f281f50afa3072d99e4e0d413df835b3d3 because master is very unstable right now
Diffstat (limited to 'apps/files_encryption')
-rw-r--r--apps/files_encryption/hooks/hooks.php7
-rw-r--r--apps/files_encryption/l10n/ca.php2
-rw-r--r--apps/files_encryption/l10n/de.php2
-rw-r--r--apps/files_encryption/l10n/de_DE.php2
-rw-r--r--apps/files_encryption/l10n/el.php2
-rw-r--r--apps/files_encryption/l10n/eu.php2
-rw-r--r--apps/files_encryption/l10n/it.php2
-rw-r--r--apps/files_encryption/l10n/pl.php2
-rw-r--r--apps/files_encryption/l10n/pt_BR.php2
-rw-r--r--apps/files_encryption/l10n/ru.php2
-rw-r--r--apps/files_encryption/l10n/sk_SK.php2
-rw-r--r--apps/files_encryption/l10n/th_TH.php2
-rw-r--r--apps/files_encryption/l10n/vi.php2
-rwxr-xr-xapps/files_encryption/tests/crypt.php9
-rw-r--r--apps/files_encryption/tests/keymanager.php7
-rw-r--r--apps/files_encryption/tests/stream.php2
-rwxr-xr-xapps/files_encryption/tests/util.php9
17 files changed, 21 insertions, 37 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index e27054f0ec8..25c2d091c4b 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -45,12 +45,7 @@ class Hooks {
$view = new \OC_FilesystemView( '/' );
- $userHome = \OC_User::getHome($params['uid']);
- $dataDir = str_replace('/'.$params['uid'], '', $userHome);
-
- \OC\Files\Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => $dataDir .'/public-keys'), '/public-keys/' );
-
- $util = new Util( $view, $params['uid'] );
+ $util = new Util( $view, $params['uid'] );
// Check files_encryption infrastructure is ready for action
if ( ! $util->ready() ) {
diff --git a/apps/files_encryption/l10n/ca.php b/apps/files_encryption/l10n/ca.php
index ce9fe38996b..0c661353a77 100644
--- a/apps/files_encryption/l10n/ca.php
+++ b/apps/files_encryption/l10n/ca.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "L'encriptació de fitxers està activada.",
"The following file types will not be encrypted:" => "Els tipus de fitxers següents no s'encriptaran:",
"Exclude the following file types from encryption:" => "Exclou els tipus de fitxers següents de l'encriptatge:",
-"None" => "cap"
+"None" => "Cap"
);
diff --git a/apps/files_encryption/l10n/de.php b/apps/files_encryption/l10n/de.php
index bcf0ca5ad63..cdcd8a40b23 100644
--- a/apps/files_encryption/l10n/de.php
+++ b/apps/files_encryption/l10n/de.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Dateiverschlüsselung ist aktiviert",
"The following file types will not be encrypted:" => "Die folgenden Dateitypen werden nicht verschlüsselt:",
"Exclude the following file types from encryption:" => "Schließe die folgenden Dateitypen von der Verschlüsselung aus:",
-"None" => "Nichts"
+"None" => "Keine"
);
diff --git a/apps/files_encryption/l10n/de_DE.php b/apps/files_encryption/l10n/de_DE.php
index 71fd7d96711..4f08b98eb29 100644
--- a/apps/files_encryption/l10n/de_DE.php
+++ b/apps/files_encryption/l10n/de_DE.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Datei-Verschlüsselung ist aktiviert",
"The following file types will not be encrypted:" => "Die folgenden Dateitypen werden nicht verschlüsselt:",
"Exclude the following file types from encryption:" => "Die folgenden Dateitypen von der Verschlüsselung ausnehmen:",
-"None" => "Nichts"
+"None" => "Keine"
);
diff --git a/apps/files_encryption/l10n/el.php b/apps/files_encryption/l10n/el.php
index 82a4c92ec28..0031a731944 100644
--- a/apps/files_encryption/l10n/el.php
+++ b/apps/files_encryption/l10n/el.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Η κρυπτογράφηση αρχείων είναι ενεργή.",
"The following file types will not be encrypted:" => "Οι παρακάτω τύποι αρχείων δεν θα κρυπτογραφηθούν:",
"Exclude the following file types from encryption:" => "Εξαίρεση των παρακάτω τύπων αρχείων από την κρυπτογράφηση:",
-"None" => "Τίποτα"
+"None" => "Καμία"
);
diff --git a/apps/files_encryption/l10n/eu.php b/apps/files_encryption/l10n/eu.php
index 7e3b7611ff2..5a22b65728e 100644
--- a/apps/files_encryption/l10n/eu.php
+++ b/apps/files_encryption/l10n/eu.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Fitxategien enkriptazioa gaituta dago.",
"The following file types will not be encrypted:" => "Hurrengo fitxategi motak ez dira enkriptatuko:",
"Exclude the following file types from encryption:" => "Baztertu hurrengo fitxategi motak enkriptatzetik:",
-"None" => "Ezer"
+"None" => "Bat ere ez"
);
diff --git a/apps/files_encryption/l10n/it.php b/apps/files_encryption/l10n/it.php
index c7171345269..9ab9bc492a0 100644
--- a/apps/files_encryption/l10n/it.php
+++ b/apps/files_encryption/l10n/it.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "La cifratura dei file è abilitata.",
"The following file types will not be encrypted:" => "I seguenti tipi di file non saranno cifrati:",
"Exclude the following file types from encryption:" => "Escludi i seguenti tipi di file dalla cifratura:",
-"None" => "Nessuno"
+"None" => "Nessuna"
);
diff --git a/apps/files_encryption/l10n/pl.php b/apps/files_encryption/l10n/pl.php
index 836f5453596..2fa86f454f9 100644
--- a/apps/files_encryption/l10n/pl.php
+++ b/apps/files_encryption/l10n/pl.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Szyfrowanie plików jest włączone",
"The following file types will not be encrypted:" => "Poniższe typy plików nie będą szyfrowane:",
"Exclude the following file types from encryption:" => "Wyłącz poniższe typy plików z szyfrowania:",
-"None" => "Nic"
+"None" => "Brak"
);
diff --git a/apps/files_encryption/l10n/pt_BR.php b/apps/files_encryption/l10n/pt_BR.php
index b41c6ed3153..28807db72ce 100644
--- a/apps/files_encryption/l10n/pt_BR.php
+++ b/apps/files_encryption/l10n/pt_BR.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "A criptografia de arquivos está ativada.",
"The following file types will not be encrypted:" => "Os seguintes tipos de arquivo não serão criptografados:",
"Exclude the following file types from encryption:" => "Excluir os seguintes tipos de arquivo da criptografia:",
-"None" => "Nada"
+"None" => "Nenhuma"
);
diff --git a/apps/files_encryption/l10n/ru.php b/apps/files_encryption/l10n/ru.php
index f07dec621d7..22c1e3da374 100644
--- a/apps/files_encryption/l10n/ru.php
+++ b/apps/files_encryption/l10n/ru.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Шифрование файла включено.",
"The following file types will not be encrypted:" => "Следующие типы файлов не будут зашифрованы:",
"Exclude the following file types from encryption:" => "Исключить следующие типы файлов из шифрованных:",
-"None" => "Нет новостей"
+"None" => "Ничего"
);
diff --git a/apps/files_encryption/l10n/sk_SK.php b/apps/files_encryption/l10n/sk_SK.php
index aaea9da21b4..bebb6234710 100644
--- a/apps/files_encryption/l10n/sk_SK.php
+++ b/apps/files_encryption/l10n/sk_SK.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Šifrovanie súborov nastavené.",
"The following file types will not be encrypted:" => "Uvedené typy súborov nebudú šifrované:",
"Exclude the following file types from encryption:" => "Nešifrovať uvedené typy súborov",
-"None" => "Žiadny"
+"None" => "Žiadne"
);
diff --git a/apps/files_encryption/l10n/th_TH.php b/apps/files_encryption/l10n/th_TH.php
index 30c0324a988..e46d2491186 100644
--- a/apps/files_encryption/l10n/th_TH.php
+++ b/apps/files_encryption/l10n/th_TH.php
@@ -1,4 +1,4 @@
<?php $TRANSLATIONS = array(
"Encryption" => "การเข้ารหัส",
-"None" => "ไม่มี"
+"None" => "ไม่ต้อง"
);
diff --git a/apps/files_encryption/l10n/vi.php b/apps/files_encryption/l10n/vi.php
index 40d4b1d0fec..0a88d1b2db6 100644
--- a/apps/files_encryption/l10n/vi.php
+++ b/apps/files_encryption/l10n/vi.php
@@ -3,5 +3,5 @@
"File encryption is enabled." => "Mã hóa file đã mở",
"The following file types will not be encrypted:" => "Loại file sau sẽ không được mã hóa",
"Exclude the following file types from encryption:" => "Việc mã hóa không bao gồm loại file sau",
-"None" => "Không gì cả"
+"None" => "Không có gì hết"
);
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php
index 4a85048ba43..7f9572f4266 100755
--- a/apps/files_encryption/tests/crypt.php
+++ b/apps/files_encryption/tests/crypt.php
@@ -21,6 +21,7 @@ use OCA\Encryption;
// This has to go here because otherwise session errors arise, and the private
// encryption key needs to be saved in the session
+\OC_User::login( 'admin', 'admin' );
/**
* @note It would be better to use Mockery here for mocking out the session
@@ -36,7 +37,7 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
// reset backend
\OC_User::useBackend('database');
- // set content for encrypting / decrypting in tests
+ // set content for encrypting / decrypting in tests
$this->dataLong = file_get_contents( realpath( dirname(__FILE__).'/../lib/crypt.php' ) );
$this->dataShort = 'hats';
$this->dataUrl = realpath( dirname(__FILE__).'/../lib/crypt.php' );
@@ -59,17 +60,13 @@ class Test_Crypt extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::init($this->userId, '/');
\OC\Files\Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => $this->dataDir), '/' );
-
- $params['uid'] = $this->userId;
- $params['password'] = $this->pass;
- OCA\Encryption\Hooks::login($params);
}
function tearDown() {
}
- function testGenerateKey() {
+ function testGenerateKey() {
# TODO: use more accurate (larger) string length for test confirmation
diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php
index 33ca29997be..81034be54b1 100644
--- a/apps/files_encryption/tests/keymanager.php
+++ b/apps/files_encryption/tests/keymanager.php
@@ -19,7 +19,7 @@ use OCA\Encryption;
// This has to go here because otherwise session errors arise, and the private
// encryption key needs to be saved in the session
-//\OC_User::login( 'admin', 'admin' );
+\OC_User::login( 'admin', 'admin' );
class Test_Keymanager extends \PHPUnit_Framework_TestCase {
@@ -52,10 +52,7 @@ class Test_Keymanager extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::init( $this->userId, '/' );
\OC\Files\Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => $this->dataDir), '/' );
-
- $params['uid'] = $this->userId;
- $params['password'] = $this->pass;
- OCA\Encryption\Hooks::login($params);
+
}
function tearDown(){
diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php
index 633cc9e4fce..ba82ac80eab 100644
--- a/apps/files_encryption/tests/stream.php
+++ b/apps/files_encryption/tests/stream.php
@@ -1,4 +1,4 @@
-<?php
+// <?php
// /**
// * Copyright (c) 2012 Robin Appelman <icewind@owncloud.com>
// * This file is licensed under the Affero General Public License version 3 or
diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php
index e3ec0860fa5..0659b468a37 100755
--- a/apps/files_encryption/tests/util.php
+++ b/apps/files_encryption/tests/util.php
@@ -24,6 +24,8 @@ $loader->register();
use \Mockery as m;
use OCA\Encryption;
+\OC_User::login( 'admin', 'admin' );
+
class Test_Enc_Util extends \PHPUnit_Framework_TestCase {
function setUp() {
@@ -60,10 +62,6 @@ class Test_Enc_Util extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::init( $this->userId, '/' );
\OC\Files\Filesystem::mount( 'OC_Filestorage_Local', array('datadir' => $this->dataDir), '/' );
- $params['uid'] = $this->userId;
- $params['password'] = $this->pass;
- OCA\Encryption\Hooks::login($params);
-
$mockView = m::mock('OC_FilesystemView');
$this->util = new Encryption\Util( $mockView, $this->userId );
@@ -77,9 +75,6 @@ class Test_Enc_Util extends \PHPUnit_Framework_TestCase {
/**
* @brief test that paths set during User construction are correct
- *
- *
- *
*/
function testKeyPaths() {