|
|
|
@ -210,27 +210,13 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr |
|
|
|
|
return $props; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Creates a ETag for this path. |
|
|
|
|
* @param string $path Path of the file |
|
|
|
|
* @return string|null Returns null if the ETag can not effectively be determined |
|
|
|
|
*/ |
|
|
|
|
static protected function createETag($path) { |
|
|
|
|
if(self::$ETagFunction) { |
|
|
|
|
$hash = call_user_func(self::$ETagFunction, $path); |
|
|
|
|
return $hash; |
|
|
|
|
}else{ |
|
|
|
|
return uniqid('', true); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Returns the ETag surrounded by double-quotes for this path. |
|
|
|
|
* @param string $path Path of the file |
|
|
|
|
* @return string|null Returns null if the ETag can not effectively be determined |
|
|
|
|
*/ |
|
|
|
|
static public function getETagPropertyForPath($path) { |
|
|
|
|
$tag = self::createETag($path); |
|
|
|
|
$tag = \OC\Files\Filesystem::getETag($path); |
|
|
|
|
if (empty($tag)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|