Skip to content

Commit

Permalink
Fixed issue #16461: Twice contact sentence for some error page
Browse files Browse the repository at this point in the history
Dev: remove duplicates, leave contact for theme only.
# Conflicts:
#	application/controllers/survey/index.php
  • Loading branch information
Shnoulle committed Jul 16, 2020
1 parent 8217e54 commit e247d8d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions application/controllers/survey/index.php
Expand Up @@ -322,8 +322,7 @@ public function action()
if ($thissurvey['expiry'] != '' and dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $timeadjust) > $thissurvey['expiry'] && $thissurvey['active'] != 'N' && !$previewmode) {
$aErrors = array(gT('Error'));
$aMessage = array(
gT("We are sorry but the survey is expired and no longer available."),
sprintf(gT("Please contact %s ( %s ) for further assistance."), $thissurvey['adminname'], $thissurvey['adminemail']) /* Maybe better to move this to a global replacement 'surveycontact' */
gT("We are sorry but the survey is expired and no longer available.")
);

$event = new PluginEvent('onSurveyDenied');
Expand All @@ -344,8 +343,7 @@ public function action()
if ($thissurvey['startdate'] != '' and dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", $timeadjust) < $thissurvey['startdate'] && $thissurvey['active'] != 'N' && !$previewmode) {
$aErrors = array(gT('Error'));
$aMessage = array(
gT("This survey is not yet started."),
sprintf(gT("Please contact %s ( %s ) for further assistance."), $thissurvey['adminname'], $thissurvey['adminemail'])/* Maybe better to move this to a global replacement 'surveycontact' */
gT("This survey is not yet started.")
);

$event = new PluginEvent('onSurveyDenied');
Expand All @@ -368,8 +366,7 @@ public function action()

$aErrors = array(gT('Error'));
$aMessage = array(
gT("You have already completed this survey."),
sprintf(gT("Please contact %s ( %s ) for further assistance."), $thissurvey['adminname'], $thissurvey['adminemail'])/* Maybe better to move this to a global replacement 'surveycontact' */
gT("You have already completed this survey.")
);

$event = new PluginEvent('onSurveyDenied');
Expand Down Expand Up @@ -487,8 +484,7 @@ public function action()
}

$aMessage = array(
gT("We are sorry but you are not allowed to enter this survey."),
sprintf(gT("Please contact %s ( %s ) for further assistance."), $thissurvey['adminname'], $thissurvey['adminemail'])/* Maybe better to move this to a global replacement 'surveycontact' */
gT("We are sorry but you are not allowed to enter this survey.")
);

$event = new PluginEvent('onSurveyDenied');
Expand Down
2 changes: 1 addition & 1 deletion themes/survey/vanilla/views/layout_errors.twig
Expand Up @@ -65,7 +65,7 @@
{% if aError.contact %}
{{ aError.contact }}
{% else %}
{{gT("For further information please contact %s:")|format (aSurveyInfo.adminname)}}
{{gT("For further information please contact %s:")|format (aSurveyInfo.admin)}}
{% if aSurveyInfo.adminemail %}
<br>
<a href='mailto:{{ aSurveyInfo.adminemail }}'>{{ aSurveyInfo.adminemail }}</a>
Expand Down

0 comments on commit e247d8d

Please sign in to comment.