65 $this->mIndexField =
'am_title';
69 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
72 $this->langcode = $this->lang->getCode();
73 $this->foreign = !$this->lang->equals( $contLang );
79 $this->custom = (
$filter ===
'unmodified' );
84 Title::makeTitleSafe( NS_MEDIAWIKI, $opts->
getValue(
'prefix' ) ) :
88 $displayPrefix =
$prefix->getDBkey();
89 $this->prefix =
'/^' .
preg_quote( $displayPrefix,
'/' ) .
'/i';
91 $this->prefix =
false;
96 if ( $this->foreign ) {
104 $messageNames = Language::getLocalisationCache()->getSubitemList(
'en',
'messages' );
107 $messageNames =
array_map( [ $this->lang,
'ucfirst' ], $messageNames );
110 rsort( $messageNames );
112 asort( $messageNames );
134 [
'page_namespace',
'page_title' ],
137 [
'USE INDEX' =>
'name_title' ]
141 $pageFlags = $talkFlags = [];
147 $titleParts = explode(
'/',
$s->page_title );
148 if ( count( $titleParts ) === 2 &&
150 isset( $xNames[$titleParts[0]] )
152 $exists = $titleParts[0];
155 $exists =
$s->page_title;
158 $title = Title::newFromRow(
$s );
159 if ( $exists && $title->inNamespace( NS_MEDIAWIKI ) ) {
185 foreach ( $messageNames as $key ) {
186 $customised =
isset( $statuses[
'pages'][$key] );
187 if ( $customised !== $this->custom &&
188 ( $asc && ( $key < $offset || !$offset ) || !$asc && $key > $offset ) &&
189 ( ( $this->prefix &&
preg_match( $this->prefix, $key ) ) || $this->prefix ===
false )
191 $actual =
wfMessage( $key )->inLanguage( $this->lang )->plain();
192 $default =
wfMessage( $key )->inLanguage( $this->lang )->useDatabase(
false )->plain();
193 $result->result[] = [
195 'am_actual' => $actual,
196 'am_default' => $default,
198 'am_talk_exists' =>
isset( $statuses[
'talks'][$key] )
203 if ( $count === $limit ) {
213 return Xml::openElement(
'table', [
214 'class' =>
"mw-datatable $tableClass",
215 'id' =>
'mw-allmessagestable'
219 <th rowspan=\"2\">" .
220 $this->
msg(
'allmessagesname' )->escaped() .
"
223 $this->
msg(
'allmessagesdefault' )->escaped() .
228 $this->
msg(
'allmessagescurrent' )->escaped() .
234 return Html::closeElement(
'table' );
238 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
241 $title = Title::makeTitle( NS_MEDIAWIKI,
$value . $this->suffix );
245 'title' =>
'Special:SearchTranslations',
246 'group' =>
'mediawiki',
247 'grouppath' =>
'mediawiki',
251 $this->
msg(
'allmessages-filter-translate' )->
text()
253 $talkLink = $this->
msg(
'talkpagelinktext' )->escaped();
255 if ( $this->mCurrentRow->am_customised ) {
263 if ( $this->mCurrentRow->am_talk_exists ) {
272 return $title .
' ' .
273 $this->
msg(
'parentheses' )->rawParams( $talk )->escaped() .
275 $this->
msg(
'parentheses' )->rawParams( $translation )->escaped();
279 return Sanitizer::escapeHtmlAllowEntities(
$value );
291 $s = parent::formatRow( $row );
294 if ( $row->am_customised ) {
295 $s .= Html::openElement(
'tr', $this->
getRowAttrs( $row,
true ) );
298 if ( $formatted ===
'' ) {
299 $formatted =
"\u{00A0}";
302 $s .= Html::element(
'td', $this->
getCellAttrs(
'am_actual', $row->am_actual ), $formatted )
303 . Html::closeElement(
'tr' );
306 return Html::rawElement(
'tbody', [],
$s );
320 if ( $field ===
'am_title' ) {
321 if ( $this->mCurrentRow->am_customised ) {
322 $attr += [
'rowspan' =>
'2' ];
326 'lang' => $this->lang->getHtmlCode(),
327 'dir' => $this->lang->getDir(),
329 if ( $this->mCurrentRow->am_customised ) {
331 $attr += [
'class' =>
$field ];
340 'am_title' => $this->
msg(
'allmessagesname' )->text(),
341 'am_default' => $this->
msg(
'allmessagesdefault' )->text()
346 return SpecialPage::getTitleFor(
'Allmessages',
false );
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfGetLangObj( $langcode=false)
Return a Language object from $langcode.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfArrayToCgi( $array1, $array2=null, $prefix='')
This function takes one or two arrays as input, and returns a CGI-style string, e....
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
Internationalisation code.
static makeExternalLink( $url, $text, $escape=true, $linktype='', $attribs=[], $title=null)
Make an external link.
namespace being checked & $result
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
Interface for objects which can provide a MediaWiki context on request.