MediaWiki  1.23.8
Go to the documentation of this file.
1 <?php
29 abstract class PageQueryPage extends QueryPage {
38  public function preprocessResults( $db, $res ) {
39  if ( !$res->numRows() ) {
40  return;
41  }
43  $batch = new LinkBatch();
44  foreach ( $res as $row ) {
45  $batch->add( $row->namespace, $row->title );
46  }
47  $batch->execute();
49  $res->seek( 0 );
50  }
59  public function formatResult( $skin, $row ) {
62  $title = Title::makeTitleSafe( $row->namespace, $row->title );
64  if ( $title instanceof Title ) {
65  $text = $wgContLang->convert( $title->getPrefixedText() );
66  return Linker::link( $title, htmlspecialchars( $text ) );
67  } else {
68  return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
69  Linker::getInvalidTitleDescription( $this->getContext(), $row->namespace, $row->title ) );
70  }
71  }
72 }
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:30
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition: Linker.php:427
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
Definition: QueryPage.php:30
Variant of QueryPage which formats the result as a simple link to the page.
Definition: PageQueryPage.php:29
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
Definition: Linker.php:192
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
Gets the context this SpecialPage is executed in.
Definition: SpecialPage.php:508
formatResult( $skin, $row)
Format the result as a simple link to the page.
Definition: PageQueryPage.php:59
preprocessResults( $db, $res)
Run a LinkBatch to pre-cache LinkCache information, like page existence and information for stub colo...
Definition: PageQueryPage.php:38
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
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 $skin
Definition: hooks.txt:1530
Represents a title within MediaWiki.
Definition: Title.php:35
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
Definition: linkcache.txt:23
Definition: database.txt:21