mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
user getCurrentTimestamp() and getCurrentDatetime()
This commit is contained in:
parent
4ffa4399a2
commit
daa72a9ca3
|
@ -1591,7 +1591,7 @@ class SeedDMS_Core_DMS {
|
|||
*/
|
||||
function createPasswordRequest($user) { /* {{{ */
|
||||
$hash = md5(uniqid(time()));
|
||||
$queryStr = "INSERT INTO tblUserPasswordRequest (userID, hash, `date`) VALUES (" . $user->getId() . ", " . $this->db->qstr($hash) .", ".$db->getCurrentTimestamp().")";
|
||||
$queryStr = "INSERT INTO tblUserPasswordRequest (userID, hash, `date`) VALUES (" . $user->getId() . ", " . $this->db->qstr($hash) .", ".$db->getCurrentDatetime().")";
|
||||
$resArr = $this->db->getResult($queryStr);
|
||||
if (is_bool($resArr) && !$resArr) return false;
|
||||
return $hash;
|
||||
|
|
|
@ -1158,8 +1158,6 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
// the doc path is id/version.filetype
|
||||
$dir = $this->getDir();
|
||||
|
||||
$date = time();
|
||||
|
||||
/* The version field in table tblDocumentContent used to be auto
|
||||
* increment but that requires the field to be primary as well if
|
||||
* innodb is used. That's why the version is now determined here.
|
||||
|
@ -1178,7 +1176,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
$db->startTransaction();
|
||||
$queryStr = "INSERT INTO tblDocumentContent (document, version, comment, date, createdBy, dir, orgFileName, fileType, mimeType, fileSize, checksum) VALUES ".
|
||||
"(".$this->_id.", ".(int)$version.",".$db->qstr($comment).", ".$date.", ".$user->getID().", ".$db->qstr($dir).", ".$db->qstr($orgFileName).", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$filesize.", ".$db->qstr($checksum).")";
|
||||
"(".$this->_id.", ".(int)$version.",".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$user->getID().", ".$db->qstr($dir).", ".$db->qstr($orgFileName).", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$filesize.", ".$db->qstr($checksum).")";
|
||||
if (!$db->getResult($queryStr)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
@ -1198,7 +1196,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
unset($this->_content);
|
||||
unset($this->_latestContent);
|
||||
$content = new SeedDMS_Core_DocumentContent($contentID, $this, $version, $comment, $date, $user->getID(), $dir, $orgFileName, $fileType, $mimeType, $filesize, $checksum);
|
||||
$content = $this->getLatestContent($contentID);
|
||||
// $content = new SeedDMS_Core_DocumentContent($contentID, $this, $version, $comment, $date, $user->getID(), $dir, $orgFileName, $fileType, $mimeType, $filesize, $checksum);
|
||||
if($workflow)
|
||||
$content->setWorkflow($workflow, $user);
|
||||
$docResultSet = new SeedDMS_Core_AddContentResultSet($content);
|
||||
|
@ -1282,7 +1281,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$comment = "";
|
||||
}
|
||||
$queryStr = "INSERT INTO `tblDocumentStatusLog` (`statusID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $statusID ."', '". $status."', 'New document content submitted". $comment ."', ".$db->getCurrentTimestamp().", '". $user->getID() ."')";
|
||||
"VALUES ('". $statusID ."', '". $status."', 'New document content submitted". $comment ."', ".$db->getCurrentDatetime().", '". $user->getID() ."')";
|
||||
if (!$db->getResult($queryStr)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
@ -1321,8 +1320,6 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
// the doc path is id/version.filetype
|
||||
$dir = $this->getDir();
|
||||
|
||||
$date = time();
|
||||
|
||||
/* If $version < 1 than replace the content of the latest version.
|
||||
*/
|
||||
if ((int) $version<1) {
|
||||
|
@ -1356,7 +1353,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$checksum = SeedDMS_Core_File::checksum($tmpFile);
|
||||
|
||||
$db->startTransaction();
|
||||
$queryStr = "UPDATE tblDocumentContent set date=".$date.", fileSize=".$filesize.", checksum=".$db->qstr($checksum)." WHERE id=".$content->getID();
|
||||
$queryStr = "UPDATE tblDocumentContent set date=".$db->getCurrentTimestamp().", fileSize=".$filesize.", checksum=".$db->qstr($checksum)." WHERE id=".$content->getID();
|
||||
if (!$db->getResult($queryStr)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
@ -1731,7 +1728,7 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
|||
$dir = $this->getDir();
|
||||
|
||||
$queryStr = "INSERT INTO tblDocumentFiles (comment, date, dir, document, fileType, mimeType, orgFileName, userID, name) VALUES ".
|
||||
"(".$db->qstr($comment).", '".time()."', ".$db->qstr($dir).", ".$this->_id.", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$db->qstr($orgFileName).",".$user->getID().",".$db->qstr($name).")";
|
||||
"(".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$db->qstr($dir).", ".$this->_id.", ".$db->qstr($fileType).", ".$db->qstr($mimeType).", ".$db->qstr($orgFileName).",".$user->getID().",".$db->qstr($name).")";
|
||||
if (!$db->getResult($queryStr)) return false;
|
||||
|
||||
$id = $db->getInsertID();
|
||||
|
@ -2265,6 +2262,10 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
if(!$date)
|
||||
$date = time();
|
||||
else {
|
||||
if(!is_numeric($date))
|
||||
return false;
|
||||
}
|
||||
|
||||
$queryStr = "UPDATE tblDocumentContent SET date = ".(int) $date." WHERE `document` = " . $this->_document->getID() . " AND `version` = " . $this->_version;
|
||||
if (!$db->getResult($queryStr))
|
||||
|
@ -2521,7 +2522,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if($date)
|
||||
$ddate = $db->qstr($date);
|
||||
else
|
||||
$ddate = $db->getCurrentTimestamp();
|
||||
$ddate = $db->getCurrentDatetime();
|
||||
$queryStr = "INSERT INTO `tblDocumentStatusLog` (`statusID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $this->_status["statusID"] ."', '". (int) $status ."', ".$db->qstr($comment).", ".$ddate.", '". $updateUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
|
@ -2918,7 +2919,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $reviewID ."', '0', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $reviewID ."', '0', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -2976,7 +2977,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $reviewID ."', '0', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $reviewID ."', '0', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3033,7 +3034,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`,
|
||||
`comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $indstatus["reviewID"] ."', '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentTimestamp().", '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
||||
$requestUser->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res)
|
||||
|
@ -3085,7 +3086,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`,
|
||||
`comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $reviewStatus[0]["reviewID"] ."', '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentTimestamp().", '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
||||
$requestUser->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res)
|
||||
|
@ -3151,7 +3152,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $approveID ."', '0', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $approveID ."', '0', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3207,7 +3208,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $approveID ."', '0', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $approveID ."', '0', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3268,7 +3269,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`,
|
||||
`comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $indstatus["approveID"] ."', '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentTimestamp().", '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
||||
$requestUser->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res)
|
||||
|
@ -3312,7 +3313,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`,
|
||||
`comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $approvalStatus[0]["approveID"] ."', '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentTimestamp().", '".
|
||||
(int) $status ."', ".$db->qstr($comment).", ".$db->getCurrentDatetime().", '".
|
||||
$requestUser->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res)
|
||||
|
@ -3348,7 +3349,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $indstatus["reviewID"] ."', '-2', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $indstatus["reviewID"] ."', '-2', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3379,7 +3380,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $reviewStatus[0]["reviewID"] ."', '-2', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $reviewStatus[0]["reviewID"] ."', '-2', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3411,7 +3412,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $indstatus["approveID"] ."', '-2', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $indstatus["approveID"] ."', '-2', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3442,7 +3443,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
}
|
||||
|
||||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $approvalStatus[0]["approveID"] ."', '-2', '', ".$db->getCurrentTimestamp().", '". $requestUser->getID() ."')";
|
||||
"VALUES ('". $approvalStatus[0]["approveID"] ."', '-2', '', ".$db->getCurrentDatetime().", '". $requestUser->getID() ."')";
|
||||
$res = $db->getResult($queryStr);
|
||||
if (is_bool($res) && !$res) {
|
||||
return -1;
|
||||
|
@ -3511,7 +3512,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
if($workflow && is_object($workflow)) {
|
||||
$db->startTransaction();
|
||||
$initstate = $workflow->getInitState();
|
||||
$queryStr = "INSERT INTO tblWorkflowDocumentContent (workflow, document, version, state, date) VALUES (". $workflow->getID(). ", ". $this->_document->getID() .", ". $this->_version .", ".$initstate->getID().", ".$db->getCurrentTimestamp().")";
|
||||
$queryStr = "INSERT INTO tblWorkflowDocumentContent (workflow, document, version, state, date) VALUES (". $workflow->getID(). ", ". $this->_document->getID() .", ". $this->_version .", ".$initstate->getID().", ".$db->getCurrentDatetime().")";
|
||||
if (!$db->getResult($queryStr)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
@ -3692,7 +3693,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
|
||||
if($subworkflow) {
|
||||
$initstate = $subworkflow->getInitState();
|
||||
$queryStr = "INSERT INTO tblWorkflowDocumentContent (parentworkflow, workflow, document, version, state, date) VALUES (". $this->_workflow->getID(). ", ". $subworkflow->getID(). ", ". $this->_document->getID() .", ". $this->_version .", ".$initstate->getID().", ".$db->getCurrentTimestamp().")";
|
||||
$queryStr = "INSERT INTO tblWorkflowDocumentContent (parentworkflow, workflow, document, version, state, date) VALUES (". $this->_workflow->getID(). ", ". $subworkflow->getID(). ", ". $this->_document->getID() .", ". $this->_version .", ".$initstate->getID().", ".$db->getCurrentDatetime().")";
|
||||
if (!$db->getResult($queryStr)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -3932,7 +3933,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
|||
return false;
|
||||
|
||||
$state = $this->_workflowState;
|
||||
$queryStr = "INSERT INTO tblWorkflowLog (document, version, workflow, userid, transition, date, comment) VALUES (".$this->_document->getID().", ".$this->_version.", " . (int) $this->_workflow->getID() . ", " .(int) $user->getID(). ", ".(int) $transition->getID().", ".$db->getCurrentTimestamp().", ".$db->qstr($comment).")";
|
||||
$queryStr = "INSERT INTO tblWorkflowLog (document, version, workflow, userid, transition, date, comment) VALUES (".$this->_document->getID().", ".$this->_version.", " . (int) $this->_workflow->getID() . ", " .(int) $user->getID(). ", ".(int) $transition->getID().", ".$db->getCurrentDatetime().", ".$db->qstr($comment).")";
|
||||
if (!$db->getResult($queryStr))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -463,7 +463,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
|
||||
//inheritAccess = true, defaultAccess = M_READ
|
||||
$queryStr = "INSERT INTO tblFolders (name, parent, folderList, comment, date, owner, inheritAccess, defaultAccess, sequence) ".
|
||||
"VALUES (".$db->qstr($name).", ".$this->_id.", ".$db->qstr($pathPrefix).", ".$db->qstr($comment).", ".time().", ".$owner->getID().", 1, ".M_READ.", ". $sequence.")";
|
||||
"VALUES (".$db->qstr($name).", ".$this->_id.", ".$db->qstr($pathPrefix).", ".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".$owner->getID().", 1, ".M_READ.", ". $sequence.")";
|
||||
if (!$db->getResult($queryStr)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
@ -757,7 +757,7 @@ class SeedDMS_Core_Folder extends SeedDMS_Core_Object {
|
|||
$db->startTransaction();
|
||||
|
||||
$queryStr = "INSERT INTO tblDocuments (name, comment, date, expires, owner, folder, folderList, inheritAccess, defaultAccess, locked, keywords, sequence) VALUES ".
|
||||
"(".$db->qstr($name).", ".$db->qstr($comment).", " . time().", ".(int) $expires.", ".$owner->getID().", ".$this->_id.",".$db->qstr($pathPrefix).", 1, ".M_READ.", -1, ".$db->qstr($keywords).", " . $sequence . ")";
|
||||
"(".$db->qstr($name).", ".$db->qstr($comment).", ".$db->getCurrentTimestamp().", ".(int) $expires.", ".$owner->getID().", ".$this->_id.",".$db->qstr($pathPrefix).", 1, ".M_READ.", -1, ".$db->qstr($keywords).", " . $sequence . ")";
|
||||
if (!$db->getResult($queryStr)) {
|
||||
$db->rollbackTransaction();
|
||||
return false;
|
||||
|
|
|
@ -235,7 +235,7 @@ class SeedDMS_Core_Group {
|
|||
$reviewStatus = $this->getReviewStatus();
|
||||
foreach ($reviewStatus as $r) {
|
||||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $r["reviewID"] ."', '-2', 'Review group removed from process', ".$db->getCurrentTimestamp().", '". $user->getID() ."')";
|
||||
"VALUES ('". $r["reviewID"] ."', '-2', 'Review group removed from process', ".$db->getCurrentDatetime().", '". $user->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if(!$res) {
|
||||
$db->rollbackTransaction();
|
||||
|
@ -246,7 +246,7 @@ class SeedDMS_Core_Group {
|
|||
$approvalStatus = $this->getApprovalStatus();
|
||||
foreach ($approvalStatus as $a) {
|
||||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $a["approveID"] ."', '-2', 'Approval group removed from process', ".$db->getCurrentTimestamp().", '". $user->getID() ."')";
|
||||
"VALUES ('". $a["approveID"] ."', '-2', 'Approval group removed from process', ".$db->getCurrentDatetime().", '". $user->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if(!$res) {
|
||||
$db->rollbackTransaction();
|
||||
|
|
|
@ -584,7 +584,7 @@ class SeedDMS_Core_User {
|
|||
$reviewStatus = $this->getReviewStatus();
|
||||
foreach ($reviewStatus["indstatus"] as $ri) {
|
||||
$queryStr = "INSERT INTO `tblDocumentReviewLog` (`reviewID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $ri["reviewID"] ."', '-2', 'Reviewer removed from process', ".$db->getCurrentTimestamp().", '". $user->getID() ."')";
|
||||
"VALUES ('". $ri["reviewID"] ."', '-2', 'Reviewer removed from process', ".$db->getCurrentDatetime().", '". $user->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if(!$res) {
|
||||
$db->rollbackTransaction();
|
||||
|
@ -595,7 +595,7 @@ class SeedDMS_Core_User {
|
|||
$approvalStatus = $this->getApprovalStatus();
|
||||
foreach ($approvalStatus["indstatus"] as $ai) {
|
||||
$queryStr = "INSERT INTO `tblDocumentApproveLog` (`approveID`, `status`, `comment`, `date`, `userID`) ".
|
||||
"VALUES ('". $ai["approveID"] ."', '-2', 'Approver removed from process', ".$db->getCurrentTimestamp().", '". $user->getID() ."')";
|
||||
"VALUES ('". $ai["approveID"] ."', '-2', 'Approver removed from process', ".$db->getCurrentDatetime().", '". $user->getID() ."')";
|
||||
$res=$db->getResult($queryStr);
|
||||
if(!$res) {
|
||||
$db->rollbackTransaction();
|
||||
|
|
Loading…
Reference in New Issue
Block a user