diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/cache/cache.php | 2 | ||||
-rw-r--r-- | lib/files/cache/scanner.php | 31 | ||||
-rw-r--r-- | lib/l10n/de_DE.php | 18 | ||||
-rw-r--r-- | lib/l10n/fr.php | 18 | ||||
-rw-r--r-- | lib/l10n/hi.php | 7 | ||||
-rw-r--r-- | lib/l10n/ja_JP.php | 20 | ||||
-rw-r--r-- | lib/l10n/ru.php | 12 | ||||
-rw-r--r-- | lib/l10n/sk_SK.php | 18 |
8 files changed, 113 insertions, 13 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index dcb6e8fd39a..38b35c69def 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -56,7 +56,7 @@ class Cache { } else { $query = \OC_DB::prepare('INSERT INTO `*PREFIX*storages`(`id`) VALUES(?)'); $query->execute(array($this->storageId)); - $this->numericId = \OC_DB::insertid('*PREFIX*filecache'); + $this->numericId = \OC_DB::insertid('*PREFIX*storages'); } } diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index 5a9a119458e..88f208547f6 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -58,9 +58,10 @@ class Scanner { * scan a single file and store it in the cache * * @param string $file + * @param bool $checkExisting check existing folder sizes in the cache instead of always using -1 for folder size * @return array with metadata of the scanned file */ - public function scanFile($file) { + public function scanFile($file, $checkExisting = false) { \OC_Hook::emit('\OC\Files\Cache\Scanner', 'scan_file', array('path' => $file, 'storage' => $this->storageId)); $data = $this->getData($file); if ($data) { @@ -73,7 +74,15 @@ class Scanner { $this->scanFile($parent); } } - $id = $this->cache->put($file, $data); + if ($checkExisting and $cacheData = $this->cache->get($file)) { + if ($data['size'] === -1) { + $data['size'] = $cacheData['size']; + } + if ($data['mtime'] === $cacheData['mtime']) { + $data['etag'] = $cacheData['etag']; + } + } + $this->cache->put($file, $data); } return $data; } @@ -99,20 +108,18 @@ class Scanner { while ($file = readdir($dh)) { if (!$this->isIgnoredFile($file)) { $child = ($path) ? $path . '/' . $file : $file; - $data = $this->scanFile($child); + $data = $this->scanFile($child, $recursive === self::SCAN_SHALLOW); if ($data) { - if ($data['mimetype'] === 'httpd/unix-directory') { + if ($data['size'] === -1) { if ($recursive === self::SCAN_RECURSIVE) { $childQueue[] = $child; $data['size'] = 0; } else { - $data['size'] = -1; + $size = -1; } - } else { } - if ($data['size'] === -1) { - $size = -1; - } elseif ($size !== -1) { + + if ($size !== -1) { $size += $data['size']; } } @@ -133,7 +140,7 @@ class Scanner { } return $size; } - + /** * @brief check if the file should be ignored when scanning * NOTE: files with a '.part' extension are ignored as well! @@ -143,8 +150,8 @@ class Scanner { */ private function isIgnoredFile($file) { if ($file === '.' || $file === '..' - || pathinfo($file,PATHINFO_EXTENSION) === 'part') - { + || pathinfo($file, PATHINFO_EXTENSION) === 'part' + ) { return true; } return false; diff --git a/lib/l10n/de_DE.php b/lib/l10n/de_DE.php index 625ba2ecf20..dea1e6a8e42 100644 --- a/lib/l10n/de_DE.php +++ b/lib/l10n/de_DE.php @@ -16,6 +16,24 @@ "Files" => "Dateien", "Text" => "Text", "Images" => "Bilder", +"Set an admin username." => "Setze Administrator Benutzername.", +"Set an admin password." => "Setze Administrator Passwort", +"Specify a data folder." => "Spezifiziere Datei-Verzeichnis.", +"%s enter the database username." => "%s gib den Datenbank-Benutzernamen an.", +"%s enter the database name." => "%s gib den Datenbank-Namen an.", +"%s you may not use dots in the database name" => "%s du darfst keine Punkte im Datenbank-Namen verwenden", +"%s set the database host." => "%s setze den Datenbank-Host", +"PostgreSQL username and/or password not valid" => "PostgreSQL Benutzername und/oder Passwort nicht valide", +"You need to enter either an existing account or the administrator." => "Du musst einen bestehenden Account oder den Administrator angeben.", +"Oracle username and/or password not valid" => "Oracle Benutzername und/oder Passwort nicht valide", +"MySQL username and/or password not valid" => "MySQL Benutzername und/oder Passwort nicht valide", +"DB Error: \"%s\"" => "DB Fehler: \"%s\"", +"Offending command was: \"%s\"" => "Fehlerhaftes Kommando war: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "MySQL Benutzer '%s'@'localhost' existiert bereits.", +"Drop this user from MySQL" => "Lösche diesen Benutzer von MySQL", +"MySQL user '%s'@'%%' already exists" => "MySQL Benutzer '%s'@'%%' existiert bereits", +"Drop this user from MySQL." => "Lösche diesen Benutzer von MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "Fehlerhaftes Kommando war: \"%s\", Name: %s, Passwort: %s", "seconds ago" => "Gerade eben", "1 minute ago" => "Vor einer Minute", "%d minutes ago" => "Vor %d Minuten", diff --git a/lib/l10n/fr.php b/lib/l10n/fr.php index 852fe1ddc4a..fc44f976084 100644 --- a/lib/l10n/fr.php +++ b/lib/l10n/fr.php @@ -16,6 +16,24 @@ "Files" => "Fichiers", "Text" => "Texte", "Images" => "Images", +"Set an admin username." => "Spécifiez un nom d'utilisateur pour l'administrateur.", +"Set an admin password." => "Spécifiez un mot de passe administrateur.", +"Specify a data folder." => "Spécifiez un répertoire pour les données.", +"%s enter the database username." => "%s entrez le nom d'utilisateur de la base de données.", +"%s enter the database name." => "%s entrez le nom de la base de données.", +"%s you may not use dots in the database name" => "%s vous nez pouvez pas utiliser de points dans le nom de la base de données", +"%s set the database host." => "%s spécifiez l'hôte de la base de données.", +"PostgreSQL username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base PostgreSQL invalide", +"You need to enter either an existing account or the administrator." => "Vous devez spécifier soit le nom d'un compte existant, soit celui de l'administrateur.", +"Oracle username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base Oracle invalide", +"MySQL username and/or password not valid" => "Nom d'utilisateur et/ou mot de passe de la base MySQL invalide", +"DB Error: \"%s\"" => "Erreur de la base de données : \"%s\"", +"Offending command was: \"%s\"" => "La requête en cause est : \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "L'utilisateur MySQL '%s'@'localhost' existe déjà.", +"Drop this user from MySQL" => "Retirer cet utilisateur de la base MySQL", +"MySQL user '%s'@'%%' already exists" => "L'utilisateur MySQL '%s'@'%%' existe déjà", +"Drop this user from MySQL." => "Retirer cet utilisateur de la base MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "La requête en cause est : \"%s\", nom : %s, mot de passe : %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Votre serveur web, n'est pas correctement configuré pour permettre la synchronisation des fichiers, car l'interface WebDav ne fonctionne pas comme il faut.", "Please double check the <a href='%s'>installation guides</a>." => "Veuillez vous référer au <a href='%s'>guide d'installation</a>.", "seconds ago" => "à l'instant", diff --git a/lib/l10n/hi.php b/lib/l10n/hi.php new file mode 100644 index 00000000000..f507993f494 --- /dev/null +++ b/lib/l10n/hi.php @@ -0,0 +1,7 @@ +<?php $TRANSLATIONS = array( +"Help" => "सहयोग", +"Personal" => "यक्तिगत", +"Settings" => "सेटिंग्स", +"Users" => "उपयोगकर्ता", +"Apps" => "Apps" +); diff --git a/lib/l10n/ja_JP.php b/lib/l10n/ja_JP.php index 11cefe900c2..51b5b40940a 100644 --- a/lib/l10n/ja_JP.php +++ b/lib/l10n/ja_JP.php @@ -16,6 +16,26 @@ "Files" => "ファイル", "Text" => "TTY TDD", "Images" => "画像", +"Set an admin username." => "管理者のユーザ名を設定。", +"Set an admin password." => "管理者のパスワードを設定。", +"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\"" => "DBエラー: \"%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インタフェースが動作していないと考えられるため、あなたのWEBサーバはまだファイルの同期を許可するように適切な設定がされていません。", +"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/ru.php b/lib/l10n/ru.php index 5ef2cca3be3..c0ffcd68064 100644 --- a/lib/l10n/ru.php +++ b/lib/l10n/ru.php @@ -16,6 +16,18 @@ "Files" => "Файлы", "Text" => "Текст", "Images" => "Изображения", +"Set an admin username." => "Установить имя пользователя для admin.", +"Set an admin password." => "становит пароль для admin.", +"Specify a data folder." => "Указать папку данных.", +"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\"", +"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.", "seconds ago" => "менее минуты", "1 minute ago" => "1 минуту назад", "%d minutes ago" => "%d минут назад", diff --git a/lib/l10n/sk_SK.php b/lib/l10n/sk_SK.php index 16df7f2e199..97a4999407f 100644 --- a/lib/l10n/sk_SK.php +++ b/lib/l10n/sk_SK.php @@ -16,6 +16,24 @@ "Files" => "Súbory", "Text" => "Text", "Images" => "Obrázky", +"Set an admin username." => "Zadajte používateľské meno administrátora.", +"Set an admin password." => "Zadajte heslo administrátora.", +"Specify a data folder." => "Zadajte priečinok pre dáta.", +"%s enter the database username." => "Zadajte používateľské meno %s databázy..", +"%s enter the database name." => "Zadajte názov databázy pre %s databázy.", +"%s you may not use dots in the database name" => "V názve databázy %s nemôžete používať bodky", +"%s set the database host." => "Zadajte názov počítača s databázou %s.", +"PostgreSQL username and/or password not valid" => "Používateľské meno a/alebo heslo pre PostgreSQL databázu je neplatné", +"You need to enter either an existing account or the administrator." => "Musíte zadať jestvujúci účet alebo administrátora.", +"Oracle username and/or password not valid" => "Používateľské meno a/alebo heslo pre Oracle databázu je neplatné", +"MySQL username and/or password not valid" => "Používateľské meno a/alebo heslo pre MySQL databázu je neplatné", +"DB Error: \"%s\"" => "Chyba DB: \"%s\"", +"Offending command was: \"%s\"" => "Podozrivý príkaz bol: \"%s\"", +"MySQL user '%s'@'localhost' exists already." => "Používateľ '%s'@'localhost' už v MySQL existuje.", +"Drop this user from MySQL" => "Zahodiť používateľa z MySQL.", +"MySQL user '%s'@'%%' already exists" => "Používateľ '%s'@'%%' už v MySQL existuje", +"Drop this user from MySQL." => "Zahodiť používateľa z MySQL.", +"Offending command was: \"%s\", name: %s, password: %s" => "Podozrivý príkaz bol: \"%s\", meno: %s, heslo: %s", "Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken." => "Váš webový server nie je správne nastavený na synchronizáciu, pretože rozhranie WebDAV je poškodené.", "Please double check the <a href='%s'>installation guides</a>." => "Prosím skontrolujte <a href='%s'>inštalačnú príručku</a>.", "seconds ago" => "pred sekundami", |