MediaWiki  1.23.8
SpecialProtectedpages.php
Go to the documentation of this file.
1 <?php
30 
31  protected $IdLevel = 'level';
32  protected $IdType = 'type';
33 
34  public function __construct() {
35  parent::__construct( 'Protectedpages' );
36  }
37 
38  public function execute( $par ) {
39  $this->setHeaders();
40  $this->outputHeader();
41  $this->getOutput()->addModuleStyles( 'mediawiki.special' );
42 
43  // Purge expired entries on one in every 10 queries
44  if ( !mt_rand( 0, 10 ) ) {
46  }
47 
48  $request = $this->getRequest();
49  $type = $request->getVal( $this->IdType );
50  $level = $request->getVal( $this->IdLevel );
51  $sizetype = $request->getVal( 'sizetype' );
52  $size = $request->getIntOrNull( 'size' );
53  $ns = $request->getIntOrNull( 'namespace' );
54  $indefOnly = $request->getBool( 'indefonly' ) ? 1 : 0;
55  $cascadeOnly = $request->getBool( 'cascadeonly' ) ? 1 : 0;
56  $noRedirect = $request->getBool( 'noredirect' ) ? 1 : 0;
57 
58  $pager = new ProtectedPagesPager(
59  $this,
60  array(),
61  $type,
62  $level,
63  $ns,
64  $sizetype,
65  $size,
66  $indefOnly,
67  $cascadeOnly,
68  $noRedirect
69  );
70 
71  $this->getOutput()->addHTML( $this->showOptions(
72  $ns,
73  $type,
74  $level,
75  $sizetype,
76  $size,
77  $indefOnly,
78  $cascadeOnly,
79  $noRedirect
80  ) );
81 
82  if ( $pager->getNumRows() ) {
83  $this->getOutput()->addHTML(
84  $pager->getNavigationBar() .
85  $pager->getBody() .
86  $pager->getNavigationBar()
87  );
88  } else {
89  $this->getOutput()->addWikiMsg( 'protectedpagesempty' );
90  }
91  }
92 
104  protected function showOptions( $namespace, $type = 'edit', $level, $sizetype,
105  $size, $indefOnly, $cascadeOnly, $noRedirect
106  ) {
107  global $wgScript;
108 
109  $title = $this->getPageTitle();
110 
111  return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
112  Xml::openElement( 'fieldset' ) .
113  Xml::element( 'legend', array(), $this->msg( 'protectedpages' )->text() ) .
114  Html::hidden( 'title', $title->getPrefixedDBkey() ) . "\n" .
115  $this->getNamespaceMenu( $namespace ) . "&#160;\n" .
116  $this->getTypeMenu( $type ) . "&#160;\n" .
117  $this->getLevelMenu( $level ) . "&#160;\n" .
118  "<br /><span style='white-space: nowrap'>" .
119  $this->getExpiryCheck( $indefOnly ) . "&#160;\n" .
120  $this->getCascadeCheck( $cascadeOnly ) . "&#160;\n" .
121  $this->getRedirectCheck( $noRedirect ) . "&#160;\n" .
122  "</span><br /><span style='white-space: nowrap'>" .
123  $this->getSizeLimit( $sizetype, $size ) . "&#160;\n" .
124  "</span>" .
125  "&#160;" . Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n" .
126  Xml::closeElement( 'fieldset' ) .
127  Xml::closeElement( 'form' );
128  }
129 
137  protected function getNamespaceMenu( $namespace = null ) {
138  return Html::rawElement( 'span', array( 'style' => 'white-space: nowrap;' ),
140  array(
141  'selected' => $namespace,
142  'all' => '',
143  'label' => $this->msg( 'namespace' )->text()
144  ), array(
145  'name' => 'namespace',
146  'id' => 'namespace',
147  'class' => 'namespaceselector',
148  )
149  )
150  );
151  }
152 
157  protected function getExpiryCheck( $indefOnly ) {
158  return Xml::checkLabel(
159  $this->msg( 'protectedpages-indef' )->text(),
160  'indefonly',
161  'indefonly',
162  $indefOnly
163  ) . "\n";
164  }
165 
170  protected function getCascadeCheck( $cascadeOnly ) {
171  return Xml::checkLabel(
172  $this->msg( 'protectedpages-cascade' )->text(),
173  'cascadeonly',
174  'cascadeonly',
175  $cascadeOnly
176  ) . "\n";
177  }
178 
183  protected function getRedirectCheck( $noRedirect ) {
184  return Xml::checkLabel(
185  $this->msg( 'protectedpages-noredirect' )->text(),
186  'noredirect',
187  'noredirect',
188  $noRedirect
189  ) . "\n";
190  }
191 
197  protected function getSizeLimit( $sizetype, $size ) {
198  $max = $sizetype === 'max';
199 
200  return Xml::radioLabel(
201  $this->msg( 'minimum-size' )->text(),
202  'sizetype',
203  'min',
204  'wpmin',
205  !$max
206  ) .
207  '&#160;' .
209  $this->msg( 'maximum-size' )->text(),
210  'sizetype',
211  'max',
212  'wpmax',
213  $max
214  ) .
215  '&#160;' .
216  Xml::input( 'size', 9, $size, array( 'id' => 'wpsize' ) ) .
217  '&#160;' .
218  Xml::label( $this->msg( 'pagesize' )->text(), 'wpsize' );
219  }
220 
226  protected function getTypeMenu( $pr_type ) {
227  $m = array(); // Temporary array
228  $options = array();
229 
230  // First pass to load the log names
231  foreach ( Title::getFilteredRestrictionTypes( true ) as $type ) {
232  // Messages: restriction-edit, restriction-move, restriction-create, restriction-upload
233  $text = $this->msg( "restriction-$type" )->text();
234  $m[$text] = $type;
235  }
236 
237  // Third pass generates sorted XHTML content
238  foreach ( $m as $text => $type ) {
239  $selected = ( $type == $pr_type );
240  $options[] = Xml::option( $text, $type, $selected ) . "\n";
241  }
242 
243  return "<span style='white-space: nowrap'>" .
244  Xml::label( $this->msg( 'restriction-type' )->text(), $this->IdType ) . '&#160;' .
245  Xml::tags( 'select',
246  array( 'id' => $this->IdType, 'name' => $this->IdType ),
247  implode( "\n", $options ) ) . "</span>";
248  }
249 
255  protected function getLevelMenu( $pr_level ) {
256  global $wgRestrictionLevels;
257 
258  // Temporary array
259  $m = array( $this->msg( 'restriction-level-all' )->text() => 0 );
260  $options = array();
261 
262  // First pass to load the log names
263  foreach ( $wgRestrictionLevels as $type ) {
264  // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed'
265  if ( $type != '' && $type != '*' ) {
266  $text = $this->msg( "restriction-level-$type" )->text();
267  $m[$text] = $type;
268  }
269  }
270 
271  // Third pass generates sorted XHTML content
272  foreach ( $m as $text => $type ) {
273  $selected = ( $type == $pr_level );
274  $options[] = Xml::option( $text, $type, $selected );
275  }
276 
277  return "<span style='white-space: nowrap'>" .
278  Xml::label( $this->msg( 'restriction-level' )->text(), $this->IdLevel ) . ' ' .
279  Xml::tags( 'select',
280  array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
281  implode( "\n", $options ) ) . "</span>";
282  }
283 
284  protected function getGroupName() {
285  return 'maintenance';
286  }
287 }
288 
294  public $mForm, $mConds;
296 
297  function __construct( $form, $conds = array(), $type, $level, $namespace,
298  $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = false, $noredirect = false
299  ) {
300  $this->mForm = $form;
301  $this->mConds = $conds;
302  $this->type = ( $type ) ? $type : 'edit';
303  $this->level = $level;
304  $this->namespace = $namespace;
305  $this->sizetype = $sizetype;
306  $this->size = intval( $size );
307  $this->indefonly = (bool)$indefonly;
308  $this->cascadeonly = (bool)$cascadeonly;
309  $this->noredirect = (bool)$noredirect;
310  parent::__construct( $form->getContext() );
311  }
312 
314  # Do a link batch query
315  $lb = new LinkBatch;
316  $userids = array();
317 
318  foreach ( $result as $row ) {
319  $lb->add( $row->page_namespace, $row->page_title );
320  // field is nullable, maybe null on old protections
321  if ( $row->log_user !== null ) {
322  $userids[] = $row->log_user;
323  }
324  }
325 
326  // fill LinkBatch with user page and user talk
327  if ( count( $userids ) ) {
328  $userCache = UserCache::singleton();
329  $userCache->doQuery( $userids, array(), __METHOD__ );
330  foreach ( $userids as $userid ) {
331  $name = $userCache->getProp( $userid, 'name' );
332  if ( $name !== false ) {
333  $lb->add( NS_USER, $name );
334  $lb->add( NS_USER_TALK, $name );
335  }
336  }
337  }
338 
339  $lb->execute();
340  }
341 
342  function getFieldNames() {
343  static $headers = null;
344 
345  if ( $headers == array() ) {
346  $headers = array(
347  'log_timestamp' => 'protectedpages-timestamp',
348  'pr_page' => 'protectedpages-page',
349  'pr_expiry' => 'protectedpages-expiry',
350  'log_user' => 'protectedpages-performer',
351  'pr_params' => 'protectedpages-params',
352  'log_comment' => 'protectedpages-reason',
353  );
354  foreach ( $headers as $key => $val ) {
355  $headers[$key] = $this->msg( $val )->text();
356  }
357  }
358 
359  return $headers;
360  }
361 
368  function formatValue( $field, $value ) {
370  $row = $this->mCurrentRow;
371 
372  $formatted = '';
373 
374  switch ( $field ) {
375  case 'log_timestamp':
376  // when timestamp is null, this is a old protection row
377  if ( $value === null ) {
378  $formatted = Html::rawElement(
379  'span',
380  array( 'class' => 'mw-protectedpages-unknown' ),
381  $this->msg( 'protectedpages-unknown-timestamp' )->escaped()
382  );
383  } else {
384  $formatted = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
385  }
386  break;
387 
388  case 'pr_page':
389  $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
390  if ( !$title ) {
391  $formatted = Html::element(
392  'span',
393  array( 'class' => 'mw-invalidtitle' ),
395  $this->getContext(),
396  $row->page_namespace,
397  $row->page_title
398  )
399  );
400  } else {
401  $formatted = Linker::link( $title );
402  }
403  if ( !is_null( $row->page_len ) ) {
404  $formatted .= $this->getLanguage()->getDirMark() .
405  ' ' . Html::rawElement(
406  'span',
407  array( 'class' => 'mw-protectedpages-length' ),
408  Linker::formatRevisionSize( $row->page_len )
409  );
410  }
411  break;
412 
413  case 'pr_expiry':
414  $formatted = $this->getLanguage()->formatExpiry( $value, /* User preference timezone */true );
415  $title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
416  if ( $this->getUser()->isAllowed( 'protect' ) && $title ) {
417  $changeProtection = Linker::linkKnown(
418  $title,
419  $this->msg( 'protect_change' )->escaped(),
420  array(),
421  array( 'action' => 'unprotect' )
422  );
423  $formatted .= ' ' . Html::rawElement(
424  'span',
425  array( 'class' => 'mw-protectedpages-actions' ),
426  $this->msg( 'parentheses' )->rawParams( $changeProtection )->escaped()
427  );
428  }
429  break;
430 
431  case 'log_user':
432  // when timestamp is null, this is a old protection row
433  if ( $row->log_timestamp === null ) {
434  $formatted = Html::rawElement(
435  'span',
436  array( 'class' => 'mw-protectedpages-unknown' ),
437  $this->msg( 'protectedpages-unknown-performer' )->escaped()
438  );
439  } else {
440  $username = UserCache::singleton()->getProp( $value, 'name' );
441  if ( LogEventsList::userCanBitfield( $row->log_deleted, LogPage::DELETED_USER, $this->getUser() ) ) {
442  if ( $username === false ) {
443  $formatted = htmlspecialchars( $value );
444  } else {
445  $formatted = Linker::userLink( $value, $username )
446  . Linker::userToolLinks( $value, $username );
447  }
448  } else {
449  $formatted = $this->msg( 'rev-deleted-user' )->escaped();
450  }
452  $formatted = '<span class="history-deleted">' . $formatted . '</span>';
453  }
454  }
455  break;
456 
457  case 'pr_params':
458  $params = array();
459  // Messages: restriction-level-sysop, restriction-level-autoconfirmed
460  $params[] = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
461  if ( $row->pr_cascade ) {
462  $params[] = $this->msg( 'protect-summary-cascade' )->text();
463  }
464  $formatted = $this->getLanguage()->commaList( $params );
465  break;
466 
467  case 'log_comment':
468  // when timestamp is null, this is an old protection row
469  if ( $row->log_timestamp === null ) {
470  $formatted = Html::rawElement(
471  'span',
472  array( 'class' => 'mw-protectedpages-unknown' ),
473  $this->msg( 'protectedpages-unknown-reason' )->escaped()
474  );
475  } else {
476  if ( LogEventsList::userCanBitfield( $row->log_deleted, LogPage::DELETED_COMMENT, $this->getUser() ) ) {
477  $formatted = Linker::formatComment( $value !== null ? $value : '' );
478  } else {
479  $formatted = $this->msg( 'rev-deleted-comment' )->escaped();
480  }
482  $formatted = '<span class="history-deleted">' . $formatted . '</span>';
483  }
484  }
485  break;
486 
487  default:
488  throw new MWException( "Unknown field '$field'" );
489  }
490 
491  return $formatted;
492  }
493 
494  function getQueryInfo() {
495  $conds = $this->mConds;
496  $conds[] = 'pr_expiry > ' . $this->mDb->addQuotes( $this->mDb->timestamp() ) .
497  'OR pr_expiry IS NULL';
498  $conds[] = 'page_id=pr_page';
499  $conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
500 
501  if ( $this->sizetype == 'min' ) {
502  $conds[] = 'page_len>=' . $this->size;
503  } elseif ( $this->sizetype == 'max' ) {
504  $conds[] = 'page_len<=' . $this->size;
505  }
506 
507  if ( $this->indefonly ) {
508  $infinity = $this->mDb->addQuotes( $this->mDb->getInfinity() );
509  $conds[] = "pr_expiry = $infinity OR pr_expiry IS NULL";
510  }
511  if ( $this->cascadeonly ) {
512  $conds[] = 'pr_cascade = 1';
513  }
514  if ( $this->noredirect ) {
515  $conds[] = 'page_is_redirect = 0';
516  }
517 
518  if ( $this->level ) {
519  $conds[] = 'pr_level=' . $this->mDb->addQuotes( $this->level );
520  }
521  if ( !is_null( $this->namespace ) ) {
522  $conds[] = 'page_namespace=' . $this->mDb->addQuotes( $this->namespace );
523  }
524 
525  return array(
526  'tables' => array( 'page', 'page_restrictions', 'log_search', 'logging' ),
527  'fields' => array(
528  'pr_id',
529  'page_namespace',
530  'page_title',
531  'page_len',
532  'pr_type',
533  'pr_level',
534  'pr_expiry',
535  'pr_cascade',
536  'log_timestamp',
537  'log_user',
538  'log_comment',
539  'log_deleted',
540  ),
541  'conds' => $conds,
542  'join_conds' => array(
543  'log_search' => array(
544  'LEFT JOIN', array(
545  'ls_field' => 'pr_id', 'ls_value = pr_id'
546  )
547  ),
548  'logging' => array(
549  'LEFT JOIN', array(
550  'ls_log_id = log_id'
551  )
552  )
553  )
554  );
555  }
556 
557  public function getTableClass() {
558  return 'TablePager mw-protectedpages';
559  }
560 
561  function getIndexField() {
562  return 'pr_id';
563  }
564 
565  function getDefaultSort() {
566  return 'pr_id';
567  }
568 
569  function isFieldSortable( $field ) {
570  // no index for sorting exists
571  return false;
572  }
573 }
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
$result
The index of the header message $result[1]=The index of the body text message $result[2 through n]=Parameters passed to body text message. Please note the header message cannot receive/use parameters. 'ImportHandleLogItemXMLTag':When parsing a XML tag in a log item. $reader:XMLReader object $logInfo:Array of information Return false to stop further processing of the tag 'ImportHandlePageXMLTag':When parsing a XML tag in a page. $reader:XMLReader object $pageInfo:Array of information Return false to stop further processing of the tag 'ImportHandleRevisionXMLTag':When parsing a XML tag in a page revision. $reader:XMLReader object $pageInfo:Array of page information $revisionInfo:Array of revision information Return false to stop further processing of the tag 'ImportHandleToplevelXMLTag':When parsing a top level XML tag. $reader:XMLReader object Return false to stop further processing of the tag 'ImportHandleUploadXMLTag':When parsing a XML tag in a file upload. $reader:XMLReader object $revisionInfo:Array of information Return false to stop further processing of the tag 'InfoAction':When building information to display on the action=info page. $context:IContextSource object & $pageInfo:Array of information 'InitializeArticleMaybeRedirect':MediaWiki check to see if title is a redirect. $title:Title object for the current page $request:WebRequest $ignoreRedirect:boolean to skip redirect check $target:Title/string of redirect target $article:Article object 'InterwikiLoadPrefix':When resolving if a given prefix is an interwiki or not. Return true without providing an interwiki to continue interwiki search. $prefix:interwiki prefix we are looking for. & $iwData:output array describing the interwiki with keys iw_url, iw_local, iw_trans and optionally iw_api and iw_wikiid. 'InternalParseBeforeSanitize':during Parser 's internalParse method just before the parser removes unwanted/dangerous HTML tags and after nowiki/noinclude/includeonly/onlyinclude and other processings. Ideal for syntax-extensions after template/parser function execution which respect nowiki and HTML-comments. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InternalParseBeforeLinks':during Parser 's internalParse method before links but after nowiki/noinclude/includeonly/onlyinclude and other processings. & $parser:Parser object & $text:string containing partially parsed text & $stripState:Parser 's internal StripState object 'InvalidateEmailComplete':Called after a user 's email has been invalidated successfully. $user:user(object) whose email is being invalidated 'IRCLineURL':When constructing the URL to use in an IRC notification. Callee may modify $url and $query, URL will be constructed as $url . $query & $url:URL to index.php & $query:Query string $rc:RecentChange object that triggered url generation 'IsFileCacheable':Override the result of Article::isFileCacheable()(if true) $article:article(object) being checked 'IsTrustedProxy':Override the result of wfIsTrustedProxy() $ip:IP being check $result:Change this value to override the result of wfIsTrustedProxy() 'IsUploadAllowedFromUrl':Override the result of UploadFromUrl::isAllowedUrl() $url:URL used to upload from & $allowed:Boolean indicating if uploading is allowed for given URL 'isValidEmailAddr':Override the result of User::isValidEmailAddr(), for instance to return false if the domain name doesn 't match your organization. $addr:The e-mail address entered by the user & $result:Set this and return false to override the internal checks 'isValidPassword':Override the result of User::isValidPassword() $password:The password entered by the user & $result:Set this and return false to override the internal checks $user:User the password is being validated for 'Language::getMessagesFileName':$code:The language code or the language we 're looking for a messages file for & $file:The messages file path, you can override this to change the location. 'LanguageGetNamespaces':Provide custom ordering for namespaces or remove namespaces. Do not use this hook to add namespaces. Use CanonicalNamespaces for that. & $namespaces:Array of namespaces indexed by their numbers 'LanguageGetMagic':DEPRECATED, use $magicWords in a file listed in $wgExtensionMessagesFiles instead. Use this to define synonyms of magic words depending of the language $magicExtensions:associative array of magic words synonyms $lang:language code(string) 'LanguageGetSpecialPageAliases':DEPRECATED, use $specialPageAliases in a file listed in $wgExtensionMessagesFiles instead. Use to define aliases of special pages names depending of the language $specialPageAliases:associative array of magic words synonyms $lang:language code(string) 'LanguageGetTranslatedLanguageNames':Provide translated language names. & $names:array of language code=> language name $code language of the preferred translations 'LanguageLinks':Manipulate a page 's language links. This is called in various places to allow extensions to define the effective language links for a page. $title:The page 's Title. & $links:Associative array mapping language codes to prefixed links of the form "language:title". & $linkFlags:Associative array mapping prefixed links to arrays of flags. Currently unused, but planned to provide support for marking individual language links in the UI, e.g. for featured articles. 'LinkBegin':Used when generating internal and interwiki links in Linker::link(), before processing starts. Return false to skip default processing and return $ret. See documentation for Linker::link() for details on the expected meanings of parameters. $skin:the Skin object $target:the Title that the link is pointing to & $html:the contents that the< a > tag should have(raw HTML) $result
Definition: hooks.txt:1528
ProtectedPagesPager\$level
$level
Definition: SpecialProtectedpages.php:295
ContextSource\getContext
getContext()
Get the RequestContext object.
Definition: ContextSource.php:40
SpecialProtectedpages\execute
execute( $par)
Default execute method Checks user permissions, calls the function given in mFunction.
Definition: SpecialProtectedpages.php:38
Title\getFilteredRestrictionTypes
static getFilteredRestrictionTypes( $exists=true)
Get a filtered list of all restriction types supported by this wiki.
Definition: Title.php:2450
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
ContextSource\msg
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Definition: ContextSource.php:175
LinkBatch
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:30
Xml\tags
static tags( $element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
Definition: Xml.php:131
Linker\userLink
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition: Linker.php:1072
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
TablePager\$mCurrentRow
$mCurrentRow
Definition: Pager.php:927
ProtectedPagesPager\isFieldSortable
isFieldSortable( $field)
Return true if the named field should be sortable by the UI, false otherwise.
Definition: SpecialProtectedpages.php:569
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
ProtectedPagesPager\formatValue
formatValue( $field, $value)
Definition: SpecialProtectedpages.php:368
$form
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Definition: hooks.txt:2573
ProtectedPagesPager\getIndexField
getIndexField()
Definition: SpecialProtectedpages.php:561
Xml\option
static option( $text, $value=null, $selected=false, $attribs=array())
Convenience function to build an HTML drop-down list item.
Definition: Xml.php:475
ProtectedPagesPager\__construct
__construct( $form, $conds=array(), $type, $level, $namespace, $sizetype='', $size=0, $indefonly=false, $cascadeonly=false, $noredirect=false)
Definition: SpecialProtectedpages.php:297
$params
$params
Definition: styleTest.css.php:40
ProtectedPagesPager\getQueryInfo
getQueryInfo()
This function should be overridden to provide all parameters needed for the main paged query.
Definition: SpecialProtectedpages.php:494
ProtectedPagesPager\getDefaultSort
getDefaultSort()
The database field name used as a default sort order.
Definition: SpecialProtectedpages.php:565
ProtectedPagesPager\$type
$type
Definition: SpecialProtectedpages.php:295
ProtectedPagesPager\getTableClass
getTableClass()
Definition: SpecialProtectedpages.php:557
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:662
Linker\formatComment
static formatComment( $comment, $title=null, $local=false)
This function is called by all recent changes variants, by the page history, and by the user contribu...
Definition: Linker.php:1254
Linker\getInvalidTitleDescription
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
Definition: Linker.php:427
ProtectedPagesPager\$mForm
$mForm
Definition: SpecialProtectedpages.php:294
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:132
ProtectedPagesPager\$namespace
$namespace
Definition: SpecialProtectedpages.php:295
SpecialProtectedpages\getSizeLimit
getSizeLimit( $sizetype, $size)
Definition: SpecialProtectedpages.php:197
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:109
ProtectedPagesPager\preprocessResults
preprocessResults( $result)
Pre-process results; useful for performing batch existence checks, etc.
Definition: SpecialProtectedpages.php:313
Xml\radioLabel
static radioLabel( $label, $name, $value, $id, $checked=false, $attribs=array())
Convenience function to build an HTML radio button with a label.
Definition: Xml.php:451
SpecialProtectedpages\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialProtectedpages.php:284
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
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
ContextSource\getLanguage
getLanguage()
Get the Language object.
Definition: ContextSource.php:154
$lb
if( $wgAPIRequestLog) $lb
Definition: api.php:126
MWException
MediaWiki exception.
Definition: MWException.php:26
SpecialProtectedpages\getRedirectCheck
getRedirectCheck( $noRedirect)
Definition: SpecialProtectedpages.php:183
ProtectedPagesPager\$size
$size
Definition: SpecialProtectedpages.php:295
LogPage\DELETED_COMMENT
const DELETED_COMMENT
Definition: LogPage.php:34
ProtectedPagesPager\$cascadeonly
$cascadeonly
Definition: SpecialProtectedpages.php:295
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
LogPage\DELETED_USER
const DELETED_USER
Definition: LogPage.php:35
SpecialProtectedpages
A special page that lists protected pages.
Definition: SpecialProtectedpages.php:29
TablePager
Table-based display with a user-selectable sort order.
Definition: Pager.php:925
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
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
SpecialProtectedpages\showOptions
showOptions( $namespace, $type='edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly, $noRedirect)
Definition: SpecialProtectedpages.php:104
SpecialProtectedpages\getLevelMenu
getLevelMenu( $pr_level)
Creates the input label of the restriction level.
Definition: SpecialProtectedpages.php:255
SpecialProtectedpages\getTypeMenu
getTypeMenu( $pr_type)
Creates the input label of the restriction type.
Definition: SpecialProtectedpages.php:226
$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
ProtectedPagesPager\$indefonly
$indefonly
Definition: SpecialProtectedpages.php:295
Title\makeTitleSafe
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Definition: Title.php:422
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
NS_USER_TALK
const NS_USER_TALK
Definition: Defines.php:82
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
$size
$size
Definition: RandomTest.php:75
$value
$value
Definition: styleTest.css.php:45
Linker\userToolLinks
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition: Linker.php:1100
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
SpecialPage
Parent class for all special pages.
Definition: SpecialPage.php:33
SpecialProtectedpages\getNamespaceMenu
getNamespaceMenu( $namespace=null)
Prepare the namespace filter drop-down; standard namespace selector, sans the MediaWiki namespace.
Definition: SpecialProtectedpages.php:137
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
Linker\formatRevisionSize
static formatRevisionSize( $size)
Definition: Linker.php:1600
SpecialProtectedpages\$IdType
$IdType
Definition: SpecialProtectedpages.php:32
ProtectedPagesPager\getFieldNames
getFieldNames()
An array mapping database field names to a textual description of the field name, for use in the tabl...
Definition: SpecialProtectedpages.php:342
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:118
type
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
Definition: postgres.txt:22
ProtectedPagesPager\$noredirect
$noredirect
Definition: SpecialProtectedpages.php:295
LogEventsList\userCanBitfield
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this log row,...
Definition: LogEventsList.php:456
SpecialProtectedpages\getCascadeCheck
getCascadeCheck( $cascadeOnly)
Definition: SpecialProtectedpages.php:170
as
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
Html\namespaceSelector
static namespaceSelector(array $params=array(), array $selectAttribs=array())
Build a drop-down box for selecting a namespace.
Definition: Html.php:707
UserCache\singleton
static singleton()
Definition: UserCache.php:34
LogEventsList\isDeleted
static isDeleted( $row, $field)
Definition: LogEventsList.php:480
SpecialProtectedpages\__construct
__construct()
Definition: SpecialProtectedpages.php:34
NS_USER
const NS_USER
Definition: Defines.php:81
Xml\submitButton
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
Definition: Xml.php:463
SpecialProtectedpages\$IdLevel
$IdLevel
Definition: SpecialProtectedpages.php:31
ProtectedPagesPager\$mConds
$mConds
Definition: SpecialProtectedpages.php:294
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
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
Title\purgeExpiredRestrictions
static purgeExpiredRestrictions()
Purge expired restrictions from the page_restrictions table.
Definition: Title.php:2988
ProtectedPagesPager
Definition: SpecialProtectedpages.php:293
SpecialProtectedpages\getExpiryCheck
getExpiryCheck( $indefOnly)
Definition: SpecialProtectedpages.php:157
$type
$type
Definition: testCompression.php:46
ProtectedPagesPager\$sizetype
$sizetype
Definition: SpecialProtectedpages.php:295