X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FAllMessagesTablePager.php;h=6facda11eb5e374d0a8303ea89fc5cd6618018a5;hb=8ffabe23a195e47af2a117a2a917a280b3459255;hp=f045333130bd0c008e748368e5b590d016a9bf5c;hpb=04179d3a5ce90f3f967d0e004fdf68bd45b04541;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/pagers/AllMessagesTablePager.php b/includes/specials/pagers/AllMessagesTablePager.php index f045333130..6facda11eb 100644 --- a/includes/specials/pagers/AllMessagesTablePager.php +++ b/includes/specials/pagers/AllMessagesTablePager.php @@ -167,28 +167,29 @@ class AllMessagesTablePager extends TablePager { } /** - * This function normally does a database query to get the results; we need + * This function normally does a database query to get the results; we need * to make a pretend result using a FakeResultWrapper. * @param string $offset * @param int $limit - * @param bool $descending + * @param bool $order * @return FakeResultWrapper */ - function reallyDoQuery( $offset, $limit, $descending ) { + function reallyDoQuery( $offset, $limit, $order ) { + $asc = ( $order === self::QUERY_ASCENDING ); $result = new FakeResultWrapper( [] ); - $messageNames = $this->getAllMessages( $descending ); + $messageNames = $this->getAllMessages( $order ); $statuses = self::getCustomisedStatuses( $messageNames, $this->langcode, $this->foreign ); $count = 0; foreach ( $messageNames as $key ) { $customised = isset( $statuses['pages'][$key] ); if ( $customised !== $this->custom && - ( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) && + ( $asc && ( $key < $offset || !$offset ) || !$asc && $key > $offset ) && ( ( $this->prefix && preg_match( $this->prefix, $key ) ) || $this->prefix === false ) ) { - $actual = wfMessage( $key )->inLanguage( $this->lang )->plain(); - $default = wfMessage( $key )->inLanguage( $this->lang )->useDatabase( false )->plain(); + $actual = $this->msg( $key )->inLanguage( $this->lang )->plain(); + $default = $this->msg( $key )->inLanguage( $this->lang )->useDatabase( false )->plain(); $result->result[] = [ 'am_title' => $key, 'am_actual' => $actual,