From 80755765925f04ec62037ca85d37d83751e3a97e Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Fri, 7 Oct 2011 17:52:06 +0000 Subject: [PATCH] Fixed issues with activated icons in survey bar even though survey was not active git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11122 b72ed6b6-b9f8-46b5-92b4-906544132732 --- application/core/Survey_Common_Controller.php | 7 +++---- application/views/admin/survey/surveybar_view.php | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/application/core/Survey_Common_Controller.php b/application/core/Survey_Common_Controller.php index 2a1b3b0a1bd..f4d7f0154c3 100644 --- a/application/core/Survey_Common_Controller.php +++ b/application/core/Survey_Common_Controller.php @@ -234,7 +234,7 @@ function _surveybar($surveyid,$gid=null) $surveyinfo = $sumresult1->row_array(); $surveyinfo = array_map('FlattenText', $surveyinfo); //$surveyinfo = array_map('htmlspecialchars', $surveyinfo); - $activated = $surveyinfo['active']; + $activated = ($surveyinfo['active']=='Y'); $js_admin_includes = $this->config->item("js_admin_includes"); $js_admin_includes[]=$this->config->item('generalscripts').'jquery/jquery.coookie.js'; @@ -252,7 +252,7 @@ function _surveybar($surveyid,$gid=null) $data['surveyid']=$surveyid; // ACTIVATE SURVEY BUTTON - $data['activated'] = ($activated=="Y") ? true : false; + $data['activated'] = $activated; $data['imageurl'] = $this->config->item('imageurl'); $condition = array('sid' => $surveyid, 'parent_qid' => 0, 'language' => $baselang); @@ -268,7 +268,7 @@ function _surveybar($surveyid,$gid=null) // Start of suckerfish menu // TEST BUTTON - if ($activated == "N") + if (!$activated) { $data['icontext']=$clang->gT("Test This Survey"); $data['icontext2']=$clang->gTview("Test This Survey"); @@ -356,7 +356,6 @@ function _surveybar($surveyid,$gid=null) $data['GidPrev'] = $GidPrev = getGidPrevious($surveyid, $gid); $data['GidNext'] = $GidNext = getGidNext($surveyid, $gid); - $data['activated'] = $activated; $this->load->view("admin/survey/surveybar_view",$data); diff --git a/application/views/admin/survey/surveybar_view.php b/application/views/admin/survey/surveybar_view.php index 9d9669237ea..84bfa1c578b 100644 --- a/application/views/admin/survey/surveybar_view.php +++ b/application/views/admin/survey/surveybar_view.php @@ -5,7 +5,7 @@