mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45: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
|
* @return boolean true on success
|
||||||
*/
|
*/
|
||||||
function setDate($date) { /* {{{ */
|
function setDate($date) { /* {{{ */
|
||||||
$db = $this->_dms->getDB();
|
$db = $this->_document->_dms->getDB();
|
||||||
|
|
||||||
if(!$date)
|
if(!$date)
|
||||||
$date = time();
|
$date = time();
|
||||||
|
|
|
@ -850,7 +850,7 @@ function insert_document($document) { /* {{{ */
|
||||||
$filename = tempnam('/tmp', 'FOO');
|
$filename = tempnam('/tmp', 'FOO');
|
||||||
file_put_contents($filename, $filecontents);
|
file_put_contents($filename, $filecontents);
|
||||||
}
|
}
|
||||||
$newDocument->addDocumentFile(
|
$newfile = $newDocument->addDocumentFile(
|
||||||
$file['attributes']['name'],
|
$file['attributes']['name'],
|
||||||
$file['attributes']['comment'],
|
$file['attributes']['comment'],
|
||||||
$owner,
|
$owner,
|
||||||
|
@ -861,6 +861,7 @@ function insert_document($document) { /* {{{ */
|
||||||
$file['attributes']['version'],
|
$file['attributes']['version'],
|
||||||
$file['attributes']['public']
|
$file['attributes']['public']
|
||||||
);
|
);
|
||||||
|
$newfile->setDate(dateToTimestamp($file['attributes']['date']));
|
||||||
unlink($filename);
|
unlink($filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user