Skip to content

Commit

Permalink
Fixed issue #16644: Audit log not save all actions
Browse files Browse the repository at this point in the history
There was a mismatch between the default values for "Audit log for this survey" setting. The default value shown on screen was Yes (true), and for most events it was indeed treated as 'true' by default when logging actions. But for tokens and survey settings, it defaulted to 'false' when logging actions.

It was fixed by defaulting to 'true' in all cases, as shown in the screen but expected by the user.
  • Loading branch information
gabrieljenik authored and eddylackmann committed Oct 12, 2020
1 parent 3f9b19f commit f439954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/core/plugins/AuditLog/AuditLog.php
Expand Up @@ -337,7 +337,7 @@ public function beforeTokenSave()
{
$event = $this->getEvent();
$iSurveyID=$event->get('iSurveyID');
if (!$this->checkSetting('AuditLog_Log_TokenSave') || !$this->get('auditing', 'Survey', $iSurveyID, false)) {
if (!$this->checkSetting('AuditLog_Log_TokenSave') || !$this->get('auditing', 'Survey', $iSurveyID, true)) {
return;
}

Expand Down Expand Up @@ -615,7 +615,7 @@ public function beforeSurveySettingsSave()
$event = $this->getEvent();
$oModifiedSurvey = $event->get('modifiedSurvey');
$iSurveyID = $oModifiedSurvey->sid;
if (!$this->checkSetting('AuditLog_Log_SurveySettings') || !$this->get('auditing', 'Survey', $iSurveyID, false)) {
if (!$this->checkSetting('AuditLog_Log_SurveySettings') || !$this->get('auditing', 'Survey', $iSurveyID, true)) {
return;
}

Expand Down

0 comments on commit f439954

Please sign in to comment.