summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/files/mapper.php24
-rw-r--r--lib/files/storage/mappedlocal.php6
-rw-r--r--lib/l10n/de.php4
-rw-r--r--lib/l10n/el.php13
-rw-r--r--lib/l10n/gl.php22
-rw-r--r--lib/l10n/pt_PT.php11
-rw-r--r--lib/l10n/ru.php8
7 files changed, 68 insertions, 20 deletions
diff --git a/lib/files/mapper.php b/lib/files/mapper.php
index cd163dcbfcd..520fadbd8c6 100644
--- a/lib/files/mapper.php
+++ b/lib/files/mapper.php
@@ -7,6 +7,12 @@ namespace OC\Files;
*/
class Mapper
{
+ private $unchangedPhysicalRoot;
+
+ public function __construct($rootDir) {
+ $this->unchangedPhysicalRoot = $rootDir;
+ }
+
/**
* @param string $logicPath
* @param bool $create indicates if the generated physical name shall be stored in the database or not
@@ -23,7 +29,7 @@ class Mapper
/**
* @param string $physicalPath
- * @return string|null
+ * @return string
*/
public function physicalToLogic($physicalPath) {
$logicPath = $this->resolvePhysicalPath($physicalPath);
@@ -39,6 +45,7 @@ class Mapper
* @param string $path
* @param bool $isLogicPath indicates if $path is logical or physical
* @param $recursive
+ * @return void
*/
public function removePath($path, $isLogicPath, $recursive) {
if ($recursive) {
@@ -159,14 +166,11 @@ class Mapper
}
private function slugifyPath($path, $index=null) {
+ $path = $this->stripRootFolder($path, $this->unchangedPhysicalRoot);
+
$pathElements = explode('/', $path);
$sluggedElements = array();
- // skip slugging the drive letter on windows - TODO: test if local path
- if (\OC_Util::runningOnWindows()) {
- $sluggedElements[]= $pathElements[0];
- array_shift($pathElements);
- }
foreach ($pathElements as $pathElement) {
// remove empty elements
if (empty($pathElement)) {
@@ -186,12 +190,8 @@ class Mapper
array_push($sluggedElements, $last.'-'.$index);
}
- // on non-windows systems add the leading / if necessary
- if (!\OC_Util::runningOnWindows() and $path[0] === '/') {
- return DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $sluggedElements);
- }
-
- return implode(DIRECTORY_SEPARATOR, $sluggedElements);
+ $sluggedPath = $this->unchangedPhysicalRoot.implode(DIRECTORY_SEPARATOR, $sluggedElements);
+ return $this->stripLast($sluggedPath);
}
/**
diff --git a/lib/files/storage/mappedlocal.php b/lib/files/storage/mappedlocal.php
index e707f71d71c..434c10bcbf7 100644
--- a/lib/files/storage/mappedlocal.php
+++ b/lib/files/storage/mappedlocal.php
@@ -20,7 +20,7 @@ class MappedLocal extends \OC\Files\Storage\Common{
$this->datadir.='/';
}
- $this->mapper= new \OC\Files\Mapper();
+ $this->mapper= new \OC\Files\Mapper($this->datadir);
}
public function __destruct() {
if (defined('PHPUNIT_RUN')) {
@@ -274,7 +274,7 @@ class MappedLocal extends \OC\Files\Storage\Common{
return $this->buildPath($path);
}
- protected function searchInDir($query, $dir='', $isLogicPath=true) {
+ protected function searchInDir($query, $dir='') {
$files=array();
$physicalDir = $this->buildPath($dir);
foreach (scandir($physicalDir) as $item) {
@@ -287,7 +287,7 @@ class MappedLocal extends \OC\Files\Storage\Common{
$files[]=$dir.'/'.$item;
}
if(is_dir($physicalItem)) {
- $files=array_merge($files, $this->searchInDir($query, $physicalItem, false));
+ $files=array_merge($files, $this->searchInDir($query, $dir.'/'.$item));
}
}
return $files;
diff --git a/lib/l10n/de.php b/lib/l10n/de.php
index f65ee5cfa3b..0ad254ad844 100644
--- a/lib/l10n/de.php
+++ b/lib/l10n/de.php
@@ -24,7 +24,7 @@
"%s you may not use dots in the database name" => "%s Der Datenbank-Name darf keine Punkte enthalten",
"%s set the database host." => "%s setze den Datenbank-Host",
"PostgreSQL username and/or password not valid" => "PostgreSQL Benutzername und/oder Passwort ungültig",
-"You need to enter either an existing account or the administrator." => "Sie müssen entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
+"You need to enter either an existing account or the administrator." => "Du musst entweder ein existierendes Benutzerkonto oder das Administratoren-Konto angeben.",
"Oracle username and/or password not valid" => "Oracle Benutzername und/oder Passwort ungültig",
"MySQL username and/or password not valid" => "MySQL Benutzername und/oder Passwort ungültig",
"DB Error: \"%s\"" => "DB Fehler: \"%s\"",
@@ -35,7 +35,7 @@
"Drop this user from MySQL." => "Lösche diesen Benutzer von MySQL.",
"Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhafter Befehl war: \"%s\", Name: %s, Passwort: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Dein Web-Server ist noch nicht für Datei-Synchronisation bereit, weil die WebDAV-Schnittstelle vermutlich defekt ist.",
-"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfen Sie die <a href='%s'>Instalationsanleitungen</a>.",
+"Please double check the <a href='%s'>installation guides</a>." => "Bitte prüfe die <a href='%s'>Instalationsanleitungen</a>.",
"seconds ago" => "Gerade eben",
"1 minute ago" => "Vor einer Minute",
"%d minutes ago" => "Vor %d Minuten",
diff --git a/lib/l10n/el.php b/lib/l10n/el.php
index cf0be24b432..e2e86edc4da 100644
--- a/lib/l10n/el.php
+++ b/lib/l10n/el.php
@@ -16,6 +16,19 @@
"Files" => "Αρχεία",
"Text" => "Κείμενο",
"Images" => "Εικόνες",
+"Set an admin username." => "Εισάγετε όνομα χρήστη διαχειριστή.",
+"Set an admin password." => "Εισάγετε συνθηματικό διαχειριστή.",
+"Specify a data folder." => "Καθορίστε τον φάκελο δεδομένων.",
+"PostgreSQL username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της PostgreSQL",
+"Oracle username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της Oracle",
+"MySQL username and/or password not valid" => "Μη έγκυρος χρήστης και/ή συνθηματικό της MySQL",
+"DB Error: \"%s\"" => "Σφάλμα Βάσης Δεδομένων: \"%s\"",
+"MySQL user '%s'@'localhost' exists already." => "Υπάρχει ήδη ο χρήστης '%s'@'localhost' της MySQL.",
+"Drop this user from MySQL" => "Απόρριψη αυτού του χρήστη από την MySQL",
+"MySQL user '%s'@'%%' already exists" => "Ο χρήστης '%s'@'%%' της MySQL υπάρχει ήδη",
+"Drop this user from MySQL." => "Απόρριψη αυτού του χρήστη από την MySQL",
+"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ο διακομιστής σας δεν έχει ρυθμιστεί κατάλληλα ώστε να επιτρέπει τον συγχρονισμό αρχείων γιατί η διεπαφή WebDAV πιθανόν να είναι κατεστραμμένη.",
+"Please double check the <a href='%s'>installation guides</a>." => "Ελέγξτε ξανά τις <a href='%s'>οδηγίες εγκατάστασης</a>.",
"seconds ago" => "δευτερόλεπτα πριν",
"1 minute ago" => "1 λεπτό πριν",
"%d minutes ago" => "%d λεπτά πριν",
diff --git a/lib/l10n/gl.php b/lib/l10n/gl.php
index c49e8134af1..9673bb65fc1 100644
--- a/lib/l10n/gl.php
+++ b/lib/l10n/gl.php
@@ -6,7 +6,7 @@
"Apps" => "Aplicativos",
"Admin" => "Administración",
"ZIP download is turned off." => "As descargas ZIP están desactivadas.",
-"Files need to be downloaded one by one." => "Os ficheiros necesitan seren descargados de un en un.",
+"Files need to be downloaded one by one." => "Os ficheiros necesitan seren descargados dun en un.",
"Back to Files" => "Volver aos ficheiros",
"Selected files too large to generate zip file." => "Os ficheiros seleccionados son demasiado grandes como para xerar un ficheiro zip.",
"couldn't be determined" => "non foi posíbel determinalo",
@@ -16,6 +16,24 @@
"Files" => "Ficheiros",
"Text" => "Texto",
"Images" => "Imaxes",
+"Set an admin username." => "Estabeleza un nome de usuario administrador",
+"Set an admin password." => "Estabeleza un contrasinal de administrador",
+"Specify a data folder." => "Especifique un cartafol de datos.",
+"%s enter the database username." => "%s introduza o nome de usuario da base de datos",
+"%s enter the database name." => "%s introduza o nome da base de datos",
+"%s you may not use dots in the database name" => "%s non se poden empregar puntos na base de datos",
+"%s set the database host." => "%s estabeleza o servidor da base de datos",
+"PostgreSQL username and/or password not valid" => "Nome de usuario e/ou contrasinal PostgreSQL incorrecto",
+"You need to enter either an existing account or the administrator." => "Deberá introducir unha conta existente ou o administrador.",
+"Oracle username and/or password not valid" => "Nome de usuario e/ou contrasinal Oracle incorrecto",
+"MySQL username and/or password not valid" => "Nome de usuario e/ou contrasinal MySQL incorrecto",
+"DB Error: \"%s\"" => "Produciuse un erro na base de datos: «%s»",
+"Offending command was: \"%s\"" => "A orde ofensiva foi: «%s»",
+"MySQL user '%s'@'localhost' exists already." => "O usuario MySQL '%s'@'localhost' xa existe.",
+"Drop this user from MySQL" => "Omitir este usuario de MySQL",
+"MySQL user '%s'@'%%' already exists" => "O usuario MySQL «%s»@«%%» xa existe.",
+"Drop this user from MySQL." => "Omitir este usuario de MySQL.",
+"Offending command was: \"%s\", name: %s, password: %s" => "A orde ofensiva foi: «%s», nome: %s, contrasinal: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "O seu servidor web non está aínda configurado adecuadamente para permitir a sincronización de ficheiros xa que semella que a interface WebDAV non está a funcionar.",
"Please double check the <a href='%s'>installation guides</a>." => "Volva comprobar as <a href='%s'>guías de instalación</a>",
"seconds ago" => "segundos atrás",
@@ -31,7 +49,7 @@
"last year" => "último ano",
"years ago" => "anos atrás",
"%s is available. Get <a href=\"%s\">more information</a>" => "%s está dispoñíbel. Obtéña <a href=\"%s\">máis información</a>",
-"up to date" => "ao día",
+"up to date" => "actualizado",
"updates check is disabled" => "a comprobación de actualizacións está desactivada",
"Could not find category \"%s\"" => "Non foi posíbel atopar a categoría «%s»"
);
diff --git a/lib/l10n/pt_PT.php b/lib/l10n/pt_PT.php
index a3585f914da..9bdcfcc9ced 100644
--- a/lib/l10n/pt_PT.php
+++ b/lib/l10n/pt_PT.php
@@ -23,8 +23,17 @@
"%s enter the database name." => "%s introduza o nome da base de dados",
"%s you may not use dots in the database name" => "%s não é permitido utilizar pontos (.) no nome da base de dados",
"%s set the database host." => "%s defina o servidor da base de dados (geralmente localhost)",
-"PostgreSQL username and/or password not valid" => "Nome de utilizador/passwor do PostgreSQL inválido",
+"PostgreSQL username and/or password not valid" => "Nome de utilizador/password do PostgreSQL inválido",
"You need to enter either an existing account or the administrator." => "Precisa de introduzir uma conta existente ou de administrador",
+"Oracle username and/or password not valid" => "Nome de utilizador/password do Oracle inválida",
+"MySQL username and/or password not valid" => "Nome de utilizador/password do MySQL inválida",
+"DB Error: \"%s\"" => "Erro na BD: \"%s\"",
+"Offending command was: \"%s\"" => "O comando gerador de erro foi: \"%s\"",
+"MySQL user '%s'@'localhost' exists already." => "O utilizador '%s'@'localhost' do MySQL já existe.",
+"Drop this user from MySQL" => "Eliminar este utilizador do MySQL",
+"MySQL user '%s'@'%%' already exists" => "O utilizador '%s'@'%%' do MySQL já existe",
+"Drop this user from MySQL." => "Eliminar este utilizador do MySQL",
+"Offending command was: \"%s\", name: %s, password: %s" => "O comando gerador de erro foi: \"%s\", nome: %s, password: %s",
"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "O seu servidor web não está configurado correctamente para autorizar sincronização de ficheiros, pois o interface WebDAV parece estar com problemas.",
"Please double check the <a href='%s'>installation guides</a>." => "Por favor verifique <a href='%s'>installation guides</a>.",
"seconds ago" => "há alguns segundos",
diff --git a/lib/l10n/ru.php b/lib/l10n/ru.php
index c0ffcd68064..7f1111376ef 100644
--- a/lib/l10n/ru.php
+++ b/lib/l10n/ru.php
@@ -19,15 +19,23 @@
"Set an admin username." => "Установить имя пользователя для admin.",
"Set an admin password." => "становит пароль для admin.",
"Specify a data folder." => "Указать папку данных.",
+"%s enter the database username." => "%s введите имя пользователя базы данных.",
+"%s enter the database name." => "%s введите имя базы данных.",
+"%s you may not use dots in the database name" => "%s Вы не можете использовать точки в имени базы данных",
+"%s set the database host." => "%s задайте хост базы данных.",
"PostgreSQL username and/or password not valid" => "Неверное имя пользователя и/или пароль PostgreSQL",
"You need to enter either an existing account or the administrator." => "Вы должны войти или в существующий аккаунт или под администратором.",
"Oracle username and/or password not valid" => "Неверное имя пользователя и/или пароль Oracle",
"MySQL username and/or password not valid" => "Неверное имя пользователя и/или пароль MySQL",
"DB Error: \"%s\"" => "Ошибка БД: \"%s\"",
+"Offending command was: \"%s\"" => "Вызываемая команда была: \"%s\"",
"MySQL user '%s'@'localhost' exists already." => "Пользователь MySQL '%s'@'localhost' уже существует.",
"Drop this user from MySQL" => "Удалить этого пользователя из MySQL",
"MySQL user '%s'@'%%' already exists" => "Пользователь MySQL '%s'@'%%' уже существует",
"Drop this user from MySQL." => "Удалить этого пользователя из MySQL.",
+"Offending command was: \"%s\", name: %s, password: %s" => "Вызываемая команда была: \"%s\", имя: %s, пароль: %s",
+"Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Ваш веб сервер до сих пор не настроен правильно для возможности синхронизации файлов, похоже что проблема в неисправности интерфейса WebDAV.",
+"Please double check the <a href='%s'>installation guides</a>." => "Пожалуйста, дважды просмотрите <a href='%s'>инструкции по установке</a>.",
"seconds ago" => "менее минуты",
"1 minute ago" => "1 минуту назад",
"%d minutes ago" => "%d минут назад",