Rename functions

getETagPropertyForFile -> getETagPropertyForPath
removeETagPropertyForFile -> removeETagPropertyForPath
This commit is contained in:
Bart Visscher 2012-07-25 23:07:10 +02:00
parent f25ccaff59
commit 381e493a8c
4 changed files with 6 additions and 6 deletions

View File

@ -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);
}
/**

View File

@ -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);
}
/**

View File

@ -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 ));
}

View File

@ -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');