Index: trunk/extensions/EducationProgram/includes/EPPager.php |
— | — | @@ -258,7 +258,7 @@ |
259 | 259 | function isFieldSortable( $name ) { |
260 | 260 | return in_array( |
261 | 261 | $name, |
262 | | - $this->table->getPrefixedFields( $this->getSortableFields() ) |
| 262 | + $this->getSortableFields() |
263 | 263 | ); |
264 | 264 | } |
265 | 265 | |
— | — | @@ -503,7 +503,6 @@ |
504 | 504 | |
505 | 505 | # Make table header |
506 | 506 | foreach ( $fields as $field => $name ) { |
507 | | - $prefixedField = $this->table->getPrefixedField( $field ); |
508 | 507 | $name = $name === '' ? '' : $this->getMsg( 'header-' . $name ); |
509 | 508 | |
510 | 509 | if ( $field === '_select' ) { |
— | — | @@ -516,10 +515,10 @@ |
517 | 516 | } |
518 | 517 | elseif ( strval( $name ) == '' ) { |
519 | 518 | $s .= "<th> </th>\n"; |
520 | | - } elseif ( $this->isFieldSortable( $prefixedField ) ) { |
521 | | - $query = array( 'sort' => $prefixedField, 'limit' => $this->mLimit ); |
| 519 | + } elseif ( $this->isFieldSortable( $field ) ) { |
| 520 | + $query = array( 'sort' => $field, 'limit' => $this->mLimit ); |
522 | 521 | |
523 | | - if ( $prefixedField == $this->mSort ) { |
| 522 | + if ( $field == $this->mSort ) { |
524 | 523 | # This is the sorted column |
525 | 524 | # Prepare a link that goes in the other sort order |
526 | 525 | if ( $this->mDefaultDirection ) { |
— | — | @@ -552,6 +551,14 @@ |
553 | 552 | $s .= "</tr></thead><tbody>\n"; |
554 | 553 | return $s; |
555 | 554 | } |
| 555 | + |
| 556 | + /** |
| 557 | + * (non-PHPdoc) |
| 558 | + * @see IndexPager::getIndexField() |
| 559 | + */ |
| 560 | + public function getIndexField() { |
| 561 | + return $this->table->getPrefixedField( $this->mSort ); |
| 562 | + } |
556 | 563 | |
557 | 564 | protected $instanceNumber = null; |
558 | 565 | |