Skip to content

Commit

Permalink
Fixed issue: datestamp on not date stamped survey.
Browse files Browse the repository at this point in the history
Dev : TODO verify for 1.92
  • Loading branch information
Shnoulle committed May 14, 2012
1 parent 281108a commit ad199b9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -4037,12 +4037,21 @@ private function _UpdateValuesInDatabase($updatedValues, $finished=false)
else
{
if ($finished) {
$sQuery = 'UPDATE '.$this->surveyOptions['tablename'] . " SET "
.dbQuoteID('submitdate') . "=" . dbQuoteAll($_SESSION['datestamp'])
." WHERE ID=".$_SESSION[$this->sessid]['srid'];
$sQuery = 'UPDATE '.$this->surveyOptions['tablename'] . " SET ";
if($this->surveyOptions['datestamp'])
{
// Replace with date("Y-m-d H:i:s") ? See timeadjust
$sQuery .= dbQuoteID('submitdate') . "=" . dbQuoteAll($_SESSION[$this->sessid]['datestamp']);
}
else
{
$sQuery .= dbQuoteID('submitdate') . "=" . dbQuoteAll(date("Y-m-d H:i:s",mktime(0,0,0,1,1,1980)));
}
$sQuery .= " WHERE ID=".$_SESSION[$this->sessid]['srid'];
dbExecuteAssoc($sQuery); // Checked
}
}
}

}
if (($this->debugLevel & LEM_DEBUG_VALIDATION_SUMMARY) == LEM_DEBUG_VALIDATION_SUMMARY) {
Expand Down

0 comments on commit ad199b9

Please sign in to comment.