r102969 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102968‎ | r102969 | r102970 >
Date:11:14, 14 November 2011
Author:gwicke
Status:ok
Tags:
Comment:
Back out accidentally-committed r102967.
Modified paths:
  • /trunk/extensions/Cite/Cite_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Cite/Cite_body.php
@@ -706,7 +706,7 @@
707707 'cite_references_link_one',
708708 $this->referencesKey( $key ),
709709 $this->refKey( $key, $val['count'] ),
710 - $this->error( 'cite_error_references_no_text', $key, false )
 710+ $this->error( 'cite_error_references_no_text', $key )
711711 );
712712 }
713713
@@ -717,7 +717,7 @@
718718 # $this->refKey( $val['key'], $val['count'] ),
719719 $this->refKey( $val['key'] ),
720720
721 - ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text', $key, false ) )
 721+ ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text', $key ) )
722722 );
723723 // Standalone named reference, I want to format this like an
724724 // anonymous reference because displaying "1. 1.1 Ref text" is
@@ -729,7 +729,7 @@
730730 $this->referencesKey( $key . "-" . $val['key'] ),
731731 # $this->refKey( $key, $val['count'] ),
732732 $this->refKey( $key, $val['key'] . "-" . $val['count'] ),
733 - ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text', $key, false ) )
 733+ ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text', $key ) )
734734 );
735735 // Named references with >1 occurrences
736736 } else {
@@ -749,7 +749,7 @@
750750 return wfMsgForContentNoTrans( 'cite_references_link_many',
751751 $this->referencesKey( $key . "-" . $val['key'] ),
752752 $list,
753 - ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text', $key, false ) )
 753+ ( $val['text'] != '' ? $val['text'] : $this->error( 'cite_error_references_no_text', $key ) )
754754 );
755755 }
756756 }
@@ -793,7 +793,7 @@
794794 return $this->mBacklinkLabels[$offset];
795795 } else {
796796 // Feed me!
797 - return $this->error( 'cite_error_references_no_backlink_label', null, false );
 797+ return $this->error( 'cite_error_references_no_backlink_label' );
798798 }
799799 }
800800
@@ -823,7 +823,7 @@
824824 return $this->mLinkLabels[$group][$offset - 1];
825825 } else {
826826 // Feed me!
827 - return $this->error( 'cite_error_no_link_label_group', array( $group, $message ), false );
 827+ return $this->error( 'cite_error_no_link_label_group', array( $group, $message ) );
828828 }
829829 }
830830
@@ -1065,14 +1065,11 @@
10661066 continue;
10671067 }
10681068 $text .= "\n<br />";
1069 - # Use separate parser from MessageCache to avoid it missing
1070 - # replaceLinkHolders() when run from ParserBeforeTidy.
10711069 if ( $group == CITE_DEFAULT_GROUP ) {
1072 - $msg = $this->error( 'cite_error_refs_without_references', null, false );
 1070+ $text .= $this->error( 'cite_error_refs_without_references' );
10731071 } else {
1074 - $msg = $this->error( 'cite_error_group_refs_without_references', htmlspecialchars( $group ), false );
 1072+ $text .= $this->error( 'cite_error_group_refs_without_references', htmlspecialchars( $group ) );
10751073 }
1076 - $text .= MessageCache::singleton()->parse( $msg, $parser->getTitle(), false )->getText();
10771074 }
10781075 return true;
10791076 }
@@ -1120,20 +1117,18 @@
11211118 *
11221119 * @param string $key Message name for the error
11231120 * @param string $param Parameter to pass to the message
1124 - * @param boolean $parse Whether to parse the message
1125 - * @return string XHTML or wikitext ready for output
 1121+ * @return string XHTML ready for output
11261122 */
1127 - function error( $key, $param = null, $parse = true ) {
 1123+ function error( $key, $param = null ) {
11281124 # We rely on the fact that PHP is okay with passing unused argu-
11291125 # ments to functions. If $1 is not used in the message, wfMsg will
11301126 # just ignore the extra parameter.
1131 - $ret = '<strong class="error">' .
1132 - wfMsgNoTrans( 'cite_error', wfMsgNoTrans( $key, $param ) ) .
1133 - '</strong>';
1134 - if ( $parse ) {
1135 - $ret = $this->parse( $ret );
1136 - }
1137 - return $ret;
 1127+ return
 1128+ $this->parse(
 1129+ '<strong class="error">' .
 1130+ wfMsgNoTrans( 'cite_error', wfMsgNoTrans( $key, $param ) ) .
 1131+ '</strong>'
 1132+ );
11381133 }
11391134
11401135 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102967Fixes bug #17865gwicke11:06, 14 November 2011

Status & tagging log