Skip to content

Commit

Permalink
Fixed bug: removed unnecessary function getSurveyName from common.php…
Browse files Browse the repository at this point in the history
…, removed additional function variable in browseMenubar(), removed unnecessary changes to browse.php from new feature.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey181@6590 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Mar 29, 2009
1 parent 6a591cd commit 2d2b77b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
3 changes: 1 addition & 2 deletions admin/browse.php
Expand Up @@ -55,8 +55,7 @@
$language = GetBaseLanguageFromSurveyID($surveyid);
}


$surveyoptions = browsemenubar($clang->gT("Browse Responses"), getSurveyName($surveyid));
$surveyoptions = browsemenubar($clang->gT("Browse Responses"));
$browseoutput = "<table><tr><td></td></tr></table>\n"
."<table class='menubar'>\n";

Expand Down
18 changes: 2 additions & 16 deletions common.php
Expand Up @@ -1798,15 +1798,15 @@ function fixmovedquestionConditions($qid,$oldgid,$newgid) //Function rewrites th
}
}

function browsemenubar($title='', $surveyname='')
function browsemenubar($title='')
{
global $surveyid, $scriptname, $imagefiles, $homeurl, $clang, $sumrows5, $surrows;

$thissurvey=getSurveyInfo($surveyid);
//BROWSE MENU BAR
$browsemenubar = "<div class='menubar'>\n"
. "\t<div class='menubar-title'>\n"
. "\t<strong>$title</strong>: ($surveyname)"
. "\t<strong>$title</strong>: ({$thissurvey['name']})"
. "\t</div>"
. "\t<div class='menubar-main'>\n"
. "\t<div class='menubar-left'>\n"
Expand Down Expand Up @@ -5657,18 +5657,4 @@ function strip_javascript($content){
);
$text = preg_replace($search, '', $content);
return $text;
}

/**
* This function returns the survey name in the base language
*
* @param string $surveyid Survey ID
* @return string Survey Name
*/
function getSurveyName($surveyid)
{
$sumquery1 = "SELECT * FROM ".db_table_name('surveys')." inner join ".db_table_name('surveys_languagesettings')." on (surveyls_survey_id=sid and surveyls_language=language) WHERE sid=$surveyid"; //Getting data for this survey
$sumresult1 = db_select_limit_assoc($sumquery1, 1); //Checked
$s1row = $sumresult1->FetchRow();
return $s1row['surveyls_title'];
}

0 comments on commit 2d2b77b

Please sign in to comment.