Index: trunk/extensions/Cite/Cite.i18n.php |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | <code><references /></code>', |
33 | 33 | 'cite_error_' . CITE_ERROR_REFERENCES_INVALID_PARAMETERS => 'Invalid <code><references></code> tag; no parameters are allowed, use <code><references /></code>', |
34 | 34 | 'cite_error_' . CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL => "Ran out of custom backlink labels, define more in the \"''cite_references_link_many_format_backlink_labels''\" message", |
| 35 | + 'cite_error_' . CITE_ERROR_REFERENCES_NO_TEXT => 'No text given.', |
35 | 36 | |
36 | 37 | /* |
37 | 38 | Output formatting |
Index: trunk/extensions/Cite/Cite.php |
— | — | @@ -44,7 +44,8 @@ |
45 | 45 | 'CITE_ERROR_REF_NO_INPUT', |
46 | 46 | 'CITE_ERROR_REFERENCES_INVALID_INPUT', |
47 | 47 | 'CITE_ERROR_REFERENCES_INVALID_PARAMETERS', |
48 | | - 'CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL' |
| 48 | + 'CITE_ERROR_REFERENCES_NO_BACKLINK_LABEL', |
| 49 | + 'CITE_ERROR_REFERENCES_NO_TEXT' |
49 | 50 | ) |
50 | 51 | ); |
51 | 52 | |
— | — | @@ -376,6 +377,13 @@ |
377 | 378 | $this->refKey( $key ), |
378 | 379 | $val |
379 | 380 | ); |
| 381 | + else if ($val['text']=='') return |
| 382 | + wfMsgForContentNoTrans( |
| 383 | + 'cite_references_link_one', |
| 384 | + $this->referencesKey( $key ), |
| 385 | + $this->refKey( $key, $val['count'] ), |
| 386 | + $this->error(CITE_ERROR_REFERENCES_NO_TEXT) |
| 387 | + ); |
380 | 388 | // Standalone named reference, I want to format this like an |
381 | 389 | // anonymous reference because displaying "1. 1.1 Ref text" is |
382 | 390 | // overkill and users frequently use named references when they |