* @see wfExpandUrl
* @param string|string[] $query
* @param string|string[]|bool $query2
- * @param string $proto Protocol type to use in URL
+ * @param string|int|null $proto Protocol type to use in URL
* @return string The URL
*/
public function getFullURL( $query = '', $query2 = false, $proto = PROTO_RELATIVE ) {
if ( $this->isExternal() ) {
$target = SpecialPage::getTitleFor(
'GoToInterwiki',
- $this->getPrefixedDBKey()
+ $this->getPrefixedDBkey()
);
}
- return $target->getFullUrl( $query, false, $proto );
+ return $target->getFullURL( $query, false, $proto );
}
/**
if ( $this->mTitleProtection === null ) {
$dbr = wfGetDB( DB_REPLICA );
- $commentStore = new CommentStore( 'pt_reason' );
- $commentQuery = $commentStore->getJoin();
+ $commentStore = CommentStore::getStore();
+ $commentQuery = $commentStore->getJoin( 'pt_reason' );
$res = $dbr->select(
[ 'protected_titles' ] + $commentQuery['tables'],
[
'user' => $row['user'],
'expiry' => $dbr->decodeExpiry( $row['expiry'] ),
'permission' => $row['permission'],
- 'reason' => $commentStore->getComment( $row )->text,
+ 'reason' => $commentStore->getComment( 'pt_reason', $row )->text,
];
} else {
$this->mTitleProtection = false;
}
if ( $this->isExternal() ) {
- return true; // any interwiki link might be viewable, for all we know
+ return true; // any interwiki link might be viewable, for all we know
}
switch ( $this->mNamespace ) {
/**
* Get the last touched timestamp
*
- * @param IDatabase $db Optional db
+ * @param IDatabase|null $db
* @return string|false Last-touched timestamp
*/
public function getTouched( $db = null ) {