r23104 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23103‎ | r23104 | r23105 >
Date:21:40, 19 June 2007
Author:david
Status:old
Tags:
Comment:
Merged revisions 23087-23102 via svnmerge from
svn+ssh://david@svn.wikimedia.org/svnroot/mediawiki/trunk/phase3

........
r23094 | raymond | 2007-06-19 06:02:51 -0700 (Tue, 19 Jun 2007) | 2 lines

* Add number of links to Special:Whatlinkshere
No need to change message name and break ~ 80 localizations, it's a cosmetic change only
........
r23095 | raymond | 2007-06-19 06:38:14 -0700 (Tue, 19 Jun 2007) | 2 lines

* Allow wikilinks in header of Special:Withoutinterwiki
* Whitespaces
........
r23096 | brion | 2007-06-19 07:27:08 -0700 (Tue, 19 Jun 2007) | 2 lines

Revert r23094 for the moment; gives misleading number when paging long lists
........
r23097 | robchurch | 2007-06-19 07:42:46 -0700 (Tue, 19 Jun 2007) | 1 line

Our release manager believes I need to be shot. I am a mindless drone without opinion in this matter.
........
r23098 | robchurch | 2007-06-19 08:06:15 -0700 (Tue, 19 Jun 2007) | 2 lines

* Support wiki text in all query page headers
* Add 'Orphanedpages' as an alias to Special:Lonelypages
........
r23099 | brion | 2007-06-19 08:11:20 -0700 (Tue, 19 Jun 2007) | 2 lines

Fix regression introduced in r23023; use the right function name when calling to load file properties :)
........
r23100 | brion | 2007-06-19 08:49:46 -0700 (Tue, 19 Jun 2007) | 2 lines

parser test cases for bug 10309
........
r23101 | brion | 2007-06-19 09:00:11 -0700 (Tue, 19 Jun 2007) | 4 lines

* (bug 10309) Initialise parser state properly in extractSections(), fixes
some cases where section edits broke because tags were improperly stripped
........
Modified paths:
  • /branches/liquidthreads (modified) (history)
  • /branches/liquidthreads/RELEASE-NOTES (modified) (history)
  • /branches/liquidthreads/includes/GlobalFunctions.php (modified) (history)
  • /branches/liquidthreads/includes/Parser.php (modified) (history)
  • /branches/liquidthreads/includes/ProtectionForm.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialBrokenRedirects.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialDeadendpages.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialDisambiguations.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialDoubleRedirects.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialLonelypages.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialUnusedcategories.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialUnusedtemplates.php (modified) (history)
  • /branches/liquidthreads/includes/SpecialWithoutinterwiki.php (modified) (history)
  • /branches/liquidthreads/includes/filerepo/LocalFile.php (modified) (history)
  • /branches/liquidthreads/languages/messages/MessagesEn.php (modified) (history)
  • /branches/liquidthreads/maintenance/parserTests.txt (modified) (history)

Diff [purge]

Index: branches/liquidthreads/maintenance/parserTests.txt
@@ -5832,7 +5832,48 @@
58335833 a
58345834 !! end
58355835
 5836+
58365837 !! 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
58375878 Handling of &#x0A; in URLs
58385879 !! input
58395880 **irc://&#x0A;a
Index: branches/liquidthreads/includes/ProtectionForm.php
@@ -320,7 +320,7 @@
321321 function buildExpiryInput() {
322322 $attribs = array( 'id' => 'expires' ) + $this->disabledAttrib;
323323 return '<tr>'
324 - . '<td><label for="expires">' . wfMsgWithLinks( 'protectexpiry' ) . '</label></td>'
 324+ . '<td><label for="expires">' . wfMsgExt( 'protectexpiry', array( 'parseinline' ) ) . '</label></td>'
325325 . '<td>' . Xml::input( 'mwProtect-expiry', 60, $this->mExpiry, $attribs ) . '</td>'
326326 . '</tr>';
327327 }
Index: branches/liquidthreads/includes/SpecialDisambiguations.php
@@ -15,8 +15,7 @@
1616
1717
1818 function getPageHeader( ) {
19 - global $wgOut;
20 - return $wgOut->parse( wfMsg( 'disambiguations-text' ) );
 19+ return wfMsgExt( 'disambiguations-text', array( 'parse' ) );
2120 }
2221
2322 function getSQL() {
Index: branches/liquidthreads/includes/GlobalFunctions.php
@@ -327,20 +327,6 @@
328328 }
329329
330330 /**
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 -/**
345331 * Same as above except doesn't transform the message
346332 */
347333 function wfMsgNoTrans( $key ) {
@@ -383,19 +369,6 @@
384370 }
385371
386372 /**
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 -/**
400373 * Same as above except doesn't transform the message
401374 */
402375 function wfMsgForContentNoTrans( $key ) {
Index: branches/liquidthreads/includes/SpecialLonelypages.php
@@ -15,7 +15,7 @@
1616 return "Lonelypages";
1717 }
1818 function getPageHeader() {
19 - return '<p>' . wfMsg('lonelypagestext') . '</p>';
 19+ return wfMsgExt( 'lonelypagestext', array( 'parse' ) );
2020 }
2121
2222 function sortDescending() {
Index: branches/liquidthreads/includes/Parser.php
@@ -4609,6 +4609,10 @@
46104610 * for "replace", the whole page with the section replaced.
46114611 */
46124612 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+
46134617 # strip NOWIKI etc. to avoid confusion (true-parameter causes HTML
46144618 # comments to be stripped as well)
46154619 $stripState = new StripState;
Index: branches/liquidthreads/includes/SpecialUnusedcategories.php
@@ -15,7 +15,7 @@
1616 }
1717
1818 function getPageHeader() {
19 - return '<p>' . wfMsg('unusedcategoriestext') . '</p>';
 19+ return wfMsgExt( 'unusedcategoriestext', array( 'parse' ) );
2020 }
2121
2222 function getSQL() {
Index: branches/liquidthreads/includes/filerepo/LocalFile.php
@@ -150,7 +150,7 @@
151151 * Load metadata from the file itself
152152 */
153153 function loadFromFile() {
154 - $this->setProps( self::getInfoFromPath( $this->getPath() ) );
 154+ $this->setProps( self::getPropsFromPath( $this->getPath() ) );
155155 }
156156
157157 function getCacheFields( $prefix = 'img_' ) {
Index: branches/liquidthreads/includes/SpecialWithoutinterwiki.php
@@ -12,9 +12,9 @@
1313 function getName() {
1414 return 'Withoutinterwiki';
1515 }
16 -
 16+
1717 function getPageHeader() {
18 - return '<p>' . wfMsgHtml( 'withoutinterwiki-header' ) . '</p>';
 18+ return '<p>' . wfMsgExt( 'withoutinterwiki-header', array( 'parseinline' ) ) . '</p>';
1919 }
2020
2121 function sortDescending() {
@@ -24,7 +24,7 @@
2525 function isExpensive() {
2626 return true;
2727 }
28 -
 28+
2929 function isSyndicated() {
3030 return false;
3131 }
@@ -44,7 +44,7 @@
4545 AND page_namespace=" . NS_MAIN . "
4646 AND page_is_redirect = 0";
4747 }
48 -
 48+
4949 }
5050
5151 function wfSpecialWithoutinterwiki() {
Index: branches/liquidthreads/includes/SpecialDoubleRedirects.php
@@ -19,8 +19,7 @@
2020 function isSyndicated() { return false; }
2121
2222 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' ) );
2524 }
2625
2726 function getSQLText( &$dbr, $namespace = null, $title = null ) {
Index: branches/liquidthreads/includes/SpecialBrokenRedirects.php
@@ -20,8 +20,7 @@
2121 function isSyndicated() { return false; }
2222
2323 function getPageHeader( ) {
24 - global $wgOut;
25 - return $wgOut->parse( wfMsg( 'brokenredirectstext' ) );
 24+ return wfMsgExt( 'brokenredirectstext', array( 'parse' ) );
2625 }
2726
2827 function getSQL() {
Index: branches/liquidthreads/includes/SpecialUnusedtemplates.php
@@ -37,8 +37,7 @@
3838 }
3939
4040 function getPageHeader() {
41 - global $wgOut;
42 - return $wgOut->parse( wfMsg( 'unusedtemplatestext' ) );
 41+ return wfMsgExt( 'unusedtemplatestext', array( 'parse' ) );
4342 }
4443
4544 }
Index: branches/liquidthreads/includes/SpecialDeadendpages.php
@@ -15,7 +15,7 @@
1616 }
1717
1818 function getPageHeader() {
19 - return '<p>' . wfMsg('deadendpagestext') . '</p>';
 19+ return wfMsgExt( 'deadendpagestext', array( 'parse' ) );
2020 }
2121
2222 /**
Index: branches/liquidthreads/languages/messages/MessagesEn.php
@@ -368,7 +368,7 @@
369369 'Listusers' => array( 'Listusers', 'Userlist' ),
370370 'Statistics' => array( 'Statistics' ),
371371 'Randompage' => array( 'Random', 'Randompage' ),
372 - 'Lonelypages' => array( 'Lonelypages' ),
 372+ 'Lonelypages' => array( 'Lonelypages', 'Orphanedpages' ),
373373 'Uncategorizedpages' => array( 'Uncategorizedpages' ),
374374 'Uncategorizedcategories' => array( 'Uncategorizedcategories' ),
375375 'Uncategorizedimages' => array( 'Uncategorizedimages' ),
Index: branches/liquidthreads/RELEASE-NOTES
@@ -87,6 +87,8 @@
8888 * On reupload, add a null revision to the image description page
8989 * Group log output by date
9090 * 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
9193
9294 == Bugfixes since 1.10 ==
9395
@@ -175,7 +177,10 @@
176178 Signature dates for Japanese and other languages including weekday now show
177179 the correct day to match the rest of the time in local time.
178180 * 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
179183
 184+
180185 == API changes since 1.10 ==
181186
182187 (For ongoing development discussion, see http://www.mediawiki.org/wiki/API)
Property changes on: branches/liquidthreads
___________________________________________________________________
Modified: svnmerge-integrated
183188 - /trunk/phase3:1-23086
184189 + /trunk/phase3:1-23102

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r23023* Split off ultimate base class FileRepo from FSRepo...tstarling02:55, 16 June 2007
r23094* Add number of links to Special:Whatlinkshere...raymond13:02, 19 June 2007
r23095* Allow wikilinks in header of Special:Withoutinterwiki...raymond13:38, 19 June 2007
r23096Revert r23094 for the moment; gives misleading number when paging long listsbrion14:27, 19 June 2007
r23097Our release manager believes I need to be shot. I am a mindless drone without...robchurch14:42, 19 June 2007
r23098* Support wiki text in all query page headers...robchurch15:06, 19 June 2007
r23099Fix regression introduced in r23023; use the right function name when calling...brion15:11, 19 June 2007
r23100parser test cases for bug 10309brion15:49, 19 June 2007
r23101* (bug 10309) Initialise parser state properly in extractSections(), fixes...brion16:00, 19 June 2007

Status & tagging log