mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
- fixed call of constructor of LetoDMS_DMS
- output of file size and modification time in GetDir()
This commit is contained in:
parent
2d02f7c6bf
commit
6587ae9aeb
|
@ -9,7 +9,7 @@ $db = new LetoDMS_Core_DatabaseAccess($g_config['type'], $g_config['hostname'],
|
||||||
$db->connect() or die ("Could not connect to db-server \"" . $g_config['hostname'] . "\"");
|
$db->connect() or die ("Could not connect to db-server \"" . $g_config['hostname'] . "\"");
|
||||||
$db->_conn->Execute("set names 'utf8'");
|
$db->_conn->Execute("set names 'utf8'");
|
||||||
|
|
||||||
$dms = new LetoDMS_Core_DMS($db, $g_config['contentDir'], $g_config['contentOffsetDir']);
|
$dms = new LetoDMS_Core_DMS($db, $g_config['contentDir'].$g_config['contentOffsetDir']);
|
||||||
|
|
||||||
$log = Log::factory('file', $g_config['logfile']);
|
$log = Log::factory('file', $g_config['logfile']);
|
||||||
|
|
||||||
|
|
|
@ -410,12 +410,23 @@ class HTTP_WebDAV_Server_LetoDMS extends HTTP_WebDAV_Server
|
||||||
if(get_class($obj) == 'LetoDMS_Core_Folder') {
|
if(get_class($obj) == 'LetoDMS_Core_Folder') {
|
||||||
$fullpath .= '/';
|
$fullpath .= '/';
|
||||||
$filename .= '/';
|
$filename .= '/';
|
||||||
|
$filesize = 0;
|
||||||
|
$mtime = $obj->getDate();
|
||||||
|
} else {
|
||||||
|
$content = $obj->getLatestContent();
|
||||||
|
|
||||||
|
$mimetype = $content->getMimeType();
|
||||||
|
|
||||||
|
$mtime = $content->getDate();
|
||||||
|
|
||||||
|
$fspath = $this->dms->contentDir.'/'.$content->getPath();
|
||||||
|
$filesize = filesize($fspath);
|
||||||
}
|
}
|
||||||
// $name = htmlspecialchars($filename);
|
// $name = htmlspecialchars($filename);
|
||||||
$name = $filename;
|
$name = $filename;
|
||||||
printf($format,
|
printf($format,
|
||||||
number_format(1000),
|
number_format($filesize),
|
||||||
strftime("%Y-%m-%d %H:%M:%S", time()),
|
strftime("%Y-%m-%d %H:%M:%S", $mtime),
|
||||||
"<a href='".$_SERVER['SCRIPT_NAME'].$fullpath."'>$name</a>");
|
"<a href='".$_SERVER['SCRIPT_NAME'].$fullpath."'>$name</a>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user