summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2016-06-09 17:41:57 +0200
committerblizzz <blizzz@arthur-schiwon.de>2016-06-09 17:41:57 +0200
commit51fd2602a77d8d885c53d24ebb8f72be62dc52ce (patch)
tree2c38e740669ab2fa6ab50615187d01b9d6dc00d1 /apps/files_external
parentb688aac402cf9d7ee08252077d37ea1c43b22f4a (diff)
downloadnextcloud-server-51fd2602a77d8d885c53d24ebb8f72be62dc52ce.tar.gz
nextcloud-server-51fd2602a77d8d885c53d24ebb8f72be62dc52ce.zip
Revert "Downstream 2016-06-08"
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/l10n/pt_PT.js14
-rw-r--r--apps/files_external/l10n/pt_PT.json14
-rw-r--r--apps/files_external/lib/Lib/Storage/Google.php16
-rw-r--r--apps/files_external/tests/Storage/GoogleTest.php9
4 files changed, 15 insertions, 38 deletions
diff --git a/apps/files_external/l10n/pt_PT.js b/apps/files_external/l10n/pt_PT.js
index 68f183a36b3..9d3998d903b 100644
--- a/apps/files_external/l10n/pt_PT.js
+++ b/apps/files_external/l10n/pt_PT.js
@@ -7,13 +7,13 @@ OC.L10N.register(
"Step 1 failed. Exception: %s" : "Passo 1 falhou. Exceção: %s",
"Step 2 failed. Exception: %s" : "Passo 2 falhou. Exceção: %s",
"External storage" : "Armazenamento Externo",
- "Dropbox App Configuration" : "Configuração da aplicação Dropbox",
- "Google Drive App Configuration" : "Configuração da aplicação Google Drive",
+ "Dropbox App Configuration" : "Configuração da app Dropbox",
+ "Google Drive App Configuration" : "Configuração da app Google Drive",
"Personal" : "Pessoal",
"System" : "Sistema",
"Grant access" : "Conceder acesso",
- "Error configuring OAuth1" : "Erro ao configurar OAuth1",
- "Error configuring OAuth2" : "Erro ao configurar OAuth2",
+ "Error configuring OAuth1" : "Erro de configuração OAuth1",
+ "Error configuring OAuth2" : "Erro de configuração OAuth2",
"Generate keys" : "Gerar chaves",
"Error generating key pair" : "Erro ao gerar chave par",
"All users. Type to select user or group." : "Todos os utilizadores. Digite para selecionar o utilizador ou grupo.",
@@ -27,14 +27,14 @@ OC.L10N.register(
"Couldn't get the list of external mount points: {type}" : "Não foi possível conseguir a lista de pontos de montagem externos: {type}",
"There was an error with message: " : "Houve um erro com a mensagem:",
"External mount error" : "Erro de montagem externa",
- "external-storage" : "armazenamento externo",
+ "external-storage" : "Armazenamento Externo",
"Couldn't get the list of Windows network drive mount points: empty response from the server" : "Não foi possível conseguir a lista de pontos de montagem Windows na rede: resposta vazia do servidor",
"Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Alguns dos pontos de montagem externos configurados não estão conectados. Por favor, clique na fila vermelha para mais informação",
"Please enter the credentials for the {mount} mount" : "Por favor, introduza as credenciais para {mount}",
"Username" : "Nome de utilizador",
"Password" : "Palavra-passe",
"Credentials saved" : "Credenciais guardadas",
- "Credentials saving failed" : "Falha ao guardar as credenciais",
+ "Credentials saving failed" : "Falha ao salvar credenciais",
"Credentials required" : "Credenciais necessárias",
"Save" : "Guardar",
"Storage with id \"%i\" not found" : "Não foi encontrado o armazenamento com a id. \"%i\"",
@@ -49,7 +49,7 @@ OC.L10N.register(
"Insufficient data: %s" : "Dados insuficientes: %s",
"%s" : "%s",
"Storage with id \"%i\" is not user editable" : "Armazenamento com id \"%i\" não é editável pelo utilizador",
- "Access key" : "Chave de acesso",
+ "Access key" : "Código de acesso",
"Secret key" : "Código secreto",
"Builtin" : "Integrado",
"None" : "Nenhum",
diff --git a/apps/files_external/l10n/pt_PT.json b/apps/files_external/l10n/pt_PT.json
index 93922c67762..fab0f05a830 100644
--- a/apps/files_external/l10n/pt_PT.json
+++ b/apps/files_external/l10n/pt_PT.json
@@ -5,13 +5,13 @@
"Step 1 failed. Exception: %s" : "Passo 1 falhou. Exceção: %s",
"Step 2 failed. Exception: %s" : "Passo 2 falhou. Exceção: %s",
"External storage" : "Armazenamento Externo",
- "Dropbox App Configuration" : "Configuração da aplicação Dropbox",
- "Google Drive App Configuration" : "Configuração da aplicação Google Drive",
+ "Dropbox App Configuration" : "Configuração da app Dropbox",
+ "Google Drive App Configuration" : "Configuração da app Google Drive",
"Personal" : "Pessoal",
"System" : "Sistema",
"Grant access" : "Conceder acesso",
- "Error configuring OAuth1" : "Erro ao configurar OAuth1",
- "Error configuring OAuth2" : "Erro ao configurar OAuth2",
+ "Error configuring OAuth1" : "Erro de configuração OAuth1",
+ "Error configuring OAuth2" : "Erro de configuração OAuth2",
"Generate keys" : "Gerar chaves",
"Error generating key pair" : "Erro ao gerar chave par",
"All users. Type to select user or group." : "Todos os utilizadores. Digite para selecionar o utilizador ou grupo.",
@@ -25,14 +25,14 @@
"Couldn't get the list of external mount points: {type}" : "Não foi possível conseguir a lista de pontos de montagem externos: {type}",
"There was an error with message: " : "Houve um erro com a mensagem:",
"External mount error" : "Erro de montagem externa",
- "external-storage" : "armazenamento externo",
+ "external-storage" : "Armazenamento Externo",
"Couldn't get the list of Windows network drive mount points: empty response from the server" : "Não foi possível conseguir a lista de pontos de montagem Windows na rede: resposta vazia do servidor",
"Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Alguns dos pontos de montagem externos configurados não estão conectados. Por favor, clique na fila vermelha para mais informação",
"Please enter the credentials for the {mount} mount" : "Por favor, introduza as credenciais para {mount}",
"Username" : "Nome de utilizador",
"Password" : "Palavra-passe",
"Credentials saved" : "Credenciais guardadas",
- "Credentials saving failed" : "Falha ao guardar as credenciais",
+ "Credentials saving failed" : "Falha ao salvar credenciais",
"Credentials required" : "Credenciais necessárias",
"Save" : "Guardar",
"Storage with id \"%i\" not found" : "Não foi encontrado o armazenamento com a id. \"%i\"",
@@ -47,7 +47,7 @@
"Insufficient data: %s" : "Dados insuficientes: %s",
"%s" : "%s",
"Storage with id \"%i\" is not user editable" : "Armazenamento com id \"%i\" não é editável pelo utilizador",
- "Access key" : "Chave de acesso",
+ "Access key" : "Código de acesso",
"Secret key" : "Código secreto",
"Builtin" : "Integrado",
"None" : "Nenhum",
diff --git a/apps/files_external/lib/Lib/Storage/Google.php b/apps/files_external/lib/Lib/Storage/Google.php
index 49fde7d066f..2a1ff768e2c 100644
--- a/apps/files_external/lib/Lib/Storage/Google.php
+++ b/apps/files_external/lib/Lib/Storage/Google.php
@@ -97,9 +97,6 @@ class Google extends \OC\Files\Storage\Common {
private function getDriveFile($path) {
// Remove leading and trailing slashes
$path = trim($path, '/');
- if ($path === '.') {
- $path = '';
- }
if (isset($this->driveFiles[$path])) {
return $this->driveFiles[$path];
} else if ($path === '') {
@@ -141,7 +138,7 @@ class Google extends \OC\Files\Storage\Common {
if ($pos !== false) {
$pathWithoutExt = substr($path, 0, $pos);
$file = $this->getDriveFile($pathWithoutExt);
- if ($file && $this->isGoogleDocFile($file)) {
+ if ($file) {
// Switch cached Google_Service_Drive_DriveFile to the correct index
unset($this->driveFiles[$pathWithoutExt]);
$this->driveFiles[$path] = $file;
@@ -211,17 +208,6 @@ class Google extends \OC\Files\Storage\Common {
}
}
- /**
- * Returns whether the given drive file is a Google Doc file
- *
- * @param \Google_Service_Drive_DriveFile
- *
- * @return true if the file is a Google Doc file, false otherwise
- */
- private function isGoogleDocFile($file) {
- return $this->getGoogleDocExtension($file->getMimeType()) !== '';
- }
-
public function mkdir($path) {
if (!$this->is_dir($path)) {
$parentFolder = $this->getDriveFile(dirname($path));
diff --git a/apps/files_external/tests/Storage/GoogleTest.php b/apps/files_external/tests/Storage/GoogleTest.php
index eb19cc463b1..7684fec8429 100644
--- a/apps/files_external/tests/Storage/GoogleTest.php
+++ b/apps/files_external/tests/Storage/GoogleTest.php
@@ -60,13 +60,4 @@ class GoogleTest extends \Test\Files\Storage\Storage {
parent::tearDown();
}
-
- public function testSameNameAsFolderWithExtension() {
- $this->assertTrue($this->instance->mkdir('testsamename'));
- $this->assertEquals(13, $this->instance->file_put_contents('testsamename.txt', 'some contents'));
- $this->assertEquals('some contents', $this->instance->file_get_contents('testsamename.txt'));
- $this->assertTrue($this->instance->is_dir('testsamename'));
- $this->assertTrue($this->instance->unlink('testsamename.txt'));
- $this->assertTrue($this->instance->rmdir('testsamename'));
- }
}