MediaWiki  1.23.8
SpecialAllpages.php
Go to the documentation of this file.
1 <?php
30 
36  protected $maxPerPage = 345;
37 
43  protected $maxLineCount = 100;
44 
50  protected $maxPageLength = 70;
51 
60  protected $maxTopLevelPages = 50000;
61 
67  protected $nsfromMsg = 'allpagesfrom';
68 
74  function __construct( $name = 'Allpages' ) {
75  parent::__construct( $name );
76  }
77 
83  function execute( $par ) {
84  $request = $this->getRequest();
85  $out = $this->getOutput();
86 
87  $this->setHeaders();
88  $this->outputHeader();
89  $out->allowClickjacking();
90 
91  # GET values
92  $from = $request->getVal( 'from', null );
93  $to = $request->getVal( 'to', null );
94  $namespace = $request->getInt( 'namespace' );
95  $hideredirects = $request->getBool( 'hideredirects', false );
96 
97  $namespaces = $this->getContext()->getLanguage()->getNamespaces();
98 
99  $out->setPageTitle(
100  ( $namespace > 0 && array_key_exists( $namespace, $namespaces ) ) ?
101  $this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
102  $this->msg( 'allarticles' )
103  );
104  $out->addModuleStyles( 'mediawiki.special' );
105 
106  if ( $par !== null ) {
107  $this->showChunk( $namespace, $par, $to, $hideredirects );
108  } elseif ( $from !== null && $to === null ) {
109  $this->showChunk( $namespace, $from, $to, $hideredirects );
110  } else {
111  $this->showToplevel( $namespace, $from, $to, $hideredirects );
112  }
113  }
114 
124  function namespaceForm( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
125  global $wgScript;
126  $t = $this->getPageTitle();
127 
128  $out = Xml::openElement( 'div', array( 'class' => 'namespaceoptions' ) );
129  $out .= Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
130  $out .= Html::hidden( 'title', $t->getPrefixedText() );
131  $out .= Xml::openElement( 'fieldset' );
132  $out .= Xml::element( 'legend', null, $this->msg( 'allpages' )->text() );
133  $out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
134  $out .= "<tr>
135  <td class='mw-label'>" .
136  Xml::label( $this->msg( 'allpagesfrom' )->text(), 'nsfrom' ) .
137  " </td>
138  <td class='mw-input'>" .
139  Xml::input( 'from', 30, str_replace( '_', ' ', $from ), array( 'id' => 'nsfrom' ) ) .
140  " </td>
141 </tr>
142 <tr>
143  <td class='mw-label'>" .
144  Xml::label( $this->msg( 'allpagesto' )->text(), 'nsto' ) .
145  " </td>
146  <td class='mw-input'>" .
147  Xml::input( 'to', 30, str_replace( '_', ' ', $to ), array( 'id' => 'nsto' ) ) .
148  " </td>
149 </tr>
150 <tr>
151  <td class='mw-label'>" .
152  Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) .
153  " </td>
154  <td class='mw-input'>" .
156  array( 'selected' => $namespace ),
157  array( 'name' => 'namespace', 'id' => 'namespace' )
158  ) . ' ' .
160  $this->msg( 'allpages-hide-redirects' )->text(),
161  'hideredirects',
162  'hideredirects',
163  $hideredirects
164  ) . ' ' .
165  Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
166  " </td>
167 </tr>";
168  $out .= Xml::closeElement( 'table' );
169  $out .= Xml::closeElement( 'fieldset' );
170  $out .= Xml::closeElement( 'form' );
171  $out .= Xml::closeElement( 'div' );
172 
173  return $out;
174  }
175 
182  function showToplevel( $namespace = NS_MAIN, $from = '', $to = '', $hideredirects = false ) {
183  $output = $this->getOutput();
184 
185  # TODO: Either make this *much* faster or cache the title index points
186  # in the querycache table.
187 
188  $dbr = wfGetDB( DB_SLAVE );
189  $out = "";
190  $where = array( 'page_namespace' => $namespace );
191 
192  if ( $hideredirects ) {
193  $where['page_is_redirect'] = 0;
194  }
195 
196  $from = Title::makeTitleSafe( $namespace, $from );
197  $to = Title::makeTitleSafe( $namespace, $to );
198  $from = ( $from && $from->isLocal() ) ? $from->getDBkey() : null;
199  $to = ( $to && $to->isLocal() ) ? $to->getDBkey() : null;
200 
201  if ( isset( $from ) ) {
202  $where[] = 'page_title >= ' . $dbr->addQuotes( $from );
203  }
204 
205  if ( isset( $to ) ) {
206  $where[] = 'page_title <= ' . $dbr->addQuotes( $to );
207  }
208 
209  global $wgMemc;
210  $key = wfMemcKey( 'allpages', 'ns', $namespace, sha1( $from ), sha1( $to ) );
211  $lines = $wgMemc->get( $key );
212 
213  $count = $dbr->estimateRowCount( 'page', '*', $where, __METHOD__ );
214 
215  // Don't show a hierarchical list if the number of pages is very large,
216  // since generating it will cause a lot of scanning
217  if ( $count > $this->maxTopLevelPages ) {
218  $this->showChunk( $namespace, $from, $to, $hideredirects );
219 
220  return;
221  }
222 
223  $maxPerSubpage = intval( $count / $this->maxLineCount );
224  $maxPerSubpage = max( $maxPerSubpage, $this->maxPerPage );
225 
226  if ( !is_array( $lines ) ) {
227  $options = array( 'LIMIT' => 1 );
228  $options['ORDER BY'] = 'page_title ASC';
229  $firstTitle = $dbr->selectField( 'page', 'page_title', $where, __METHOD__, $options );
230  $lastTitle = $firstTitle;
231  # This array is going to hold the page_titles in order.
232  $lines = array( $firstTitle );
233  # If we are going to show n rows, we need n+1 queries to find the relevant titles.
234  $done = false;
235  while ( !$done ) {
236  // Fetch the last title of this chunk and the first of the next
237  $chunk = ( $lastTitle === false )
238  ? array()
239  : array( 'page_title >= ' . $dbr->addQuotes( $lastTitle ) );
240  $res = $dbr->select( 'page', /* FROM */
241  'page_title', /* WHAT */
242  array_merge( $where, $chunk ),
243  __METHOD__,
244  array( 'LIMIT' => 2, 'OFFSET' => $maxPerSubpage - 1, 'ORDER BY' => 'page_title ASC' )
245  );
246 
247  $s = $dbr->fetchObject( $res );
248  if ( $s ) {
249  array_push( $lines, $s->page_title );
250  } else {
251  // Final chunk, but ended prematurely. Go back and find the end.
252  $endTitle = $dbr->selectField( 'page', 'MAX(page_title)',
253  array_merge( $where, $chunk ),
254  __METHOD__ );
255  array_push( $lines, $endTitle );
256  $done = true;
257  }
258 
259  $s = $res->fetchObject();
260  if ( $s ) {
261  array_push( $lines, $s->page_title );
262  $lastTitle = $s->page_title;
263  } else {
264  // This was a final chunk and ended exactly at the limit.
265  // Rare but convenient!
266  $done = true;
267  }
268  $res->free();
269  }
270  $wgMemc->add( $key, $lines, 3600 );
271  }
272 
273  // If there are only two or less sections, don't even display them.
274  // Instead, display the first section directly.
275  if ( count( $lines ) <= 2 ) {
276  if ( !empty( $lines ) ) {
277  $this->showChunk( $namespace, $from, $to, $hideredirects );
278  } else {
279  $output->addHTML( $this->namespaceForm( $namespace, $from, $to, $hideredirects ) );
280  }
281 
282  return;
283  }
284 
285  # At this point, $lines should contain an even number of elements.
286  $out .= Xml::openElement( 'table', array( 'class' => 'allpageslist' ) );
287  while ( count( $lines ) > 0 ) {
288  $inpoint = array_shift( $lines );
289  $outpoint = array_shift( $lines );
290  $out .= $this->showline( $inpoint, $outpoint, $namespace, $hideredirects );
291  }
292  $out .= Xml::closeElement( 'table' );
293  $nsForm = $this->namespaceForm( $namespace, $from, $to, $hideredirects );
294 
295  # Is there more?
296  if ( $this->including() ) {
297  $out2 = '';
298  } else {
299  if ( isset( $from ) || isset( $to ) ) {
300  $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ) .
301  '<tr>
302  <td>' .
303  $nsForm .
304  '</td>
305  <td class="mw-allpages-nav">' .
306  Linker::link( $this->getPageTitle(), $this->msg( 'allpages' )->escaped(),
307  array(), array(), 'known' ) .
308  "</td>
309  </tr>" .
310  Xml::closeElement( 'table' );
311  } else {
312  $out2 = $nsForm;
313  }
314  }
315  $output->addHTML( $out2 . $out );
316  }
317 
327  function showline( $inpoint, $outpoint, $namespace = NS_MAIN, $hideRedirects = false ) {
328  // Use content language since page titles are considered to use content language
330 
331  $inpointf = str_replace( '_', ' ', $inpoint );
332  $outpointf = str_replace( '_', ' ', $outpoint );
333 
334  // Don't let the length runaway
335  $inpointf = $wgContLang->truncate( $inpointf, $this->maxPageLength );
336  $outpointf = $wgContLang->truncate( $outpointf, $this->maxPageLength );
337 
338  $queryParams = array(
339  'from' => $inpoint,
340  'to' => $outpoint,
341  );
342 
343  if ( $namespace ) {
344  $queryParams['namespace'] = $namespace;
345  }
346  if ( $hideRedirects ) {
347  $queryParams['hideredirects'] = 1;
348  }
349 
350  $url = $this->getPageTitle()->getLocalURL( $queryParams );
351  $inlink = Html::element( 'a', array( 'href' => $url ), $inpointf );
352  $outlink = Html::element( 'a', array( 'href' => $url ), $outpointf );
353 
354  $out = $this->msg( 'alphaindexline' )->rawParams(
355  "$inlink</td><td>",
356  "</td><td>$outlink"
357  )->escaped();
358 
359  return '<tr><td class="mw-allpages-alphaindexline">' . $out . '</td></tr>';
360  }
361 
368  function showChunk( $namespace = NS_MAIN, $from = false, $to = false, $hideredirects = false ) {
369  $output = $this->getOutput();
370 
371  $fromList = $this->getNamespaceKeyAndText( $namespace, $from );
372  $toList = $this->getNamespaceKeyAndText( $namespace, $to );
373  $namespaces = $this->getContext()->getLanguage()->getNamespaces();
374  $n = 0;
375 
376  if ( !$fromList || !$toList ) {
377  $out = $this->msg( 'allpagesbadtitle' )->parseAsBlock();
378  } elseif ( !array_key_exists( $namespace, $namespaces ) ) {
379  // Show errormessage and reset to NS_MAIN
380  $out = $this->msg( 'allpages-bad-ns', $namespace )->parse();
381  $namespace = NS_MAIN;
382  } else {
383  list( $namespace, $fromKey, $from ) = $fromList;
384  list( , $toKey, $to ) = $toList;
385 
386  $dbr = wfGetDB( DB_SLAVE );
387  $conds = array(
388  'page_namespace' => $namespace,
389  'page_title >= ' . $dbr->addQuotes( $fromKey )
390  );
391 
392  if ( $hideredirects ) {
393  $conds['page_is_redirect'] = 0;
394  }
395 
396  if ( $toKey !== "" ) {
397  $conds[] = 'page_title <= ' . $dbr->addQuotes( $toKey );
398  }
399 
400  $res = $dbr->select( 'page',
401  array( 'page_namespace', 'page_title', 'page_is_redirect', 'page_id' ),
402  $conds,
403  __METHOD__,
404  array(
405  'ORDER BY' => 'page_title',
406  'LIMIT' => $this->maxPerPage + 1,
407  'USE INDEX' => 'name_title',
408  )
409  );
410 
411  if ( $res->numRows() > 0 ) {
412  $out = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-chunk' ) );
413  while ( ( $n < $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
414  $t = Title::newFromRow( $s );
415  if ( $t ) {
416  $link = ( $s->page_is_redirect ? '<div class="allpagesredirect">' : '' ) .
417  Linker::link( $t ) .
418  ( $s->page_is_redirect ? '</div>' : '' );
419  } else {
420  $link = '[[' . htmlspecialchars( $s->page_title ) . ']]';
421  }
422 
423  if ( $n % 3 == 0 ) {
424  $out .= '<tr>';
425  }
426 
427  $out .= "<td style=\"width:33%\">$link</td>";
428  $n++;
429  if ( $n % 3 == 0 ) {
430  $out .= "</tr>\n";
431  }
432  }
433 
434  if ( ( $n % 3 ) != 0 ) {
435  $out .= "</tr>\n";
436  }
437  $out .= Xml::closeElement( 'table' );
438  } else {
439  $out = '';
440  }
441  }
442 
443  if ( $this->including() ) {
444  $out2 = '';
445  } else {
446  if ( $from == '' ) {
447  // First chunk; no previous link.
448  $prevTitle = null;
449  } else {
450  # Get the last title from previous chunk
451  $dbr = wfGetDB( DB_SLAVE );
452  $res_prev = $dbr->select(
453  'page',
454  'page_title',
455  array( 'page_namespace' => $namespace, 'page_title < ' . $dbr->addQuotes( $from ) ),
456  __METHOD__,
457  array( 'ORDER BY' => 'page_title DESC',
458  'LIMIT' => $this->maxPerPage, 'OFFSET' => ( $this->maxPerPage - 1 )
459  )
460  );
461 
462  # Get first title of previous complete chunk
463  if ( $dbr->numrows( $res_prev ) >= $this->maxPerPage ) {
464  $pt = $dbr->fetchObject( $res_prev );
465  $prevTitle = Title::makeTitle( $namespace, $pt->page_title );
466  } else {
467  # The previous chunk is not complete, need to link to the very first title
468  # available in the database
469  $options = array( 'LIMIT' => 1 );
470  if ( !$dbr->implicitOrderby() ) {
471  $options['ORDER BY'] = 'page_title';
472  }
473  $reallyFirstPage_title = $dbr->selectField( 'page', 'page_title',
474  array( 'page_namespace' => $namespace ), __METHOD__, $options );
475  # Show the previous link if it s not the current requested chunk
476  if ( $from != $reallyFirstPage_title ) {
477  $prevTitle = Title::makeTitle( $namespace, $reallyFirstPage_title );
478  } else {
479  $prevTitle = null;
480  }
481  }
482  }
483 
484  $self = $this->getPageTitle();
485 
486  $nsForm = $this->namespaceForm( $namespace, $from, $to, $hideredirects );
487  $out2 = Xml::openElement( 'table', array( 'class' => 'mw-allpages-table-form' ) ) .
488  '<tr>
489  <td>' .
490  $nsForm .
491  '</td>
492  <td class="mw-allpages-nav">' .
493  Linker::link( $self, $this->msg( 'allpages' )->escaped() );
494 
495  # Do we put a previous link ?
496  if ( isset( $prevTitle ) && $pt = $prevTitle->getText() ) {
497  $query = array( 'from' => $prevTitle->getText() );
498 
499  if ( $namespace ) {
500  $query['namespace'] = $namespace;
501  }
502 
503  if ( $hideredirects ) {
504  $query['hideredirects'] = $hideredirects;
505  }
506 
507  $prevLink = Linker::linkKnown(
508  $self,
509  $this->msg( 'prevpage', $pt )->escaped(),
510  array(),
511  $query
512  );
513  $out2 = $this->getLanguage()->pipeList( array( $out2, $prevLink ) );
514  }
515 
516  if ( $n == $this->maxPerPage && $s = $res->fetchObject() ) {
517  # $s is the first link of the next chunk
518  $t = Title::makeTitle( $namespace, $s->page_title );
519  $query = array( 'from' => $t->getText() );
520 
521  if ( $namespace ) {
522  $query['namespace'] = $namespace;
523  }
524 
525  if ( $hideredirects ) {
526  $query['hideredirects'] = $hideredirects;
527  }
528 
529  $nextLink = Linker::linkKnown(
530  $self,
531  $this->msg( 'nextpage', $t->getText() )->escaped(),
532  array(),
533  $query
534  );
535  $out2 = $this->getLanguage()->pipeList( array( $out2, $nextLink ) );
536  }
537  $out2 .= "</td></tr></table>";
538  }
539 
540  $output->addHTML( $out2 . $out );
541 
542  $links = array();
543  if ( isset( $prevLink ) ) {
544  $links[] = $prevLink;
545  }
546 
547  if ( isset( $nextLink ) ) {
548  $links[] = $nextLink;
549  }
550 
551  if ( count( $links ) ) {
552  $output->addHTML(
553  Html::element( 'hr' ) .
554  Html::rawElement( 'div', array( 'class' => 'mw-allpages-nav' ),
555  $this->getLanguage()->pipeList( $links )
556  )
557  );
558  }
559  }
560 
566  protected function getNamespaceKeyAndText( $ns, $text ) {
567  if ( $text == '' ) {
568  # shortcut for common case
569  return array( $ns, '', '' );
570  }
571 
572  $t = Title::makeTitleSafe( $ns, $text );
573  if ( $t && $t->isLocal() ) {
574  return array( $t->getNamespace(), $t->getDBkey(), $t->getText() );
575  } elseif ( $t ) {
576  return null;
577  }
578 
579  # try again, in case the problem was an empty pagename
580  $text = preg_replace( '/(#|$)/', 'X$1', $text );
581  $t = Title::makeTitleSafe( $ns, $text );
582  if ( $t && $t->isLocal() ) {
583  return array( $t->getNamespace(), '', '' );
584  } else {
585  return null;
586  }
587  }
588 
589  protected function getGroupName() {
590  return 'pages';
591  }
592 }
Xml\checkLabel
static checkLabel( $label, $name, $id, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox with a label.
Definition: Xml.php:433
SpecialPage\getPageTitle
getPageTitle( $subpage=false)
Get a self-referential title object.
Definition: SpecialPage.php:488
Title\makeTitle
static & makeTitle( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:398
SpecialAllpages\__construct
__construct( $name='Allpages')
Constructor.
Definition: SpecialAllpages.php:70
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
SpecialAllpages\$maxTopLevelPages
$maxTopLevelPages
Maximum number of pages in a hierarchical ("top level") list.
Definition: SpecialAllpages.php:57
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
$wgMemc
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $wgMemc
Definition: globals.txt:25
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3659
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
SpecialAllpages\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialAllpages.php:585
$n
$n
Definition: RandomTest.php:76
$from
$from
Definition: importImages.php:90
SpecialAllpages\execute
execute( $par)
Entry point : initialise variables and call subfunctions.
Definition: SpecialAllpages.php:79
$s
$s
Definition: mergeMessageFileList.php:156
IncludableSpecialPage
Shortcut to construct an includable special page.
Definition: IncludableSpecialPage.php:29
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:662
$wgContLang
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
SpecialPage\getLanguage
getLanguage()
Shortcut to get user's language.
Definition: SpecialPage.php:578
SpecialAllpages\$nsfromMsg
string $nsfromMsg
Determines, which message describes the input field 'nsfrom'.
Definition: SpecialAllpages.php:63
$link
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
Definition: hooks.txt:2149
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:109
Linker\linkKnown
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
Definition: Linker.php:264
SpecialAllpages\$maxPageLength
int $maxPageLength
Maximum number of chars to show for an entry.
Definition: SpecialAllpages.php:47
$dbr
$dbr
Definition: testCompression.php:48
Linker\link
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
NS_MAIN
const NS_MAIN
Definition: Defines.php:79
SpecialAllpages\$maxPerPage
int $maxPerPage
Maximum number of pages to show on single subpage.
Definition: SpecialAllpages.php:35
wfMemcKey
wfMemcKey()
Get a cache key.
Definition: GlobalFunctions.php:3580
$out
$out
Definition: UtfNormalGenerate.php:167
SpecialAllpages\showline
showline( $inpoint, $outpoint, $namespace=NS_MAIN, $hideRedirects=false)
Show a line of "ABC to DEF" ranges of articles.
Definition: SpecialAllpages.php:323
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
Title\newFromRow
static newFromRow( $row)
Make a Title object from a DB row.
Definition: Title.php:345
SpecialAllpages\namespaceForm
namespaceForm( $namespace=NS_MAIN, $from='', $to='', $hideredirects=false)
HTML for the top form.
Definition: SpecialAllpages.php:120
Xml\element
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Definition: Xml.php:39
$lines
$lines
Definition: router.php:65
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:352
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
false
processing should stop and the error should be shown to the user * false
Definition: hooks.txt:188
SpecialPage\getContext
getContext()
Gets the context this SpecialPage is executed in.
Definition: SpecialPage.php:508
$options
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 & $options
Definition: hooks.txt:1530
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
$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
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
SpecialAllpages\getNamespaceKeyAndText
getNamespaceKeyAndText( $ns, $text)
Definition: SpecialAllpages.php:562
$count
$count
Definition: UtfNormalTest2.php:96
$self
$self
Definition: doMaintenance.php:54
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
$namespaces
namespace and then decline to actually register it & $namespaces
Definition: hooks.txt:815
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:118
SpecialAllpages\showToplevel
showToplevel( $namespace=NS_MAIN, $from='', $to='', $hideredirects=false)
Definition: SpecialAllpages.php:178
$output
& $output
Definition: hooks.txt:375
Html\namespaceSelector
static namespaceSelector(array $params=array(), array $selectAttribs=array())
Build a drop-down box for selecting a namespace.
Definition: Html.php:707
SpecialAllpages\$maxLineCount
int $maxLineCount
Maximum number of pages to show on single index subpage.
Definition: SpecialAllpages.php:41
Xml\submitButton
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
Definition: Xml.php:463
$t
$t
Definition: testCompression.php:65
SpecialAllpages
Implements Special:Allpages.
Definition: SpecialAllpages.php:29
Xml\input
static input( $name, $size=false, $value=false, $attribs=array())
Convenience function to build an HTML text input field.
Definition: Xml.php:294
Html\rawElement
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
Definition: Html.php:124
Xml\label
static label( $label, $id, $attribs=array())
Convenience function to build an HTML form label.
Definition: Xml.php:374
$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
SpecialAllpages\showChunk
showChunk( $namespace=NS_MAIN, $from=false, $to=false, $hideredirects=false)
Definition: SpecialAllpages.php:364
$res
$res
Definition: database.txt:21
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:443
SpecialPage\including
including( $x=null)
Whether the special page is being evaluated via transclusion.
Definition: SpecialPage.php:207