38 $this->
namespaces = MWNamespace::getContentNamespaces();
39 parent::__construct( $name );
59 if ( is_string( $par ) ) {
63 MediaWikiServices::getInstance()->getContentLanguage()->getNsIndex( $par ) );
68 if ( is_null( $title ) ) {
77 $redirectParam = $this->
isRedirect() ? [
'redirect' =>
'no' ] : [];
89 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
93 $nsNames[] = $this->
msg(
'blanknamespace' )->plain();
95 $nsNames[] = $contLang->getNsText( $n );
99 return $contLang->commaList( $nsNames );
111 'SpecialRandomGetRandomTitle',
112 [ &$randstr, &$this->isRedir, &$this->
namespaces, &$this->extra, &$title ]
131 return Title::makeTitleSafe( $row->page_namespace, $row->page_title );
140 $conds = array_merge( [
142 'page_is_redirect' => $redirect,
143 'page_random >= ' . $randstr
148 Hooks::run(
'RandomPageQuery', [ &
$tables, &$conds, &$joinConds ] );
152 'fields' => [
'page_title',
'page_namespace' ],
155 'ORDER BY' =>
'page_random',
158 'join_conds' => $joinConds
to move a page</td >< td > &*You are moving the page across namespaces
wfRandom()
Get a random decimal value between 0 and 1, in a way not likely to give duplicate values for any real...
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
if(defined( 'MW_SETUP_CALLBACK')) $fname
Customization point after all loading (constants, functions, classes, DefaultSettings,...
Special page to direct the user to a random page.
getNsList()
Get a comma-delimited list of namespaces we don't have any pages in.
getRandomTitle()
Choose a random title.
__construct( $name='Randompage')
selectRandomPageFromDB( $randstr, $fname=__METHOD__)
execute( $par)
Default execute method Checks user permissions.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Parent class for all special pages.
getName()
Get the name of this Special Page.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
msg( $key)
Wrapper around wfMessage that sets the current context.
getRequest()
Get the WebRequest being used for this instance.
namespace and then decline to actually register it file or subcat img or subcat $title
this hook is for auditing only 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
null for the local 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