X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FChangeTags.php;h=18f425ae5c4c71adab534b4b75f42e194cbd02ac;hb=759518bdde8825dc414c1ff0cf99a9dc84088ae6;hp=204df45d94e91c7e9b3700b8ddde3817743e5324;hpb=5fb8b9619529453f05c243538fce6cf82a559298;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 204df45d94..18f425ae5c 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -35,6 +35,8 @@ class ChangeTags { * */ static function formatSummaryRow( $tags, $page ) { + global $wgLang; + if( !$tags ) return array( '', array() ); @@ -51,7 +53,7 @@ class ChangeTags { ); $classes[] = Sanitizer::escapeClass( "mw-tag-$tag" ); } - $markers = '(' . implode( ', ', $displayTags ) . ')'; + $markers = wfMessage( 'parentheses' )->rawParams( $wgLang->commaList( $displayTags ) )->text(); $markers = Xml::tags( 'span', array( 'class' => 'mw-tag-markers' ), $markers ); return array( $markers, $classes ); @@ -79,6 +81,7 @@ class ChangeTags { * @param $log_id int: log_id of the change to add the tags to * @param $params String: params to put in the ct_params field of tabel 'change_tag' * + * @throws MWException * @return bool: false if no changes are made, otherwise true * * @exception MWException when $rc_id, $rev_id and $log_id are all null @@ -162,10 +165,9 @@ class ChangeTags { * @param $conds String|Array: conditions used in query, see DatabaseBase::select * @param $join_conds Array: join conditions, see DatabaseBase::select * @param $options Array: options, see Database::select - * @param $filter_tag String: tag to select on - * - * @exception MWException when unable to determine appropriate JOIN condition for tagging + * @param bool|string $filter_tag Tag to select on * + * @throws MWException When unable to determine appropriate JOIN condition for tagging */ static function modifyDisplayQuery( &$tables, &$fields, &$conds, &$join_conds, &$options, $filter_tag = false ) { @@ -222,10 +224,11 @@ class ChangeTags { public static function buildTagFilterSelector( $selected='', $fullForm = false, Title $title = null ) { global $wgUseTagFilter; - if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) + if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) { return $fullForm ? '' : array(); + } - $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMsgExt( 'tag-filter', 'parseinline' ) ), + $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMessage( 'tag-filter' )->parse() ), Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'mw-tagfilter-input' ) ) ); if ( !$fullForm ) { @@ -233,7 +236,7 @@ class ChangeTags { } $html = implode( ' ', $data ); - $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'tag-filter-submit' ) ) ); + $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMessage( 'tag-filter-submit' )->text() ) ); $html .= "\n" . Html::hidden( 'title', $title->getPrefixedText() ); $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'class' => 'mw-tagfilter-form', 'method' => 'get' ), $html );