mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-10 13:42:41 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
b63ffa490b
|
@ -2399,7 +2399,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$err = SeedDMS_Core_File::copyFile($tmpFile, $this->_dms->contentDir . $file->getPath());
|
||||
if (!$err) return false;
|
||||
|
||||
return true;
|
||||
return $file;
|
||||
} /* }}} */
|
||||
|
||||
function removeDocumentFile($ID) { /* {{{ */
|
||||
|
@ -6145,6 +6145,31 @@ class SeedDMS_Core_DocumentFile { /* {{{ */
|
|||
} /* }}} */
|
||||
|
||||
function getDate() { return $this->_date; }
|
||||
|
||||
/**
|
||||
* Set creation date of the document file
|
||||
*
|
||||
* @param integer $date timestamp of creation date. If false then set it
|
||||
* to the current timestamp
|
||||
* @return boolean true on success
|
||||
*/
|
||||
function setDate($date) { /* {{{ */
|
||||
$db = $this->_dms->getDB();
|
||||
|
||||
if(!$date)
|
||||
$date = time();
|
||||
else {
|
||||
if(!is_numeric($date))
|
||||
return false;
|
||||
}
|
||||
|
||||
$queryStr = "UPDATE `tblDocumentFiles` SET `date` = " . (int) $date . " WHERE `id` = ". $this->_id;
|
||||
if (!$db->getResult($queryStr))
|
||||
return false;
|
||||
$this->_date = $date;
|
||||
return true;
|
||||
} /* }}} */
|
||||
|
||||
function getDir() { return $this->_dir; }
|
||||
function getFileType() { return $this->_fileType; }
|
||||
function getMimeType() { return $this->_mimeType; }
|
||||
|
|
|
@ -1560,6 +1560,8 @@ returns just users which are not disabled
|
|||
- add list of expired documents in SeedDMS_Core_DMS::getDocumentList()
|
||||
- add methods to set comment, name, public, version of document files
|
||||
- add method SeedDMS_Core_Document::transferToUser()
|
||||
- SeedDMS_Core_Document::addDocumentFile() returns object of file
|
||||
- add SeedDMS_Core_DocumentFile::setDate()
|
||||
</notes>
|
||||
</release>
|
||||
<release>
|
||||
|
|
Loading…
Reference in New Issue
Block a user