Rename functions
getETagPropertyForFile -> getETagPropertyForPath removeETagPropertyForFile -> removeETagPropertyForPath
This commit is contained in:
parent
f25ccaff59
commit
381e493a8c
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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 ));
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue