diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/l10n/nl.js | 2 | ||||
-rw-r--r-- | lib/l10n/nl.json | 2 | ||||
-rw-r--r-- | lib/private/files/cache/cache.php | 8 | ||||
-rw-r--r-- | lib/private/files/cache/updater.php | 5 | ||||
-rw-r--r-- | lib/private/files/view.php | 4 | ||||
-rw-r--r-- | lib/private/user.php | 3 |
6 files changed, 17 insertions, 7 deletions
diff --git a/lib/l10n/nl.js b/lib/l10n/nl.js index 9ec355862f3..e8b560b730f 100644 --- a/lib/l10n/nl.js +++ b/lib/l10n/nl.js @@ -14,7 +14,7 @@ OC.L10N.register( "Admin" : "Beheerder", "Recommended" : "Aanbevolen", "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de app niet compatible is met deze versie van ownCloud.", - "No app name specified" : "De app naam is niet gespecificeerd.", + "No app name specified" : "Geen app naam opgegeven.", "Unknown filetype" : "Onbekend bestandsformaat", "Invalid image" : "Ongeldige afbeelding", "web services under your control" : "Webdiensten in eigen beheer", diff --git a/lib/l10n/nl.json b/lib/l10n/nl.json index 43c46b25704..887ad23b35d 100644 --- a/lib/l10n/nl.json +++ b/lib/l10n/nl.json @@ -12,7 +12,7 @@ "Admin" : "Beheerder", "Recommended" : "Aanbevolen", "App \\\"%s\\\" can't be installed because it is not compatible with this version of ownCloud." : "App \\\"%s\\\" kan niet worden geïnstalleerd omdat de app niet compatible is met deze versie van ownCloud.", - "No app name specified" : "De app naam is niet gespecificeerd.", + "No app name specified" : "Geen app naam opgegeven.", "Unknown filetype" : "Onbekend bestandsformaat", "Invalid image" : "Ongeldige afbeelding", "web services under your control" : "Webdiensten in eigen beheer", diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php index 7ea00325a10..2c12f834518 100644 --- a/lib/private/files/cache/cache.php +++ b/lib/private/files/cache/cache.php @@ -71,7 +71,7 @@ class Cache { if (empty(self::$mimetypeIds)) { $this->loadMimetypes(); } - + if (!isset(self::$mimetypeIds[$mime])) { try{ $result = \OC_DB::executeAudited('INSERT INTO `*PREFIX*mimetypes`(`mimetype`) VALUES(?)', array($mime)); @@ -82,8 +82,8 @@ class Cache { \OC_Log::write('core', 'Exception during mimetype insertion: ' . $e->getmessage(), \OC_Log::DEBUG); return -1; } - } - + } + return self::$mimetypeIds[$mime]; } @@ -371,7 +371,7 @@ class Cache { $this->remove($child['path']); } } - + $sql = 'DELETE FROM `*PREFIX*filecache` WHERE `fileid` = ?'; \OC_DB::executeAudited($sql, array($entry['fileid'])); } diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index c303ff24b1f..31a4a7c21e7 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -30,6 +30,11 @@ class Updater { $this->propagator = new ChangePropagator($view); } + public function propagate($path, $time = null) { + $this->propagator->addChange($path); + $this->propagator->propagateChanges($time); + } + /** * Update the cache for $path * diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 5f5f29ded4f..0e4da30f7b9 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -902,7 +902,8 @@ class View { $scanner = $storage->getScanner($internalPath); $scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW); $data = $cache->get($internalPath); - } else if ($watcher->checkUpdate($internalPath, $data)) { + } else if (!Cache\Scanner::isPartialFile($internalPath) && $watcher->checkUpdate($internalPath, $data)) { + $this->updater->propagate($path); $data = $cache->get($internalPath); } @@ -974,6 +975,7 @@ class View { $scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW); $data = $cache->get($internalPath); } else if ($watcher->checkUpdate($internalPath, $data)) { + $this->updater->propagate($path); $data = $cache->get($internalPath); } diff --git a/lib/private/user.php b/lib/private/user.php index 2358f4a14e4..b2a235425c4 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -228,6 +228,9 @@ class OC_User { * Log in a user and regenerate a new session - if the password is ok */ public static function login($loginname, $password) { + $loginname = str_replace("\0", '', $loginname); + $password = str_replace("\0", '', $password); + session_regenerate_id(true); $result = self::getUserSession()->login($loginname, $password); if ($result) { |