Skip to content

Commit

Permalink
Dev: Default sort order for attributes (CPDB)
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Sep 23, 2016
1 parent 95ff0a5 commit 28fcc79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion application/controllers/admin/participantsaction.php
Expand Up @@ -1215,7 +1215,7 @@ public function storeUserControlValues()
*/
public function attributeControl()
{
$lang = Yii::app()->session['adminlang'];
$lang = Yii::app()->session['adminlang'];

$model = new ParticipantAttributeName();
if(Yii::app()->request->getParam('ParticipantAttributeName'))
Expand Down
4 changes: 4 additions & 0 deletions application/models/ParticipantAttributeName.php
Expand Up @@ -205,8 +205,12 @@ public function search()
$criteria->compare('attribute_type',$this->attribute_type);
$criteria->compare('visible',$this->visible,true);

$sort = new CSort();
$sort->defaultOrder = array('defaultname' => CSort::SORT_ASC);

return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
'sort' => $sort
));
}

Expand Down

0 comments on commit 28fcc79

Please sign in to comment.