From: Aryeh Gregor Date: Tue, 21 Nov 2006 22:49:25 +0000 (+0000) Subject: Since formatComment and commentBlock can take null as well as Title objects (per... X-Git-Tag: 1.31.0-rc.0~55127 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/ajouter.php?a=commitdiff_plain;h=846cecd91e0315260dd45eb245f2394b60f38ded;p=lhc%2Fweb%2Fwiklou.git Since formatComment and commentBlock can take null as well as Title objects (per r17833), corrected documentation (Title -> mixed). Since revComment would immediately fail if passed anything but a Revision object or descendant, restore type hinting to that. --- diff --git a/includes/Linker.php b/includes/Linker.php index 65b5374e02..db82a77cb6 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -887,7 +887,7 @@ class Linker { * temporarily to a value pass. Should be adjusted further. --brion * * $param string $comment - * @param Title $title (to generate link to the section in autocomment) + * @param mixed $title Title object (to generate link to the section in autocomment) or null * @param bool $local Whether section links should refer to local page */ function formatComment($comment, $title = NULL, $local = false) { @@ -970,7 +970,7 @@ class Linker { * it's non-empty, otherwise return empty string. * * @param string $comment - * @param Title $title + * @param mixed $title Title object (to generate link to section in autocomment) or null * @param bool $local Whether section links should refer to local page * * @return string @@ -995,7 +995,7 @@ class Linker { * @param bool $local Whether section links should refer to local page * @return string HTML */ - function revComment( $rev, $local = false ) { + function revComment( Revision $rev, $local = false ) { if( $rev->userCan( Revision::DELETED_COMMENT ) ) { $block = $this->commentBlock( $rev->getRawComment(), $rev->getTitle(), $local ); } else {