@@ -544,30 +544,22 @@ public function get_table_data($from = 1, $per_page = null, $column = null, $dir
544
544
// retrieve sorting type
545
545
546
546
if ($ is_western_name_order ) {
547
- //$users_sorting = ($this->column == 0 ? FlatViewDataGenerator :: FVDG_SORT_FIRSTNAME : FlatViewDataGenerator :: FVDG_SORT_LASTNAME);
548
- $ users_sorting = FlatViewDataGenerator :: FVDG_SORT_FIRSTNAME ;
549
-
547
+ $ users_sorting = ($ this ->column == 0 ? FlatViewDataGenerator :: FVDG_SORT_FIRSTNAME : FlatViewDataGenerator :: FVDG_SORT_LASTNAME );
550
548
} else {
551
- //$users_sorting = ($this->column == 0 ? FlatViewDataGenerator :: FVDG_SORT_LASTNAME : FlatViewDataGenerator :: FVDG_SORT_FIRSTNAME);
552
- $ users_sorting = FlatViewDataGenerator :: FVDG_SORT_LASTNAME ;
549
+ $ users_sorting = ($ this ->column == 0 ? FlatViewDataGenerator :: FVDG_SORT_LASTNAME : FlatViewDataGenerator :: FVDG_SORT_FIRSTNAME );
553
550
}
554
551
555
552
if ($ this ->direction == 'DESC ' ) {
556
553
$ users_sorting |= FlatViewDataGenerator :: FVDG_SORT_DESC ;
557
554
} else {
558
555
$ users_sorting |= FlatViewDataGenerator :: FVDG_SORT_ASC ;
559
556
}
560
- // step 1: generate columns: evaluations and links
561
557
558
+ // step 1: generate columns: evaluations and links
562
559
$ header_names = $ this ->datagen ->get_header_names ($ this ->offset , $ selectlimit );
563
560
564
- if ($ is_western_name_order ) {
565
- $ this ->set_header (0 , $ header_names [1 ]);
566
- $ this ->set_header (1 , $ header_names [0 ]);
567
- } else {
568
- $ this ->set_header (0 , $ header_names [0 ]);
569
- $ this ->set_header (1 , $ header_names [1 ]);
570
- }
561
+ $ this ->set_header (0 , $ header_names [0 ]);
562
+ $ this ->set_header (1 , $ header_names [1 ]);
571
563
572
564
$ column = 2 ;
573
565
while ($ column < count ($ header_names )) {
@@ -588,14 +580,13 @@ public function get_table_data($from = 1, $per_page = null, $column = null, $dir
588
580
$ table_row = array ();
589
581
$ count = 0 ;
590
582
$ user_id = $ user_row [$ count ++];
591
- $ lastname = $ user_row [$ count ++];
592
- $ firstname = $ user_row [$ count ++];
583
+ $ userInfo = api_get_user_info ($ user_id );
593
584
if ($ is_western_name_order ) {
594
- $ table_row [] = $ this ->build_name_link ($ user_id , $ firstname );
595
- $ table_row [] = $ this ->build_name_link ($ user_id , $ lastname );
585
+ $ table_row [] = $ this ->build_name_link ($ user_id , $ userInfo [ ' firstname ' ] );
586
+ $ table_row [] = $ this ->build_name_link ($ user_id , $ userInfo [ ' lastname ' ] );
596
587
} else {
597
- $ table_row [] = $ this ->build_name_link ($ user_id , $ lastname );
598
- $ table_row [] = $ this ->build_name_link ($ user_id , $ firstname );
588
+ $ table_row [] = $ this ->build_name_link ($ user_id , $ userInfo [ ' lastname ' ] );
589
+ $ table_row [] = $ this ->build_name_link ($ user_id , $ userInfo [ ' firstname ' ] );
599
590
}
600
591
while ($ count < count ($ user_row )) {
601
592
$ table_row [] = $ user_row [$ count ++];
0 commit comments