Index: trunk/extensions/Cite/Cite_body.php |
— | — | @@ -706,7 +706,7 @@ |
707 | 707 | 'cite_references_link_one', |
708 | 708 | $this->referencesKey( $key ), |
709 | 709 | $this->refKey( $key, $val['count'] ), |
710 | | - $this->error( 'cite_error_references_no_text', $key, false ) |
| 710 | + $this->error( 'cite_error_references_no_text', $key ) |
711 | 711 | ); |
712 | 712 | } |
713 | 713 | |
— | — | @@ -717,7 +717,7 @@ |
718 | 718 | # $this->refKey( $val['key'], $val['count'] ), |
719 | 719 | $this->refKey( $val['key'] ), |
720 | 720 | |
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 ) ) |
722 | 722 | ); |
723 | 723 | // Standalone named reference, I want to format this like an |
724 | 724 | // anonymous reference because displaying "1. 1.1 Ref text" is |
— | — | @@ -729,7 +729,7 @@ |
730 | 730 | $this->referencesKey( $key . "-" . $val['key'] ), |
731 | 731 | # $this->refKey( $key, $val['count'] ), |
732 | 732 | $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 ) ) |
734 | 734 | ); |
735 | 735 | // Named references with >1 occurrences |
736 | 736 | } else { |
— | — | @@ -749,7 +749,7 @@ |
750 | 750 | return wfMsgForContentNoTrans( 'cite_references_link_many', |
751 | 751 | $this->referencesKey( $key . "-" . $val['key'] ), |
752 | 752 | $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 ) ) |
754 | 754 | ); |
755 | 755 | } |
756 | 756 | } |
— | — | @@ -793,7 +793,7 @@ |
794 | 794 | return $this->mBacklinkLabels[$offset]; |
795 | 795 | } else { |
796 | 796 | // Feed me! |
797 | | - return $this->error( 'cite_error_references_no_backlink_label', null, false ); |
| 797 | + return $this->error( 'cite_error_references_no_backlink_label' ); |
798 | 798 | } |
799 | 799 | } |
800 | 800 | |
— | — | @@ -823,7 +823,7 @@ |
824 | 824 | return $this->mLinkLabels[$group][$offset - 1]; |
825 | 825 | } else { |
826 | 826 | // 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 ) ); |
828 | 828 | } |
829 | 829 | } |
830 | 830 | |
— | — | @@ -1065,14 +1065,11 @@ |
1066 | 1066 | continue; |
1067 | 1067 | } |
1068 | 1068 | $text .= "\n<br />"; |
1069 | | - # Use separate parser from MessageCache to avoid it missing |
1070 | | - # replaceLinkHolders() when run from ParserBeforeTidy. |
1071 | 1069 | 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' ); |
1073 | 1071 | } 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 ) ); |
1075 | 1073 | } |
1076 | | - $text .= MessageCache::singleton()->parse( $msg, $parser->getTitle(), false )->getText(); |
1077 | 1074 | } |
1078 | 1075 | return true; |
1079 | 1076 | } |
— | — | @@ -1120,20 +1117,18 @@ |
1121 | 1118 | * |
1122 | 1119 | * @param string $key Message name for the error |
1123 | 1120 | * @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 |
1126 | 1122 | */ |
1127 | | - function error( $key, $param = null, $parse = true ) { |
| 1123 | + function error( $key, $param = null ) { |
1128 | 1124 | # We rely on the fact that PHP is okay with passing unused argu- |
1129 | 1125 | # ments to functions. If $1 is not used in the message, wfMsg will |
1130 | 1126 | # 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 | + ); |
1138 | 1133 | } |
1139 | 1134 | |
1140 | 1135 | /** |