MediaWiki  1.23.2
SpecialWithoutinterwiki.php
Go to the documentation of this file.
1 <?php
31  private $prefix = '';
32 
33  function __construct( $name = 'Withoutinterwiki' ) {
34  parent::__construct( $name );
35  }
36 
37  function execute( $par ) {
38  $this->prefix = Title::capitalize(
39  $this->getRequest()->getVal( 'prefix', $par ), NS_MAIN );
40  parent::execute( $par );
41  }
42 
43  function getPageHeader() {
44  global $wgScript;
45 
46  # Do not show useless input form if special page is cached
47  if ( $this->isCached() ) {
48  return '';
49  }
50 
52  $t = $this->getPageTitle();
53 
54  return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) . "\n" .
55  Html::openElement( 'fieldset' ) . "\n" .
56  Html::element( 'legend', null, $this->msg( 'withoutinterwiki-legend' )->text() ) . "\n" .
57  Html::hidden( 'title', $t->getPrefixedText() ) . "\n" .
59  $this->msg( 'allpagesprefix' )->text(),
60  'prefix',
61  'wiprefix',
62  20,
63  $prefix
64  ) . "\n" .
65  Xml::submitButton( $this->msg( 'withoutinterwiki-submit' )->text() ) . "\n" .
66  Html::closeElement( 'fieldset' ) . "\n" .
67  Html::closeElement( 'form' );
68  }
69 
70  function sortDescending() {
71  return false;
72  }
73 
74  function getOrderFields() {
75  return array( 'page_namespace', 'page_title' );
76  }
77 
78  function isExpensive() {
79  return true;
80  }
81 
82  function isSyndicated() {
83  return false;
84  }
85 
86  function getQueryInfo() {
87  $query = array(
88  'tables' => array( 'page', 'langlinks' ),
89  'fields' => array(
90  'namespace' => 'page_namespace',
91  'title' => 'page_title',
92  'value' => 'page_title'
93  ),
94  'conds' => array(
95  'll_title IS NULL',
96  'page_namespace' => MWNamespace::getContentNamespaces(),
97  'page_is_redirect' => 0
98  ),
99  'join_conds' => array( 'langlinks' => array( 'LEFT JOIN', 'll_from = page_id' ) )
100  );
101  if ( $this->prefix ) {
102  $dbr = wfGetDB( DB_SLAVE );
103  $query['conds'][] = 'page_title ' . $dbr->buildLike( $this->prefix, $dbr->anyString() );
104  }
105 
106  return $query;
107  }
108 
109  protected function getGroupName() {
110  return 'maintenance';
111  }
112 }
SpecialPage\getPageTitle
getPageTitle( $subpage=false)
Get a self-referential title object.
Definition: SpecialPage.php:488
php
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
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
WithoutInterwikiPage\getOrderFields
getOrderFields()
Subclasses return an array of fields to order by here.
Definition: SpecialWithoutinterwiki.php:74
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:662
MWNamespace\getContentNamespaces
static getContentNamespaces()
Get a list of all namespace indices which are considered to contain content.
Definition: Namespace.php:334
WithoutInterwikiPage\sortDescending
sortDescending()
Override to sort by increasing values.
Definition: SpecialWithoutinterwiki.php:70
PageQueryPage
Variant of QueryPage which formats the result as a simple link to the page.
Definition: PageQueryPage.php:29
$dbr
$dbr
Definition: testCompression.php:48
NS_MAIN
const NS_MAIN
Definition: Defines.php:79
Html\closeElement
static closeElement( $element)
Returns "</$element>", except if $wgWellFormedXml is off, in which case it returns the empty string w...
Definition: Html.php:235
Html\openElement
static openElement( $element, $attribs=array())
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
Definition: Html.php:166
WithoutInterwikiPage\getQueryInfo
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
Definition: SpecialWithoutinterwiki.php:86
WithoutInterwikiPage\$prefix
$prefix
Definition: SpecialWithoutinterwiki.php:31
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
QueryPage\isCached
isCached()
Whether or not the output of the page in question is retrieved from the database cache.
Definition: QueryPage.php:231
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
WithoutInterwikiPage\isSyndicated
isSyndicated()
Sometime we don't want to build rss / atom feeds.
Definition: SpecialWithoutinterwiki.php:82
Xml\inputLabel
static inputLabel( $label, $name, $id, $size=false, $value=false, $attribs=array())
Convenience function to build an HTML text input field with a label.
Definition: Xml.php:398
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
execute
$batch execute()
WithoutInterwikiPage\getPageHeader
getPageHeader()
The content returned by this function will be output before any result.
Definition: SpecialWithoutinterwiki.php:43
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
WithoutInterwikiPage
Special page lists pages without language links.
Definition: SpecialWithoutinterwiki.php:30
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
Title\capitalize
static capitalize( $text, $ns=NS_MAIN)
Capitalize a text string for a title if it belongs to a namespace that capitalizes.
Definition: Title.php:3269
Xml\submitButton
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
Definition: Xml.php:463
WithoutInterwikiPage\execute
execute( $par)
This is the actual workhorse.
Definition: SpecialWithoutinterwiki.php:37
$t
$t
Definition: testCompression.php:65
WithoutInterwikiPage\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialWithoutinterwiki.php:109
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
WithoutInterwikiPage\__construct
__construct( $name='Withoutinterwiki')
Definition: SpecialWithoutinterwiki.php:33
WithoutInterwikiPage\isExpensive
isExpensive()
Is this query expensive (for some definition of expensive)? Then we don't let it run in miser mode.
Definition: SpecialWithoutinterwiki.php:78