Index: branches/liquidthreads/maintenance/parserTests.txt |
— | — | @@ -5832,7 +5832,48 @@ |
5833 | 5833 | a |
5834 | 5834 | !! end |
5835 | 5835 | |
| 5836 | + |
5836 | 5837 | !! test |
| 5838 | +Section extraction, <pre> around bogus header (bug 10309) |
| 5839 | +!! options |
| 5840 | +noxml section=2 |
| 5841 | +!! input |
| 5842 | +== Section One == |
| 5843 | +<pre> |
| 5844 | +======= |
| 5845 | +</pre> |
| 5846 | + |
| 5847 | +== Section Two == |
| 5848 | +stuff |
| 5849 | +!! result |
| 5850 | +== Section Two == |
| 5851 | +stuff |
| 5852 | +!! end |
| 5853 | + |
| 5854 | +!! test |
| 5855 | +Section replacement, <pre> around bogus header (bug 10309) |
| 5856 | +!! options |
| 5857 | +noxml replace=2,"xxx" |
| 5858 | +!! input |
| 5859 | +== Section One == |
| 5860 | +<pre> |
| 5861 | +======= |
| 5862 | +</pre> |
| 5863 | + |
| 5864 | +== Section Two == |
| 5865 | +stuff |
| 5866 | +!! result |
| 5867 | +== Section One == |
| 5868 | +<pre> |
| 5869 | +======= |
| 5870 | +</pre> |
| 5871 | + |
| 5872 | +xxx |
| 5873 | +!! end |
| 5874 | + |
| 5875 | + |
| 5876 | + |
| 5877 | +!! test |
5837 | 5878 | Handling of 
 in URLs |
5838 | 5879 | !! input |
5839 | 5880 | **irc://
a |
Index: branches/liquidthreads/includes/ProtectionForm.php |
— | — | @@ -320,7 +320,7 @@ |
321 | 321 | function buildExpiryInput() { |
322 | 322 | $attribs = array( 'id' => 'expires' ) + $this->disabledAttrib; |
323 | 323 | return '<tr>' |
324 | | - . '<td><label for="expires">' . wfMsgWithLinks( 'protectexpiry' ) . '</label></td>' |
| 324 | + . '<td><label for="expires">' . wfMsgExt( 'protectexpiry', array( 'parseinline' ) ) . '</label></td>' |
325 | 325 | . '<td>' . Xml::input( 'mwProtect-expiry', 60, $this->mExpiry, $attribs ) . '</td>' |
326 | 326 | . '</tr>'; |
327 | 327 | } |
Index: branches/liquidthreads/includes/SpecialDisambiguations.php |
— | — | @@ -15,8 +15,7 @@ |
16 | 16 | |
17 | 17 | |
18 | 18 | function getPageHeader( ) { |
19 | | - global $wgOut; |
20 | | - return $wgOut->parse( wfMsg( 'disambiguations-text' ) ); |
| 19 | + return wfMsgExt( 'disambiguations-text', array( 'parse' ) ); |
21 | 20 | } |
22 | 21 | |
23 | 22 | function getSQL() { |
Index: branches/liquidthreads/includes/GlobalFunctions.php |
— | — | @@ -327,20 +327,6 @@ |
328 | 328 | } |
329 | 329 | |
330 | 330 | /** |
331 | | - * Get a message in the user interface language and replace wiki |
332 | | - * links with clickable ones, escaping other HTML |
333 | | - * |
334 | | - * @param string $key Message key |
335 | | - * @return string |
336 | | - */ |
337 | | -function wfMsgWithLinks( $key ) { |
338 | | - global $wgUser; |
339 | | - $args = func_get_args(); |
340 | | - return $wgUser->getSkin()->formatLinksInComment( htmlspecialchars( |
341 | | - call_user_func_array( 'wfMsg', $args ) ) ); |
342 | | -} |
343 | | - |
344 | | -/** |
345 | 331 | * Same as above except doesn't transform the message |
346 | 332 | */ |
347 | 333 | function wfMsgNoTrans( $key ) { |
— | — | @@ -383,19 +369,6 @@ |
384 | 370 | } |
385 | 371 | |
386 | 372 | /** |
387 | | - * Get a message in the content language and replace wiki |
388 | | - * links with clickable ones, escaping other HTML |
389 | | - * |
390 | | - * @param string $key Message key |
391 | | - * @return string |
392 | | - */ |
393 | | -function wfMsgForContentWithLinks( $key ) { |
394 | | - global $wgUser; |
395 | | - return $wgUser->getSkin()->formatLinksInComment( htmlspecialchars( |
396 | | - call_user_func_array( 'wfMsgForContent', func_get_args() ) ) ); |
397 | | -} |
398 | | - |
399 | | -/** |
400 | 373 | * Same as above except doesn't transform the message |
401 | 374 | */ |
402 | 375 | function wfMsgForContentNoTrans( $key ) { |
Index: branches/liquidthreads/includes/SpecialLonelypages.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | return "Lonelypages"; |
17 | 17 | } |
18 | 18 | function getPageHeader() { |
19 | | - return '<p>' . wfMsg('lonelypagestext') . '</p>'; |
| 19 | + return wfMsgExt( 'lonelypagestext', array( 'parse' ) ); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function sortDescending() { |
Index: branches/liquidthreads/includes/Parser.php |
— | — | @@ -4609,6 +4609,10 @@ |
4610 | 4610 | * for "replace", the whole page with the section replaced. |
4611 | 4611 | */ |
4612 | 4612 | private function extractSections( $text, $section, $mode, $newtext='' ) { |
| 4613 | + # I.... _hope_ this is right. |
| 4614 | + # Otherwise, sometimes we don't have things initialized properly. |
| 4615 | + $this->clearState(); |
| 4616 | + |
4613 | 4617 | # strip NOWIKI etc. to avoid confusion (true-parameter causes HTML |
4614 | 4618 | # comments to be stripped as well) |
4615 | 4619 | $stripState = new StripState; |
Index: branches/liquidthreads/includes/SpecialUnusedcategories.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | function getPageHeader() { |
19 | | - return '<p>' . wfMsg('unusedcategoriestext') . '</p>'; |
| 19 | + return wfMsgExt( 'unusedcategoriestext', array( 'parse' ) ); |
20 | 20 | } |
21 | 21 | |
22 | 22 | function getSQL() { |
Index: branches/liquidthreads/includes/filerepo/LocalFile.php |
— | — | @@ -150,7 +150,7 @@ |
151 | 151 | * Load metadata from the file itself |
152 | 152 | */ |
153 | 153 | function loadFromFile() { |
154 | | - $this->setProps( self::getInfoFromPath( $this->getPath() ) ); |
| 154 | + $this->setProps( self::getPropsFromPath( $this->getPath() ) ); |
155 | 155 | } |
156 | 156 | |
157 | 157 | function getCacheFields( $prefix = 'img_' ) { |
Index: branches/liquidthreads/includes/SpecialWithoutinterwiki.php |
— | — | @@ -12,9 +12,9 @@ |
13 | 13 | function getName() { |
14 | 14 | return 'Withoutinterwiki'; |
15 | 15 | } |
16 | | - |
| 16 | + |
17 | 17 | function getPageHeader() { |
18 | | - return '<p>' . wfMsgHtml( 'withoutinterwiki-header' ) . '</p>'; |
| 18 | + return '<p>' . wfMsgExt( 'withoutinterwiki-header', array( 'parseinline' ) ) . '</p>'; |
19 | 19 | } |
20 | 20 | |
21 | 21 | function sortDescending() { |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | function isExpensive() { |
26 | 26 | return true; |
27 | 27 | } |
28 | | - |
| 28 | + |
29 | 29 | function isSyndicated() { |
30 | 30 | return false; |
31 | 31 | } |
— | — | @@ -44,7 +44,7 @@ |
45 | 45 | AND page_namespace=" . NS_MAIN . " |
46 | 46 | AND page_is_redirect = 0"; |
47 | 47 | } |
48 | | - |
| 48 | + |
49 | 49 | } |
50 | 50 | |
51 | 51 | function wfSpecialWithoutinterwiki() { |
Index: branches/liquidthreads/includes/SpecialDoubleRedirects.php |
— | — | @@ -19,8 +19,7 @@ |
20 | 20 | function isSyndicated() { return false; } |
21 | 21 | |
22 | 22 | function getPageHeader( ) { |
23 | | - #FIXME : probably need to add a backlink to the maintenance page. |
24 | | - return '<p>'.wfMsg("doubleredirectstext")."</p><br />\n"; |
| 23 | + return wfMsgExt( 'doubleredirectstext', array( 'parse' ) ); |
25 | 24 | } |
26 | 25 | |
27 | 26 | function getSQLText( &$dbr, $namespace = null, $title = null ) { |
Index: branches/liquidthreads/includes/SpecialBrokenRedirects.php |
— | — | @@ -20,8 +20,7 @@ |
21 | 21 | function isSyndicated() { return false; } |
22 | 22 | |
23 | 23 | function getPageHeader( ) { |
24 | | - global $wgOut; |
25 | | - return $wgOut->parse( wfMsg( 'brokenredirectstext' ) ); |
| 24 | + return wfMsgExt( 'brokenredirectstext', array( 'parse' ) ); |
26 | 25 | } |
27 | 26 | |
28 | 27 | function getSQL() { |
Index: branches/liquidthreads/includes/SpecialUnusedtemplates.php |
— | — | @@ -37,8 +37,7 @@ |
38 | 38 | } |
39 | 39 | |
40 | 40 | function getPageHeader() { |
41 | | - global $wgOut; |
42 | | - return $wgOut->parse( wfMsg( 'unusedtemplatestext' ) ); |
| 41 | + return wfMsgExt( 'unusedtemplatestext', array( 'parse' ) ); |
43 | 42 | } |
44 | 43 | |
45 | 44 | } |
Index: branches/liquidthreads/includes/SpecialDeadendpages.php |
— | — | @@ -15,7 +15,7 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | function getPageHeader() { |
19 | | - return '<p>' . wfMsg('deadendpagestext') . '</p>'; |
| 19 | + return wfMsgExt( 'deadendpagestext', array( 'parse' ) ); |
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
Index: branches/liquidthreads/languages/messages/MessagesEn.php |
— | — | @@ -368,7 +368,7 @@ |
369 | 369 | 'Listusers' => array( 'Listusers', 'Userlist' ), |
370 | 370 | 'Statistics' => array( 'Statistics' ), |
371 | 371 | 'Randompage' => array( 'Random', 'Randompage' ), |
372 | | - 'Lonelypages' => array( 'Lonelypages' ), |
| 372 | + 'Lonelypages' => array( 'Lonelypages', 'Orphanedpages' ), |
373 | 373 | 'Uncategorizedpages' => array( 'Uncategorizedpages' ), |
374 | 374 | 'Uncategorizedcategories' => array( 'Uncategorizedcategories' ), |
375 | 375 | 'Uncategorizedimages' => array( 'Uncategorizedimages' ), |
Index: branches/liquidthreads/RELEASE-NOTES |
— | — | @@ -87,6 +87,8 @@ |
88 | 88 | * On reupload, add a null revision to the image description page |
89 | 89 | * Group log output by date |
90 | 90 | * Kurdish interface latin/arabic writing system with transliteration |
| 91 | +* Support wiki text in all query page headers |
| 92 | +* Add 'Orphanedpages' as an alias to Special:Lonelypages |
91 | 93 | |
92 | 94 | == Bugfixes since 1.10 == |
93 | 95 | |
— | — | @@ -175,7 +177,10 @@ |
176 | 178 | Signature dates for Japanese and other languages including weekday now show |
177 | 179 | the correct day to match the rest of the time in local time. |
178 | 180 | * Escape the output of magic variables that return page name or part of it |
| 181 | +* (bug 10309) Initialise parser state properly in extractSections(), fixes |
| 182 | + some cases where section edits broke because tags were improperly stripped |
179 | 183 | |
| 184 | + |
180 | 185 | == API changes since 1.10 == |
181 | 186 | |
182 | 187 | (For ongoing development discussion, see http://www.mediawiki.org/wiki/API) |
Property changes on: branches/liquidthreads |
___________________________________________________________________ |
Modified: svnmerge-integrated |
183 | 188 | - /trunk/phase3:1-23086 |
184 | 189 | + /trunk/phase3:1-23102 |