From e247d8d8093288a460962bbcbf95f497ec8439e9 Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Thu, 16 Jul 2020 09:32:20 +0200 Subject: [PATCH] Fixed issue #16461: Twice contact sentence for some error page Dev: remove duplicates, leave contact for theme only. # Conflicts: # application/controllers/survey/index.php --- application/controllers/survey/index.php | 12 ++++-------- themes/survey/vanilla/views/layout_errors.twig | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/application/controllers/survey/index.php b/application/controllers/survey/index.php index 6dd49654ad7..4f174bc04f7 100644 --- a/application/controllers/survey/index.php +++ b/application/controllers/survey/index.php @@ -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'); @@ -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'); @@ -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'); @@ -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'); diff --git a/themes/survey/vanilla/views/layout_errors.twig b/themes/survey/vanilla/views/layout_errors.twig index 58eefdc89f8..e3cec2b76d2 100644 --- a/themes/survey/vanilla/views/layout_errors.twig +++ b/themes/survey/vanilla/views/layout_errors.twig @@ -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 %}
{{ aSurveyInfo.adminemail }}