MediaWiki
REL1_31
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
}
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition
GlobalFunctions.php:2812
RandomPage
Special page to direct the user to a random page.
Definition
SpecialRandompage.php:30
SpecialRandomrootpage
Definition
SpecialRandomrootpage.php:27
SpecialRandomrootpage\__construct
__construct()
Definition
SpecialRandomrootpage.php:29
SpecialRandomrootpage\isRedirect
isRedirect()
Definition
SpecialRandomrootpage.php:36
DB_REPLICA
const DB_REPLICA
Definition
defines.php:25
$dbr
$dbr
Definition
testCompression.php:50
includes
specials
SpecialRandomrootpage.php
Generated on Mon Nov 25 2024 15:35:28 for MediaWiki by
1.10.0