mirror of
https://github.com/kd2org/picodav.git
synced 2024-12-22 13:42:14 +01:00
Send back displayname if requested
FossilOrigin-Name: 850952403fcbd033251778db0e7135ea064bddbf678683a0c34907b0d4dcb947
This commit is contained in:
parent
8ad0953bc5
commit
5c660d8ecc
2 changed files with 6 additions and 2 deletions
|
@ -1478,6 +1478,8 @@ namespace PicoDAV
|
|||
$target = $this->path . $uri;
|
||||
|
||||
switch ($name) {
|
||||
case 'DAV::displayname':
|
||||
return basename($uri);
|
||||
case 'DAV::getcontentlength':
|
||||
return is_dir($target) ? null : filesize($target);
|
||||
case 'DAV::getcontenttype':
|
||||
|
@ -1888,11 +1890,11 @@ RewriteRule ^.*$ /index.php [END]
|
|||
$fp = fopen(__FILE__, 'r');
|
||||
|
||||
if ($relative_uri == '.webdav/webdav.js') {
|
||||
fseek($fp, 50637, SEEK_SET);
|
||||
fseek($fp, 50694, SEEK_SET);
|
||||
echo fread($fp, 27769);
|
||||
}
|
||||
else {
|
||||
fseek($fp, 50637 + 27769, SEEK_SET);
|
||||
fseek($fp, 50694 + 27769, SEEK_SET);
|
||||
echo fread($fp, 7004);
|
||||
}
|
||||
|
||||
|
|
|
@ -197,6 +197,8 @@ namespace PicoDAV
|
|||
$target = $this->path . $uri;
|
||||
|
||||
switch ($name) {
|
||||
case 'DAV::displayname':
|
||||
return basename($uri);
|
||||
case 'DAV::getcontentlength':
|
||||
return is_dir($target) ? null : filesize($target);
|
||||
case 'DAV::getcontenttype':
|
||||
|
|
Loading…
Reference in a new issue