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:
authorArthur Schiwon <blizzz@owncloud.com>2013-03-26 00:45:10 +0400
committerArthur Schiwon <blizzz@owncloud.com>2013-03-26 00:45:10 +0400
commit2e5829445f96e6f673dcde3a49231ac64660386e (patch)
tree829ecb9d40bd686a2fe4341874b46a3ce4f074d3
parente63a12a4812e1a738f7e586664b33bb95c81c473 (diff)
Adjust to Icewind's fix
-rw-r--r--lib/files/cache/upgrade.php51
1 files changed, 0 insertions, 51 deletions
diff --git a/lib/files/cache/upgrade.php b/lib/files/cache/upgrade.php
index 5e7b29322df..0d5bed5c817 100644
--- a/lib/files/cache/upgrade.php
+++ b/lib/files/cache/upgrade.php
@@ -136,7 +136,6 @@ class Upgrade {
$newData['storage_object'] = $storage;
$newData['mimetype'] = $this->getMimetypeId($newData['mimetype'], $storage);
$newData['mimepart'] = $this->getMimetypeId($newData['mimepart'], $storage);
- $newData['etag'] = $this->getETag($data['path'], $data['user'], $internalPath, $storage);
return $newData;
} else {
\OC_Log::write('core', 'Unable to migrate data from old cache for '.$data['path'].' because the storage was not found', \OC_Log::ERROR);
@@ -145,56 +144,6 @@ class Upgrade {
}
/**
- * get a file`s E-Tag
- *
- * @param string $legacyPath in the form of a legacy path
- * @param string $user the user ID the file referred to in path belongs to
- * @param string $internalPath
- * @param \OC\Files\Storage\Storage $storage
- * @return string Etag
- */
- function getETag($legacyPath, $user, $internalPath, $storage) {
- static $queryGetETag = null;
- static $queryCleanUp = null;
-
- //the path in the database is stored wo /$user/files
- //we need to strip it off, care is taken if user == files
- $offset = strpos($legacyPath, '/files/', 2) + 6;
- $legacyPath = substr($legacyPath, $offset);
-
- //Look for the E-Tag in the old database
- if(is_null($queryGetETag)) {
- $queryGetETag = \OC_DB::prepare('
- SELECT `propertyvalue`
- FROM `*PREFIX*properties`
- WHERE `propertyname` = \'{DAV:}getetag\'
- AND `propertypath` = ?
- AND `userid` = ?
- ', 1);
- }
- $result = $queryGetETag->execute(array($legacyPath, $user));
- $etag = $result->fetchOne();
-
- if($etag) {
- if(is_null($queryCleanUp)) {
- $queryCleanUp = \OC_DB::prepare('
- DELETE FROM `*PREFIX*properties`
- WHERE `propertyname` = \'{DAV:}getetag\'
- AND `propertypath` = ?
- AND `userid` = ?
- ');
- }
-
- //On success: remove the old DB entry and return the value
- $queryCleanUp->execute(array($legacyPath, $user));
- return $etag;
- }
-
- //No etag detected, determine it with new methods
- return $storage->getETag($internalPath);
- }
-
- /**
* get the numeric storage id
*
* @param \OC\Files\Storage\Storage $storage