mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-11 00:15:34 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
6b7eb1cf3e
|
@ -6154,7 +6154,7 @@ class SeedDMS_Core_DocumentFile { /* {{{ */
|
|||
* @return boolean true on success
|
||||
*/
|
||||
function setDate($date) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
$db = $this->_document->_dms->getDB();
|
||||
|
||||
if(!$date)
|
||||
$date = time();
|
||||
|
|
|
@ -850,7 +850,7 @@ function insert_document($document) { /* {{{ */
|
|||
$filename = tempnam('/tmp', 'FOO');
|
||||
file_put_contents($filename, $filecontents);
|
||||
}
|
||||
$newDocument->addDocumentFile(
|
||||
$newfile = $newDocument->addDocumentFile(
|
||||
$file['attributes']['name'],
|
||||
$file['attributes']['comment'],
|
||||
$owner,
|
||||
|
@ -861,6 +861,7 @@ function insert_document($document) { /* {{{ */
|
|||
$file['attributes']['version'],
|
||||
$file['attributes']['public']
|
||||
);
|
||||
$newfile->setDate(dateToTimestamp($file['attributes']['date']));
|
||||
unlink($filename);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user