Skip to content

Commit

Permalink
Add //AJS# comments to indicate ported sections of the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronschmitz committed Jul 31, 2012
1 parent a4c432d commit b1fb867
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/remotecontrol.php
Expand Up @@ -691,7 +691,7 @@ function export_reponses($sSessionKey, $iSurveyID, $sDocumentType, $sLanguageCod
Yii::app()->loadHelper('admin/exportresults');
if (!hasSurveyPermission($iSurveyID, 'responses', 'export')) return array('status' => 'No permission');
if (is_null($sLanguageCode)) $sLanguageCode=getBaseLanguageFromSurveyID($iSurveyID);
if (is_null($aFields)) $aFields=array_keys(createFieldMap($iSurveyID,'full',true,false,$sLanguageCode));
if (is_null($aFields)) $aFields=array_keys(createFieldMap($iSurveyID,'full',true,false,$sLanguageCode)); //AJS#
if($sDocumentType=='xls'){
// Cut down to the first 255 fields
$aFields=array_slice($aFields,0,255);
Expand Down
11 changes: 5 additions & 6 deletions application/helpers/admin/statistics_helper.php
Expand Up @@ -277,11 +277,12 @@ function buildSelects($allfields, $surveyid, $language) {
$selects=array();
$aQuestionMap=array();

$fieldmap=createFieldMap($surveyid, "full", false, false, $language);
$fieldmap=createFieldMap($surveyid, "full", false, false, $language); //AJS#
foreach ($fieldmap as $field)
{
if(isset($field['qid']) && $field['qid']!='')
$aQuestionMap[]=$field['sid'].'X'.$field['gid'].'X'.$field['qid'];
$q = $field['q'];
if(isset($q->id) && $q->id!='')
$aQuestionMap[]=$q->surveyid.'X'.$q->gid.'X'.$q->id;
}

// creates array of post variable names
Expand Down Expand Up @@ -514,7 +515,7 @@ function buildOutputList($rt, $language, $surveyid, $outputType, $sql) {
$statlangcode = getBaseLanguageFromSurveyID($surveyid);
$statlang = new Limesurvey_lang($statlangcode);
$firstletter = substr($rt, 0, 1);
$fieldmap=createFieldMap($surveyid, "full", false, false, $language);
$fieldmap=createFieldMap($surveyid, "full", false, false, $language); //AJS#
$sDatabaseType = Yii::app()->db->getDriverName();
$statisticsoutput="";

Expand Down Expand Up @@ -3121,8 +3122,6 @@ function generate_statistics($surveyid, $allfields, $q2show='all', $usegraph=0,
$surveylanguagecodes = Survey::model()->findByPk($surveyid)->additionalLanguages;
$surveylanguagecodes[] = Survey::model()->findByPk($surveyid)->language;

$fieldmap=createFieldMap($surveyid, "full", false, false, $statlang->getlangcode());

// Set language for questions and answers to base language of this survey
$language=$statlangcode;

Expand Down
2 changes: 1 addition & 1 deletion application/helpers/export_helper.php
Expand Up @@ -151,7 +151,7 @@ function SPSSGetValues ($field = array()) {
function SPSSFieldMap($iSurveyID, $prefix = 'V') {
global $clang, $surveyprivate, $tokensexist, $language;

$fieldmap = createFieldMap($iSurveyID,'full',false,false,getBaseLanguageFromSurveyID($iSurveyID));
$fieldmap = createFieldMap($iSurveyID,'full',false,false,getBaseLanguageFromSurveyID($iSurveyID)); //AJS#

#See if tokens are being used
$tokensexist = Yii::app()->db->schema->getTable('{{tokens_'.$iSurveyID . '}}');
Expand Down

0 comments on commit b1fb867

Please sign in to comment.