X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=1be986376f9a55898885dd05fbb8f47ea2bfb2cc;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hp=b23bd5a36457e036d643759acdf8e598b51a3543;hpb=1029b36698d38ae4712749e5baaa9505f1426447;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index b23bd5a364..1be986376f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1769,7 +1769,7 @@ class Title implements LinkTarget { * @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 ) { @@ -1812,10 +1812,10 @@ class Title implements LinkTarget { if ( $this->isExternal() ) { $target = SpecialPage::getTitleFor( 'GoToInterwiki', - $this->getPrefixedDBKey() + $this->getPrefixedDBkey() ); } - return $target->getFullUrl( $query, false, $proto ); + return $target->getFullURL( $query, false, $proto ); } /** @@ -2735,8 +2735,8 @@ class Title implements LinkTarget { 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'], [ @@ -2757,7 +2757,7 @@ class Title implements LinkTarget { '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; @@ -4500,7 +4500,7 @@ class Title implements LinkTarget { } 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 ) { @@ -4644,7 +4644,7 @@ class Title implements LinkTarget { /** * 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 ) {