Go to the documentation of this file.
37 parent::__construct(
$name );
59 if ( is_string( $par ) ) {
76 $redirectParam = $this->
isRedirect() ? [
'redirect' =>
'no' ] : [];
92 $nsNames[] = $this->
msg(
'blanknamespace' )->plain();
110 'SpecialRandomGetRandomTitle',
139 $conds = array_merge( [
141 'page_is_redirect' => $redirect,
142 'page_random >= ' . $randstr
151 'fields' => [
'page_title',
'page_namespace' ],
154 'ORDER BY' =>
'page_random',
157 'join_conds' => $joinConds
execute( $par)
Default execute method Checks user permissions.
msg( $key)
Wrapper around wfMessage that sets the current context.
this hook is for auditing only RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
getOutput()
Get the OutputPage being used for this instance.
if(!defined( 'MEDIAWIKI')) $fname
This file is not a valid entry point, perform no further processing unless MEDIAWIKI is defined.
Allows to change the fields on the form that will be generated $name
getName()
Get the name of this Special Page.
static getContentNamespaces()
Get a list of all namespace indices which are considered to contain content.
__construct( $name='Randompage')
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
null for the wiki Added should default to null in handler for backwards compatibility add a value to it if you want to add a cookie that have to vary cache options can modify $query
to move a page</td >< td > &*You are moving the page across namespaces
namespace and then decline to actually register it file or subcat img or subcat $title
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
selectRandomPageFromDB( $randstr, $fname=__METHOD__)
getNsList()
Get a comma-delimited list of namespaces we don't have any pages in.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
when a variable name is used in a it is silently declared as a new masking the global
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Parent class for all special pages.
getRequest()
Get the WebRequest being used for this instance.
wfRandom()
Get a random decimal value between 0 and 1, in a way not likely to give duplicate values for any real...
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
getRandomTitle()
Choose a random title.
Special page to direct the user to a random page.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
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