From 381e493a8c777a4e5e95fd72c6a7ed8114c3c978 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Wed, 25 Jul 2012 23:07:10 +0200 Subject: [PATCH] Rename functions getETagPropertyForFile -> getETagPropertyForPath removeETagPropertyForFile -> removeETagPropertyForPath --- lib/connector/sabre/directory.php | 2 +- lib/connector/sabre/file.php | 4 ++-- lib/connector/sabre/node.php | 4 ++-- lib/filesystem.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index 0842fc4fc6..7003a92027 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -52,7 +52,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa $newPath = $this->path . '/' . $name; OC_Filesystem::file_put_contents($newPath,$data); - return OC_Connector_Sabre_Node::getETagPropertyForFile($newPath); + return OC_Connector_Sabre_Node::getETagPropertyForPath($newPath); } /** diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php index 80f0a0ab4d..4fd5059107 100644 --- a/lib/connector/sabre/file.php +++ b/lib/connector/sabre/file.php @@ -47,7 +47,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D OC_Filesystem::file_put_contents($this->path,$data); - return OC_Connector_Sabre_Node::getETagPropertyForFile($this->path); + return OC_Connector_Sabre_Node::getETagPropertyForPath($this->path); } /** @@ -98,7 +98,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D if (isset($properties[self::GETETAG_PROPERTYNAME])) { return $properties[self::GETETAG_PROPERTYNAME]; } - return $this->getETagPropertyForFile($this->path); + return $this->getETagPropertyForPath($this->path); } /** diff --git a/lib/connector/sabre/node.php b/lib/connector/sabre/node.php index 663970487f..77aff92cc3 100644 --- a/lib/connector/sabre/node.php +++ b/lib/connector/sabre/node.php @@ -208,7 +208,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr * @param string $path Path of the file * @return string|null Returns null if the ETag can not effectively be determined */ - static public function getETagPropertyForFile($path) { + static public function getETagPropertyForPath($path) { $tag = OC_Filesystem::hash('md5', $path); if (empty($tag)) { return null; @@ -223,7 +223,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr * Remove the ETag from the cache. * @param string $path Path of the file */ - static public function removeETagPropertyForFile($path) { + static public function removeETagPropertyForPath($path) { $query = OC_DB::prepare( 'DELETE FROM *PREFIX*properties WHERE userid = ? AND propertypath = ? AND propertyname = ?' ); $query->execute( array( OC_User::getUser(), $path, self::GETETAG_PROPERTYNAME )); } diff --git a/lib/filesystem.php b/lib/filesystem.php index 81370d4e17..c87bc9ed9c 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -475,7 +475,7 @@ class OC_Filesystem{ static public function removeETagHook($params) { $path=$params['path']; - OC_Connector_Sabre_Node::removeETagPropertyForFile($path); + OC_Connector_Sabre_Node::removeETagPropertyForPath($path); } } OC_Hook::connect('OC_Filesystem','post_write', 'OC_Filesystem','removeETagHook');