MediaWiki  master
SpecialRandomRootPage.php
Go to the documentation of this file.
1 <?php
2 
4 
30 
35  public function __construct(
37  NamespaceInfo $nsInfo
38  ) {
39  parent::__construct( $loadBalancer, $nsInfo );
40  $this->mName = 'Randomrootpage';
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 }
SpecialRandomPage\$loadBalancer
ILoadBalancer $loadBalancer
Definition: SpecialRandomPage.php:39
Wikimedia\Rdbms\ILoadBalancer\getConnectionRef
getConnectionRef( $i, $groups=[], $domain=false, $flags=0)
Get a live database handle reference for a server index.
$dbr
$dbr
Definition: testCompression.php:54
DB_REPLICA
const DB_REPLICA
Definition: defines.php:25
SpecialRandomRootPage
Definition: SpecialRandomRootPage.php:29
SpecialRandomRootPage\__construct
__construct(ILoadBalancer $loadBalancer, NamespaceInfo $nsInfo)
Definition: SpecialRandomRootPage.php:35
SpecialRandomPage
Special page to direct the user to a random page.
Definition: SpecialRandomPage.php:33
SpecialRandomRootPage\isRedirect
isRedirect()
Definition: SpecialRandomRootPage.php:46
NamespaceInfo
This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of them ba...
Definition: NamespaceInfo.php:35
Wikimedia\Rdbms\ILoadBalancer
Database cluster connection, tracking, load balancing, and transaction manager interface.
Definition: ILoadBalancer.php:81