Skip to content

Commit

Permalink
Dev: Remove unused variable i and j; remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 29, 2016
1 parent 0d897d7 commit 33a0f24
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions application/controllers/admin/participantsaction.php
Expand Up @@ -1615,35 +1615,17 @@ function attributeMap()
$iParticipantId = Yii::app()->request->getPost('participant_id');
$attributes = ParticipantAttributeName::model()->getCPDBAttributes();
$tokenattributefieldnames = getTokenFieldsAndNames($iSurveyId, TRUE);
/* $arr = Yii::app()->db
->createCommand()
->select('*')
->from("{{tokens_$iSurveyId}}")
->queryRow();
if (is_array($arr))
{
$tokenfieldnames = array_keys($arr);
$tokenattributefieldnames = array_filter($tokenfieldnames, 'filterForAttributes');
}
else
{
$tokenattributefieldnames = array();
} */

$selectedattribute = array(); //List of existing attribute fields that are not mapped
$selectedcentralattribute = array(); //List of attributes that haven't already been mapped
$alreadymappedattid = array(); //List of fields already mapped to this tokens table
$alreadymappedattname = array();
$i = 0;
$j = 0;

foreach ($tokenattributefieldnames as $key => $value)
{
if (is_numeric($key[10])) //Assumes that if the 11th character is a number, it must be a token-table created attribute
{
$selectedattribute[$key] = $value['description'];
$i++;
}
else
{
Expand Down Expand Up @@ -1699,7 +1681,6 @@ function attributeMapToken()
$alreadymappedattdisplay = array();
$alreadymappedattnames = array();
$i = 0;
$j = 0;

foreach ($aTokenAttributes as $key => $value)
{
Expand Down

0 comments on commit 33a0f24

Please sign in to comment.