MediaWiki
1.34.0
SpecialRandomrootpage.php
Go to the documentation of this file.
1
<?php
2
27
class
SpecialRandomrootpage
extends
RandomPage
{
28
29
public
function
__construct
() {
30
parent::__construct(
'Randomrootpage'
);
31
$dbr
=
wfGetDB
(
DB_REPLICA
);
32
$this->extra[] =
'page_title NOT '
.
$dbr
->buildLike(
$dbr
->anyString(),
'/'
,
$dbr
->anyString() );
33
}
34
35
// Don't select redirects
36
public
function
isRedirect
() {
37
return
false
;
38
}
39
}
SpecialRandomrootpage\__construct
__construct()
Definition:
SpecialRandomrootpage.php:29
$dbr
$dbr
Definition:
testCompression.php:50
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition:
GlobalFunctions.php:2575
DB_REPLICA
const DB_REPLICA
Definition:
defines.php:25
SpecialRandomrootpage\isRedirect
isRedirect()
Definition:
SpecialRandomrootpage.php:36
SpecialRandomrootpage
Definition:
SpecialRandomrootpage.php:27
RandomPage
Special page to direct the user to a random page.
Definition:
SpecialRandompage.php:32
includes
specials
SpecialRandomrootpage.php
Generated on Thu Dec 19 2019 14:55:00 for MediaWiki by
1.8.16