$out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-allmessages-form' ) ) .
Xml::fieldset( wfMsg( 'allmessages-filter-legend' ) ) .
- Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
Xml::openElement( 'table', array( 'class' => 'mw-allmessages-table' ) ) . "\n" .
'<tr>
<td class="mw-label">' .
'filter',
'unmodified',
'mw-allmessages-form-filter-unmodified',
- ( $this->filter == 'unmodified' ? true : false )
+ ( $this->filter == 'unmodified' )
) .
Xml::radioLabel( wfMsg( 'allmessages-filter-all' ),
'filter',
'all',
'mw-allmessages-form-filter-all',
- ( $this->filter == 'all' ? true : false )
+ ( $this->filter == 'all' )
) .
Xml::radioLabel( wfMsg( 'allmessages-filter-modified' ),
'filter',
'modified',
'mw-allmessages-form-filter-modified',
- ( $this->filter == 'modified' ? true : false )
+ ( $this->filter == 'modified' )
) .
"</td>\n
</tr>
Xml::openElement( 'select', array( 'id' => 'mw-allmessages-form-lang', 'name' => 'lang' ) );
foreach( $languages as $lang => $name ) {
- $selected = $lang == $this->langCode ? true : false;
+ $selected = $lang == $this->langCode;
$out .= Xml::option( $lang . ' - ' . $name, $lang, $selected ) . "\n";
}
$out .= Xml::closeElement( 'select' ) .
$this->mPage = $page;
$this->mConds = $conds;
$this->mDefaultDirection = true; // always sort ascending
- // We want to have an option for people to view *all* the messages,
- // so they can use Ctrl+F to search them. 5000 is the maximum that
- // will get through WebRequest::getLimitOffset().
$this->mLimitsShown = array( 20, 50, 100, 250, 500, 5000 );
global $wgLang, $wgContLang, $wgRequest;
// Normalise message names so they look like page titles
$messageNames = array_map( array( $this->lang, 'ucfirst' ), $messageNames );
- wfProfileIn( __METHOD__ );
+ wfProfileOut( __METHOD__ );
return $messageNames;
}
$pageFlags = $talkFlags = array();
- while( $s = $dbr->fetchObject( $res ) ) {
+ foreach ( $res as $s ) {
if( $s->page_namespace == NS_MEDIAWIKI ) {
if( $this->foreign ) {
$title = explode( '/', $s->page_title );
( $descending && ( $key < $offset || !$offset ) || !$descending && $key > $offset ) &&
( ( $this->prefix && preg_match( $this->prefix, $key ) ) || $this->prefix === false )
){
+ $actual = wfMessage( $key )->inLanguage( $this->langcode )->plain();
+ $default = wfMessage( $key )->inLanguage( $this->langcode )->useDatabase( false )->plain();
$result->result[] = array(
'am_title' => $key,
- 'am_actual' => wfMsgGetKey( $key, /*useDB*/true, $this->langcode, false ),
- 'am_default' => wfMsgGetKey( $key, /*useDB*/false, $this->langcode, false ),
+ 'am_actual' => $actual,
+ 'am_default' => $default,
'am_customised' => $customised,
'am_talk_exists' => isset( $statuses['talks'][$key] )
);
return $title . ' (' . $talk . ')';
case 'am_default' :
- return Sanitizer::escapeHtmlAllowEntities( $value, ENT_QUOTES );
case 'am_actual' :
return Sanitizer::escapeHtmlAllowEntities( $value, ENT_QUOTES );
}