MediaWiki
REL1_40
SpecialRandomRootPage.php
Go to the documentation of this file.
1
<?php
2
3
use
Wikimedia\Rdbms\ILoadBalancer
;
4
29
class
SpecialRandomRootPage
extends
SpecialRandomPage
{
30
35
public
function
__construct
(
36
ILoadBalancer
$loadBalancer,
37
NamespaceInfo
$nsInfo
38
) {
39
parent::__construct( $loadBalancer, $nsInfo );
40
$this->mName =
'Randomrootpage'
;
41
$dbr
= $loadBalancer->
getConnectionRef
( ILoadBalancer::DB_REPLICA );
42
$this->extra[] =
'page_title NOT '
.
$dbr
->buildLike(
$dbr
->anyString(),
'/'
,
$dbr
->anyString() );
43
}
44
45
// Don't select redirects
46
public
function
isRedirect
() {
47
return
false
;
48
}
49
}
NamespaceInfo
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Definition
NamespaceInfo.php:36
SpecialRandomPage
Special page to direct the user to a random page.
Definition
SpecialRandomPage.php:34
SpecialRandomRootPage
Definition
SpecialRandomRootPage.php:29
SpecialRandomRootPage\__construct
__construct(ILoadBalancer $loadBalancer, NamespaceInfo $nsInfo)
Definition
SpecialRandomRootPage.php:35
SpecialRandomRootPage\isRedirect
isRedirect()
Definition
SpecialRandomRootPage.php:46
Wikimedia\Rdbms\ILoadBalancer
This class is a delegate to ILBFactory for a given database cluster.
Definition
ILoadBalancer.php:113
Wikimedia\Rdbms\ILoadBalancer\getConnectionRef
getConnectionRef( $i, $groups=[], $domain=false, $flags=0)
$dbr
$dbr
Definition
testCompression.php:55
includes
specials
SpecialRandomRootPage.php
Generated on Thu Jun 27 2024 14:04:22 for MediaWiki by
1.10.0