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 ) |
| 710 | + $this->error( 'cite_error_references_no_text', $key, 'noparse' ) |
711 | 711 | ); |
712 | 712 | } |
713 | 713 | |
— | — | @@ -716,8 +716,7 @@ |
717 | 717 | $this->referencesKey( $val['key'] ), |
718 | 718 | # $this->refKey( $val['key'], $val['count'] ), |
719 | 719 | $this->refKey( $val['key'] ), |
720 | | - |
721 | | - ( $val['text'] != '' ? rtrim( $val['text'], "\n" ) . "\n" : $this->error( 'cite_error_references_no_text', $key ) ) |
| 720 | + ( $val['text'] != '' ? rtrim( $val['text'], "\n" ) . "\n" : $this->error( 'cite_error_references_no_text', $key, 'noparse' ) ) |
722 | 721 | ); |
723 | 722 | // Standalone named reference, I want to format this like an |
724 | 723 | // anonymous reference because displaying "1. 1.1 Ref text" is |
— | — | @@ -729,7 +728,7 @@ |
730 | 729 | $this->referencesKey( $key . "-" . $val['key'] ), |
731 | 730 | # $this->refKey( $key, $val['count'] ), |
732 | 731 | $this->refKey( $key, $val['key'] . "-" . $val['count'] ), |
733 | | - ( $val['text'] != '' ? rtrim( $val['text'], "\n" ) . "\n" : $this->error( 'cite_error_references_no_text', $key ) ) |
| 732 | + ( $val['text'] != '' ? rtrim( $val['text'], "\n" ) . "\n" : $this->error( 'cite_error_references_no_text', $key, 'noparse' ) ) |
734 | 733 | ); |
735 | 734 | // Named references with >1 occurrences |
736 | 735 | } else { |
— | — | @@ -749,7 +748,7 @@ |
750 | 749 | return wfMsgForContentNoTrans( 'cite_references_link_many', |
751 | 750 | $this->referencesKey( $key . "-" . $val['key'] ), |
752 | 751 | $list, |
753 | | - ( $val['text'] != '' ? rtrim( $val['text'], "\n" ) . "\n" : $this->error( 'cite_error_references_no_text', $key ) ) |
| 752 | + ( $val['text'] != '' ? rtrim( $val['text'], "\n" ) . "\n" : $this->error( 'cite_error_references_no_text', $key, 'noparse' ) ) |
754 | 753 | ); |
755 | 754 | } |
756 | 755 | } |
— | — | @@ -793,7 +792,7 @@ |
794 | 793 | return $this->mBacklinkLabels[$offset]; |
795 | 794 | } else { |
796 | 795 | // Feed me! |
797 | | - return $this->error( 'cite_error_references_no_backlink_label' ); |
| 796 | + return $this->error( 'cite_error_references_no_backlink_label', null, 'noparse' ); |
798 | 797 | } |
799 | 798 | } |
800 | 799 | |
— | — | @@ -823,7 +822,7 @@ |
824 | 823 | return $this->mLinkLabels[$group][$offset - 1]; |
825 | 824 | } else { |
826 | 825 | // Feed me! |
827 | | - return $this->error( 'cite_error_no_link_label_group', array( $group, $message ) ); |
| 826 | + return $this->error( 'cite_error_no_link_label_group', array( $group, $message ), 'noparse' ); |
828 | 827 | } |
829 | 828 | } |
830 | 829 | |
— | — | @@ -1117,18 +1116,20 @@ |
1118 | 1117 | * |
1119 | 1118 | * @param string $key Message name for the error |
1120 | 1119 | * @param string $param Parameter to pass to the message |
1121 | | - * @return string XHTML ready for output |
| 1120 | + * @param string $parse Whether to parse the message ('parse') or not ('noparse') |
| 1121 | + * @return string XHTML or wikitext ready for output |
1122 | 1122 | */ |
1123 | | - function error( $key, $param = null ) { |
| 1123 | + function error( $key, $param = null, $parse = 'parse' ) { |
1124 | 1124 | # We rely on the fact that PHP is okay with passing unused argu- |
1125 | 1125 | # ments to functions. If $1 is not used in the message, wfMsg will |
1126 | 1126 | # just ignore the extra parameter. |
1127 | | - return |
1128 | | - $this->parse( |
1129 | | - '<strong class="error">' . |
1130 | | - wfMsgNoTrans( 'cite_error', wfMsgNoTrans( $key, $param ) ) . |
1131 | | - '</strong>' |
1132 | | - ); |
| 1127 | + $ret = '<strong class="error">' . |
| 1128 | + wfMsgNoTrans( 'cite_error', wfMsgNoTrans( $key, $param ) ) . |
| 1129 | + '</strong>'; |
| 1130 | + if ( $parse == 'parse' ) { |
| 1131 | + $ret = $this->parse( $ret ); |
| 1132 | + } |
| 1133 | + return $ret; |
1133 | 1134 | } |
1134 | 1135 | |
1135 | 1136 | /** |