diff options
Diffstat (limited to 'includes/specials/SpecialAllmessages.php')
-rw-r--r-- | includes/specials/SpecialAllmessages.php | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/includes/specials/SpecialAllmessages.php b/includes/specials/SpecialAllmessages.php index fe9d41e5..a60c8efe 100644 --- a/includes/specials/SpecialAllmessages.php +++ b/includes/specials/SpecialAllmessages.php @@ -77,6 +77,9 @@ class SpecialAllmessages extends SpecialPage { } + protected function getGroupName() { + return 'wiki'; + } } /** @@ -113,12 +116,12 @@ class AllmessagesTablePager extends TablePager { $this->lang = ( $langObj ? $langObj : $wgContLang ); $this->langcode = $this->lang->getCode(); - $this->foreign = $this->langcode != $wgContLang->getCode(); + $this->foreign = $this->langcode != $wgContLang->getCode(); $request = $this->getRequest(); $this->filter = $request->getVal( 'filter', 'all' ); - if( $this->filter === 'all' ){ + if( $this->filter === 'all' ) { $this->custom = null; // So won't match in either case } else { $this->custom = ($this->filter == 'unmodified'); @@ -126,7 +129,7 @@ class AllmessagesTablePager extends TablePager { $prefix = $this->getLanguage()->ucfirst( $request->getVal( 'prefix', '' ) ); $prefix = $prefix != '' ? Title::makeTitleSafe( NS_MEDIAWIKI, $request->getVal( 'prefix', null ) ) : null; - if( $prefix !== null ){ + if( $prefix !== null ) { $this->displayPrefix = $prefix->getDBkey(); $this->prefix = '/^' . preg_quote( $this->displayPrefix ) . '/i'; } else { @@ -150,7 +153,7 @@ class AllmessagesTablePager extends TablePager { $msg = wfMessage( 'allmessages-language' ); $langSelect = Xml::languageSelector( $this->langcode, false, null, $attrs, $msg ); - $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-allmessages-form' ) ) . + $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-allmessages-form' ) ) . Xml::fieldset( $this->msg( 'allmessages-filter-legend' )->text() ) . Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . Xml::openElement( 'table', array( 'class' => 'mw-allmessages-table' ) ) . "\n" . @@ -216,7 +219,7 @@ class AllmessagesTablePager extends TablePager { function getAllMessages( $descending ) { wfProfileIn( __METHOD__ ); $messageNames = Language::getLocalisationCache()->getSubitemList( 'en', 'messages' ); - if( $descending ){ + if( $descending ) { rsort( $messageNames ); } else { asort( $messageNames ); @@ -331,15 +334,13 @@ class AllmessagesTablePager extends TablePager { </tr></thead><tbody>\n"; } - function formatValue( $field, $value ){ - switch( $field ){ - + function formatValue( $field, $value ) { + switch( $field ) { case 'am_title' : - $title = Title::makeTitle( NS_MEDIAWIKI, $value . $this->suffix ); - $talk = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix ); + $talk = Title::makeTitle( NS_MEDIAWIKI_TALK, $value . $this->suffix ); - if( $this->mCurrentRow->am_customised ){ + if( $this->mCurrentRow->am_customised ) { $title = Linker::linkKnown( $title, $this->getLanguage()->lcfirst( $value ) ); } else { $title = Linker::link( @@ -351,7 +352,7 @@ class AllmessagesTablePager extends TablePager { ); } if ( $this->mCurrentRow->am_talk_exists ) { - $talk = Linker::linkKnown( $talk , $this->talk ); + $talk = Linker::linkKnown( $talk, $this->talk ); } else { $talk = Linker::link( $talk, @@ -370,12 +371,12 @@ class AllmessagesTablePager extends TablePager { return ''; } - function formatRow( $row ){ + function formatRow( $row ) { // Do all the normal stuff $s = parent::formatRow( $row ); // But if there's a customised message, add that too. - if( $row->am_customised ){ + if( $row->am_customised ) { $s .= Xml::openElement( 'tr', $this->getRowAttrs( $row, true ) ); $formatted = strval( $this->formatValue( 'am_actual', $row->am_actual ) ); if ( $formatted == '' ) { @@ -387,19 +388,19 @@ class AllmessagesTablePager extends TablePager { return $s; } - function getRowAttrs( $row, $isSecond = false ){ + function getRowAttrs( $row, $isSecond = false ) { $arr = array(); - if( $row->am_customised ){ + if( $row->am_customised ) { $arr['class'] = 'allmessages-customised'; } - if( !$isSecond ){ + if( !$isSecond ) { $arr['id'] = Sanitizer::escapeId( 'msg_' . $this->getLanguage()->lcfirst( $row->am_title ) ); } return $arr; } - function getCellAttrs( $field, $value ){ - if( $this->mCurrentRow->am_customised && $field == 'am_title' ){ + function getCellAttrs( $field, $value ) { + if( $this->mCurrentRow->am_customised && $field == 'am_title' ) { return array( 'rowspan' => '2', 'class' => $field ); } elseif( $field == 'am_title' ) { return array( 'class' => $field ); @@ -420,16 +421,15 @@ class AllmessagesTablePager extends TablePager { return SpecialPage::getTitleFor( 'Allmessages', false ); } - function isFieldSortable( $x ){ + function isFieldSortable( $x ) { return false; } - function getDefaultSort(){ + function getDefaultSort() { return ''; } - function getQueryInfo(){ + function getQueryInfo() { return ''; } } - |