Skip to content

Commit

Permalink
Dev: Replace foreach with array_walk
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 2, 2016
1 parent 3e3c32d commit 67f5f93
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions application/controllers/admin/participantsaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ protected function _renderWrappedTemplate($sAction = 'participants', $aViewUrls
App()->getClientScript()->registerPackage('bootstrap-multiselect');
$aData['display']['menu_bars'] = false;

$aViewUrls = array();
foreach((array) $aViewUrls as $sViewUrl)
{
$aViewUrls[] = $sViewUrl . '_view';
}
// Add "_view" to urls
array_walk($aViewUrls, function(&$url, $key) { $url .= "_view"; });
parent::_renderWrappedTemplate($sAction, $aViewUrls, $aData);
}

Expand Down Expand Up @@ -1708,7 +1705,7 @@ public function attributeMap()
$this->_renderWrappedTemplate('participants', 'attributeMap', $aData);
}

/*
/**
* This function is responsible for attribute mapping while copying participants from tokens to CPDB
*/
public function attributeMapToken()
Expand Down

0 comments on commit 67f5f93

Please sign in to comment.