mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +00:00
set propper last modification time
This commit is contained in:
parent
1cb1ffb436
commit
4dade8e5cd
|
@ -276,12 +276,11 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$info = array();
|
$info = array();
|
||||||
$info["props"] = array();
|
$info["props"] = array();
|
||||||
|
|
||||||
// modification time
|
|
||||||
$info["props"][] = $this->mkprop("getlastmodified", time());
|
|
||||||
|
|
||||||
// type and size (caller already made sure that path exists)
|
// type and size (caller already made sure that path exists)
|
||||||
if (get_class($obj) == 'SeedDMS_Core_Folder') {
|
if (get_class($obj) == 'SeedDMS_Core_Folder') {
|
||||||
|
// modification time
|
||||||
/* folders do not have a modification time */
|
/* folders do not have a modification time */
|
||||||
|
$info["props"][] = $this->mkprop("getlastmodified", time());
|
||||||
$info["props"][] = $this->mkprop("creationdate", time());
|
$info["props"][] = $this->mkprop("creationdate", time());
|
||||||
|
|
||||||
// directory (WebDAV collection)
|
// directory (WebDAV collection)
|
||||||
|
@ -301,6 +300,8 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
$info["props"][] = $this->mkprop("resourcetype", "collection");
|
$info["props"][] = $this->mkprop("resourcetype", "collection");
|
||||||
$info["props"][] = $this->mkprop("getcontenttype", "httpd/unix-directory");
|
$info["props"][] = $this->mkprop("getcontenttype", "httpd/unix-directory");
|
||||||
} else {
|
} else {
|
||||||
|
// modification time
|
||||||
|
$info["props"][] = $this->mkprop("getlastmodified",$obj->getLatestContent()->getDate());
|
||||||
$info["props"][] = $this->mkprop("creationdate", $obj->getDate());
|
$info["props"][] = $this->mkprop("creationdate", $obj->getDate());
|
||||||
|
|
||||||
// plain file (WebDAV resource)
|
// plain file (WebDAV resource)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user