X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fchangetags%2FChangeTags.php;h=6ebe8008d0e1bb3caf01bab8c89427336d0148b9;hb=34c498088e6f61fe8b0474450a8a66d7965d649e;hp=32cfd13f588168d96806dcb0b7481e5fd6d90d1e;hpb=8c9de54eef541b4e5997f0d40f1619ae84b0b3a4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 32cfd13f58..6ebe8008d0 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -141,11 +141,11 @@ class ChangeTags { * we consider the tag hidden, and return false. * * @param string $tag - * @param IContextSource $context + * @param MessageLocalizer $context * @return string|bool Tag description or false if tag is to be hidden. * @since 1.25 Returns false if tag is to be hidden. */ - public static function tagDescription( $tag, IContextSource $context ) { + public static function tagDescription( $tag, MessageLocalizer $context ) { $msg = $context->msg( "tag-$tag" ); if ( !$msg->exists() ) { // No such message, so return the HTML-escaped tag name. @@ -168,11 +168,11 @@ class ChangeTags { * for the long description. * * @param string $tag - * @param IContextSource $context + * @param MessageLocalizer $context * @return Message|bool Message object of the tag long description or false if * there is no description. */ - public static function tagLongDescriptionMessage( $tag, IContextSource $context ) { + public static function tagLongDescriptionMessage( $tag, MessageLocalizer $context ) { $msg = $context->msg( "tag-$tag-description" ); if ( !$msg->exists() ) { return false; @@ -196,6 +196,8 @@ class ChangeTags { * @return string Truncated long tag description. */ public static function truncateTagDescription( $tag, $length, IContextSource $context ) { + // FIXME: Make this accept MessageLocalizer and Language instead of IContextSource + $originalDesc = self::tagLongDescriptionMessage( $tag, $context ); // If there is no tag description, return empty string if ( !$originalDesc ) { @@ -428,7 +430,7 @@ class ChangeTags { return [ $tagsToAdd, $tagsToRemove, $prevTags ]; } - private static function getPrevTags( $rc_id = null, $rev_id = null, $log_id = null ) { + private static function getPrevTags( $rc_id = null, $log_id = null, $rev_id = null ) { $conds = array_filter( [ 'ct_rc_id' => $rc_id,