r85027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85026‎ | r85027 | r85028 >
Date:18:23, 30 March 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Modified paths:
  • /branches/REL1_17/extensions/CategoryTree (modified) (history)
  • /branches/REL1_17/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)
  • /branches/REL1_17/extensions/CentralAuth (modified) (history)
  • /branches/REL1_17/extensions/CentralAuth/SpecialCentralAuth.php (modified) (history)
  • /branches/REL1_17/extensions/CentralAuth/SpecialWikiSets.php (modified) (history)
  • /branches/REL1_17/extensions/CentralAuth/centralauth.js (modified) (history)
  • /branches/REL1_17/extensions/CodeReview (modified) (history)
  • /branches/REL1_17/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /branches/REL1_17/extensions/CodeReview/backend/CodeRevision.php (modified) (history)
  • /branches/REL1_17/extensions/CodeReview/ui/CodeCommentsListView.php (modified) (history)
  • /branches/REL1_17/extensions/CodeReview/ui/CodeRevisionCommitter.php (modified) (history)
  • /branches/REL1_17/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)
  • /branches/REL1_17/extensions/DoubleWiki (modified) (history)
  • /branches/REL1_17/extensions/DoubleWiki/DoubleWiki_body.php (modified) (history)
  • /branches/REL1_17/extensions/FlaggedRevs (modified) (history)
  • /branches/REL1_17/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /branches/REL1_17/extensions/FlaggedRevs/client/flaggedrevs.js (modified) (history)
  • /branches/REL1_17/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php (modified) (history)
  • /branches/REL1_17/extensions/Gadgets (modified) (history)
  • /branches/REL1_17/extensions/Gadgets/Gadgets_body.php (modified) (history)
  • /branches/REL1_17/extensions/LiquidThreads/classes/View.php (modified) (history)
  • /branches/REL1_17/extensions/NewUserMessage (modified) (history)
  • /branches/REL1_17/extensions/NewUserMessage/NewUserMessage.class.php (modified) (history)
  • /branches/REL1_17/extensions/NewUserMessage/NewUserMessage.i18n.php (modified) (history)
  • /branches/REL1_17/extensions/OpenSearchXml/ApiOpenSearchXml.php (modified) (history)
  • /branches/REL1_17/extensions/PagedTiffHandler/PagedTiffHandler.i18n.php (modified) (history)
  • /branches/REL1_17/extensions/ProofreadPage (modified) (history)
  • /branches/REL1_17/extensions/ProofreadPage/ProofreadPage_body.php (modified) (history)
  • /branches/REL1_17/extensions/ProofreadPage/proofread.js (modified) (history)
  • /branches/REL1_17/extensions/ReaderFeedback/ReaderFeedback.hooks.php (modified) (history)
  • /branches/REL1_17/extensions/Vector (modified) (history)
  • /branches/REL1_17/extensions/Vector/modules/ext.vector.collapsibleTabs.js (modified) (history)
  • /branches/REL1_17/extensions/Vector/modules/ext.vector.simpleSearch.js (modified) (history)
  • /branches/REL1_17/extensions/WikiEditor (modified) (history)
  • /branches/REL1_17/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.js (modified) (history)
  • /branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.css (modified) (history)

Diff [purge]

Index: branches/REL1_17/extensions/CodeReview/CodeReview.i18n.php
@@ -162,8 +162,10 @@
163163 'codereview-email-body3' => 'User "$1" changed the status of $2.
164164
165165 Old Status: $3
166 -New Status: $4',
 166+New Status: $4
167167
 168+Full URL: $5',
 169+
168170 'codereview-email-subj4' => '[$1 $2]: New comment added, and revision status changed',
169171 'codereview-email-body4' => 'User "$1" changed the status of $2.
170172
@@ -205,6 +207,7 @@
206208 'right-codereview-set-status' => 'Change revisions status',
207209 'right-codereview-signoff' => 'Sign off on revisions',
208210 'right-codereview-link-user' => 'Link authors to wiki users',
 211+ 'right-codereview-associate' => 'Manage revision associations',
209212
210213 'specialpages-group-developer' => 'Developer tools',
211214 );
Index: branches/REL1_17/extensions/CodeReview/backend/CodeRevision.php
@@ -444,14 +444,14 @@
445445 }
446446
447447 /**
448 - * @param $subject
449 - * @param $body
 448+ * @param $subject String
 449+ * @param $body String
450450 * @return void
451451 */
452452 public function emailNotifyUsersOfChanges( $subject, $body ) {
453453 // Give email notices to committer and commenters
454454 global $wgCodeReviewENotif, $wgEnableEmail, $wgCodeReviewCommentWatcherEmail,
455 - $wgCodeReviewCommentWatcherName, $wgUser;
 455+ $wgCodeReviewCommentWatcherName;
456456 if ( !$wgCodeReviewENotif || !$wgEnableEmail ) {
457457 return;
458458 }
@@ -487,7 +487,7 @@
488488 $lang = array( 'language' => $user->getOption( 'language' ) );
489489
490490 $localSubject = wfMsgExt( $subject, $lang, $this->mRepo->getName(), $this->getIdString() );
491 - $localBody = call_user_func_array( 'wfMsgExt', array_merge( array( $body, $lang, $wgUser->getName() ), $args ) );
 491+ $localBody = call_user_func_array( 'wfMsgExt', array_merge( array( $body, $lang ), $args ) );
492492
493493 $user->sendMail( $localSubject, $localBody );
494494 }
Index: branches/REL1_17/extensions/CodeReview/ui/CodeCommentsListView.php
@@ -67,7 +67,7 @@
6868 switch( $name ) {
6969 case 'cc_rev_id':
7070 return $this->mView->skin->link(
71 - SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $value . '#code-comments' ),
 71+ SpecialPage::getSafeTitleFor( 'Code', $this->mRepo->getName() . '/' . $value . '#code-comments' ),
7272 htmlspecialchars( $value ) );
7373 case 'cr_status':
7474 return $this->mView->skin->link(
Index: branches/REL1_17/extensions/CodeReview/ui/CodeRevisionCommitter.php
@@ -117,18 +117,18 @@
118118 $dbw->commit();
119119
120120 if ( $statusChanged || $commentAdded ) {
 121+ $url = $this->mRev->getFullUrl( $commentId );
121122 if ( $statusChanged && $commentAdded ) {
122 - $url = $this->mRev->getFullUrl( $commentId );
123123 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj4', 'codereview-email-body4',
124 - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus, $this->mRev->mStatus,
125 - $url, $this->text
 124+ $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(),
 125+ $this->mRev->getStatus(), $url, $this->text
126126 );
127127 } else if ( $statusChanged ) {
128128 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj3', 'codereview-email-body3',
129 - $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->mOldStatus, $this->mRev->mStatus
 129+ $wgUser->getName(), $this->mRev->getIdStringUnique(), $this->mRev->getOldStatus(),
 130+ $this->mRev->getStatus(), $url
130131 );
131132 } else if ( $commentAdded ) {
132 - $url = $this->mRev->getFullUrl( $commentId );
133133 $this->mRev->emailNotifyUsersOfChanges( 'codereview-email-subj', 'codereview-email-body',
134134 $wgUser->getName(), $url, $this->mRev->getIdStringUnique(), $this->text
135135 );
Index: branches/REL1_17/extensions/CodeReview/ui/CodeRevisionView.php
@@ -136,12 +136,23 @@
137137 "<div class='mw-codereview-diff' id='mw-codereview-diff'>" . $diffHtml . "</div>\n";
138138 $html .= $this->formatImgDiff();
139139 }
 140+
140141 # Show sign-offs
141 - $html .= "<h2 id='code-signoffs'>" . wfMsgHtml( 'code-signoffs' ) .
142 - "</h2>\n" . $this->formatSignoffs( $this->canSignoff() );
 142+ $userCanSignoff = $this->canSignoff();
 143+ $signOffs = $this->mRev->getSignoffs();
 144+ if ( count( $signOffs ) || $userCanSignoff ) {
 145+ $html .= "<h2 id='code-signoffs'>" . wfMsgHtml( 'code-signoffs' ) .
 146+ "</h2>\n" . $this->formatSignoffs( $signOffs, $userCanSignoff );
 147+ }
 148+
143149 # Show code relations
144 - $html .= "<h2 id='code-references'>" . wfMsgHtml( 'code-references' ) .
145 - "</h2>\n" . $this->formatReferences( $this->canAssociate() );
 150+ $userCanAssociate = $this->canAssociate();
 151+ $references = $this->mRev->getReferences();
 152+ if ( count( $references ) || $userCanAssociate ) {
 153+ $html .= "<h2 id='code-references'>" . wfMsgHtml( 'code-references' ) .
 154+ "</h2>\n" . $this->formatReferences( $references, $userCanAssociate );
 155+ }
 156+
146157 # Add revision comments
147158 if ( $comments ) {
148159 $html .= "<h2 id='code-comments'>" . wfMsgHtml( 'code-comments' ) .
@@ -446,9 +457,9 @@
447458 * @param $showButtons bool Whether the buttons to strike and submit sign-offs should be shown
448459 * @return string HTML
449460 */
450 - protected function formatSignoffs( $showButtons ) {
 461+ protected function formatSignoffs( $signOffs, $showButtons ) {
451462 $signoffs = implode( "\n",
452 - array_map( array( $this, 'formatSignoffInline' ), $this->mRev->getSignoffs() )
 463+ array_map( array( $this, 'formatSignoffInline' ), $signOffs )
453464 );
454465 $header = '<th></th>';
455466 $header .= '<th>' . wfMsgHtml( 'code-signoff-field-user' ) . '</th>';
@@ -481,9 +492,9 @@
482493 return "<ul class='mw-codereview-changes'>$changes</ul>";
483494 }
484495
485 - protected function formatReferences( $showButtons ) {
 496+ protected function formatReferences( $references, $showButtons ) {
486497 $refs = implode( "\n",
487 - array_map( array( $this, 'formatReferenceInline' ), $this->mRev->getReferences() )
 498+ array_map( array( $this, 'formatReferenceInline' ), $references )
488499 );
489500 $header = '<th></th>';
490501 $header .= '<th>' . wfMsgHtml( 'code-field-id' ) . '</th>';
Property changes on: branches/REL1_17/extensions/CodeReview
___________________________________________________________________
Added: svn:mergeinfo
491502 Merged /trunk/extensions/CodeReview:r82114,82128,82131-82132,82146,82574
Index: branches/REL1_17/extensions/NewUserMessage/NewUserMessage.i18n.php
@@ -15,6 +15,7 @@
1616 $messages['en'] = array(
1717 'newusermessage-desc' => "Adds a message to newly created user's talk pages",
1818 'newuseredit-summary' => 'Adding [[{{int:newusermessage-template}}|welcome message]] to new user\'s talk page',
 19+ 'newusermessage-template' => 'Template:Welcome', # The title of the message template
1920 'newusermessage-template-subject' => 'Template:Welcome-subject', # Always substituted. Used if LiquidThreads is enabled in the User_talk namespace. Do not translate or duplicate this message to other languages
2021 'newusermessage-template-body' => 'Template:Welcome-body', # Used if LiquidThreads is enabled in the User_talk namespace. Do not translate or duplicate this message to other languages
2122 'newusermessage-editor' => 'New user message', # The username used for the edit
Index: branches/REL1_17/extensions/NewUserMessage/NewUserMessage.class.php
@@ -79,11 +79,16 @@
8080 }
8181
8282 /**
83 - * Produce the text of the message.
 83+ * Produce the template that contains the text of the message.
8484 * @returns String
8585 */
8686 static function fetchText() {
87 - return self::fetchTemplateIfExists( wfMsg( 'newusermessage-template-body' ) );
 87+ $template = wfMsg( 'newusermessage-template-body' );
 88+ // Fall back if necessary to the old template
 89+ if ( !$template ) {
 90+ $template = wfMsg( 'newusermessage-template' );
 91+ }
 92+ return $template;
8893 }
8994
9095 /**
@@ -118,9 +123,9 @@
119124 $substitute = wfMsgForContent( 'newusermessage-substitute' );
120125
121126 if ( $substitute ) {
122 - $str = "{{subst:{{$str}}}|realName=$realName|name=$name}}";
 127+ $str = '{{subst:' . "$str|realName=$realName|name=$name}}";
123128 } else {
124 - $str = "{{{$str}|realName=$realName|name=$name}}";
 129+ $str = '{{' . "$str|realName=$realName|name=$name}}";
125130 }
126131
127132 if ( $preparse ) {
@@ -147,11 +152,17 @@
148153 $editor = self::fetchEditor();
149154 $flags = self::fetchFlags();
150155
151 - $subject = self::substString( $subject, $user, $editor, $talk, "preparse" );
152 - $text = self::substString( $text, $user, $editor, $talk );
 156+ if ( $subject ) {
 157+ $subject = self::substString( $subject, $user, $editor, $talk, "preparse" );
 158+ }
 159+ if ( $text ) {
 160+ $text = self::substString( $text, $user, $editor, $talk );
 161+ }
153162
154 - return $user->leaveUserMessage( $subject, $text, $signature, $editSummary,
155 - $editor, $flags );
 163+ self::leaveUserMessage( $user, $article, $subject, $text,
 164+ $signature, $editSummary, $editor, $flags );
 165+
 166+ return true;
156167 }
157168 }
158169
@@ -178,4 +189,66 @@
179190 $names[] = 'msg:newusermessage-editor';
180191 return true;
181192 }
 193+
 194+ /**
 195+ * Leave a user a message
 196+ * @param $subject String the subject of the message
 197+ * @param $text String the message to leave
 198+ * @param $signature String Text to leave in the signature
 199+ * @param $summary String the summary for this change, defaults to
 200+ * "Leave system message."
 201+ * @param $editor User The user leaving the message, defaults to
 202+ * "{{MediaWiki:usermessage-editor}}"
 203+ * @param $flags Int default edit flags
 204+ *
 205+ * @return boolean true if it was successful
 206+ */
 207+ public static function leaveUserMessage( $user, $article, $subject, $text, $signature,
 208+ $summary, $editor, $flags ) {
 209+ $text = self::formatUserMessage( $subject, $text, $signature );
 210+ $flags = $article->checkFlags( $flags );
 211+
 212+ if ( $flags & EDIT_UPDATE ) {
 213+ $text = $article->getContent() . $text;
 214+ }
 215+
 216+ $dbw = wfGetDB( DB_MASTER );
 217+ $dbw->begin();
 218+
 219+ try {
 220+ $status = $article->doEdit( $text, $summary, $flags, false, $editor );
 221+ } catch ( DBQueryError $e ) {
 222+ $status = Status::newFatal( 'DB Error' );
 223+ }
 224+
 225+ if ( $status->isGood() ) {
 226+ // Set newtalk with the right user ID
 227+ $user->setNewtalk( true );
 228+ $dbw->commit();
 229+ } else {
 230+ // The article was concurrently created
 231+ wfDebug( __METHOD__ . ": Error ".$status->getWikiText() );
 232+ $dbw->rollback();
 233+ }
 234+
 235+ return $status->isGood();
 236+ }
 237+
 238+ /**
 239+ * Format the user message using a hook, a template, or, failing these, a static format.
 240+ * @param $subject String the subject of the message
 241+ * @param $text String the content of the message
 242+ * @param $signature String the signature, if provided.
 243+ */
 244+ static protected function formatUserMessage( $subject, $text, $signature ) {
 245+ $contents = "\n";
 246+ $signature = empty( $signature ) ? "~~~~~" : "{$signature} ~~~~~";
 247+
 248+ if ( $subject ) {
 249+ $contents .= "== $subject ==\n";
 250+ }
 251+ $contents .= "\n$text\n\n-- $signature\n";
 252+
 253+ return $contents;
 254+ }
182255 }
Property changes on: branches/REL1_17/extensions/NewUserMessage
___________________________________________________________________
Added: svn:mergeinfo
183256 Merged /trunk/extensions/NewUserMessage:r81966,81969,82088
Index: branches/REL1_17/extensions/LiquidThreads/classes/View.php
@@ -2223,9 +2223,9 @@
22242224 }
22252225
22262226 // Parser gets antsy about parser options here if it hasn't parsed anything before.
 2227+ $wgParser->mOptions = new ParserOptions;
22272228 $wgParser->clearState();
22282229 $wgParser->setTitle( $wgTitle );
2229 - $wgParser->mOptions = new ParserOptions;
22302230
22312231 $sig = $wgOut->parseInline( $sig );
22322232
@@ -2240,9 +2240,9 @@
22412241 $title = $wgTitle ? $wgTitle : $user->getUserPage();
22422242
22432243 // Parser gets antsy about parser options here if it hasn't parsed anything before.
 2244+ $wgParser->mOptions = new ParserOptions;
22442245 $wgParser->clearState();
22452246 $wgParser->setTitle( $title );
2246 - $wgParser->mOptions = new ParserOptions;
22472247
22482248 $sig = $wgParser->preSaveTransform(
22492249 $sig,
Property changes on: branches/REL1_17/extensions/LiquidThreads/classes/View.php
___________________________________________________________________
Added: svn:mergeinfo
22502250 Merged /trunk/extensions/LiquidThreads/classes/View.php:r57390,81742
Index: branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.css
@@ -241,7 +241,7 @@
242242 }
243243 .wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
244244 .wikiEditor-ui-toolbar .section-help .page-table td.syntax {
245 - font-family: monospace;
 245+ font-family: monospace, "Courier New";
246246 }
247247 .wikiEditor-ui-toolbar .section-help .page-table td.syntax,
248248 .wikiEditor-ui-toolbar .section-help .page-table td.cell-syntax,
@@ -267,7 +267,7 @@
268268 color: black;
269269 text-decoration: none;
270270 cursor: pointer;
271 - font-family: monospace;
 271+ font-family: monospace, "Courier New";
272272 font-size: 1.25em;
273273 }
274274 .wikiEditor-ui-toolbar .page-characters div[dir=rtl] span {
Index: branches/REL1_17/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.js
@@ -647,9 +647,7 @@
648648 "\u05d0", "\u05d1", "\u05d2", "\u05d3", "\u05d4", "\u05d5", "\u05d6", "\u05d7", "\u05d8",
649649 "\u05d9", "\u05db", "\u05da", "\u05dc", "\u05de", "\u05dd", "\u05e0", "\u05df", "\u05e1",
650650 "\u05e2", "\u05e4", "\u05e3", "\u05e6", "\u05e5", "\u05e7", "\u05e8", "\u05e9", "\u05ea",
651 - "\u05f3", "\u05f4", "\u05f0", "\u05f1", "\u05f2", "\u05d0", "\u05d3", "\u05d4", "\u05d5",
652 - "\u05d6", "\u05d7", "\u05d8", "\u05d9", "\u05da", "\u05db", "\u05dc", "\u05dd", "\u05de",
653 - "\u05df", "\u05e0", "\u05e1", "\u05e2", "\u05e3", "\u05e4", "\u05be", "\u05f3", "\u05f4",
 651+ "\u05f3", "\u05f4", "\u05f0", "\u05f1", "\u05f2", "\u05be",
654652 [ "\u05b0\u25cc", "\u05b0" ], [ "\u05b1\u25cc", "\u05b1" ], [ "\u05b2\u25cc", "\u05b2" ],
655653 [ "\u05b3\u25cc", "\u05b3" ], [ "\u05b4\u25cc", "\u05b4" ], [ "\u05b5\u25cc", "\u05b5" ],
656654 [ "\u05b6\u25cc", "\u05b6" ], [ "\u05b7\u25cc", "\u05b7" ], [ "\u05b8\u25cc", "\u05b8" ],
Property changes on: branches/REL1_17/extensions/WikiEditor
___________________________________________________________________
Added: svn:mergeinfo
657655 Merged /trunk/extensions/WikiEditor:r82458,82554
Index: branches/REL1_17/extensions/Vector/modules/ext.vector.simpleSearch.js
@@ -1,11 +1,5 @@
22 /* JavaScript for SimpleSearch extension */
33
4 -// XXX: Disable mwsuggest.js's effect on searchInput
5 -if ( typeof os_autoload_inputs !== 'undefined' && os_autoload_forms !== 'undefined' ) {
6 - os_autoload_inputs = [];
7 - os_autoload_forms = [];
8 -}
9 -
104 $( document ).ready( function() {
115
126 // Compatibility map
@@ -34,6 +28,11 @@
3529 return true;
3630 }
3731
 32+ // Disable MWSuggest if loaded
 33+ if ( window.os_MWSuggestDisable ) {
 34+ window.os_MWSuggestDisable();
 35+ }
 36+
3837 // Placeholder text for SimpleSearch box
3938 $( 'div#simpleSearch > input#searchInput' )
4039 .attr( 'placeholder', mediaWiki.msg( 'vector-simplesearch-search' ) )
Property changes on: branches/REL1_17/extensions/Vector/modules/ext.vector.simpleSearch.js
___________________________________________________________________
Modified: svn:mergeinfo
4140 Merged /trunk/extensions/Vector/modules/ext.vector.simpleSearch.js:r82130
Property changes on: branches/REL1_17/extensions/Vector/modules/ext.vector.collapsibleTabs.js
___________________________________________________________________
Modified: svn:mergeinfo
4241 Merged /trunk/extensions/Vector/modules/ext.vector.collapsibleTabs.js:r82130
Property changes on: branches/REL1_17/extensions/Vector
___________________________________________________________________
Added: svn:mergeinfo
4342 Merged /trunk/extensions/Vector:r82130
Index: branches/REL1_17/extensions/ProofreadPage/ProofreadPage_body.php
@@ -357,19 +357,24 @@
358358 $height = $image->getHeight();
359359 if ( $m[2] ) {
360360 $thumbName = $image->thumbName( array( 'width' => '##WIDTH##', 'page' => $m[3] ) );
 361+ $thumbURL = $image->getThumbUrl( $thumbName );
 362+ $thumbURL = str_replace( '%23', '#', $thumbURL );
 363+ $fullURL = str_replace( '##WIDTH##', "$width", $thumbURL );
361364 } else {
362365 $thumbName = $image->thumbName( array( 'width' => '##WIDTH##' ) );
 366+ $thumbURL = $image->getThumbUrl( $thumbName );
 367+ $thumbURL = str_replace( '%23', '#', $thumbURL );
 368+ $fullURL = $image->getURL();
363369 }
364 - $thumbURL = $image->getThumbUrl( $thumbName );
365 - $thumbURL = str_replace( '%23', '#', $thumbURL );
366370 $scan_link = Html::element( 'a',
367 - array( 'href' => str_replace( '##WIDTH##', "$width", $thumbURL ),
 371+ array( 'href' => $fullURL,
368372 'title' => wfMsg( 'proofreadpage_image' ) ),
369373 wfMsg( 'proofreadpage_image' ) );
370374 } else {
371375 $width = 0;
372376 $height = 0;
373377 $thumbURL = '';
 378+ $fullURL = '';
374379 $scan_link = '';
375380 }
376381
@@ -388,6 +393,7 @@
389394 'proofreadPageHeight' => intval( $height ),
390395 'proofreadPageEditWidth' => $edit_width,
391396 'proofreadPageThumbURL' => $thumbURL,
 397+ 'proofreadPageURL' => $fullURL,
392398 'proofreadPageIsEdit' => intval( $isEdit ),
393399 'proofreadPageIndexLink' => $index_link,
394400 'proofreadPageNextLink' => $next_link,
@@ -601,10 +607,10 @@
602608 $view = ( $i - $offset );
603609 switch( $mode ) {
604610 case 'highroman':
605 - $view = toRoman( $view );
 611+ $view = $this->toRoman( $view );
606612 break;
607613 case 'roman':
608 - $view = strtolower( toRoman( $view ) );
 614+ $view = strtolower( $this->toRoman( $view ) );
609615 break;
610616 case 'normal':
611617 $view = '' . $view;
@@ -857,11 +863,9 @@
858864 if( !$is_q0 ) {
859865 $out .= '<span>{{:MediaWiki:Proofreadpage_pagenum_template|page=' . $text . "|num=$pagenum}}</span>";
860866 }
861 - if( $args["$i"] != null ) {
862 - $out .= '{{#lst:' . $text . '|' . $args["$i"] . '}}';
863 - } elseif( $page == $from && $args['fromsection'] ) {
 867+ if( $page == $from_page && $args['fromsection'] ) {
864868 $out .= '{{#lst:' . $text . '|' . $args['fromsection'] . '}}';
865 - } elseif( $page == $to && $args['tosection'] ) {
 869+ } elseif( $page == $to_page && $args['tosection'] ) {
866870 $out .= '{{#lst:' . $text . '|' . $args['tosection'] . '}}';
867871 } else {
868872 $out .= '{{:' . $text . '}}';
@@ -941,7 +945,7 @@
942946 }
943947
944948 // wrap the output in a div, to prevent the parser from inserting pararaphs
945 - $out = "<div>$out</div>";
 949+ $out = "<div>\n$out\n</div>";
946950 $out = $parser->recursiveTagParse( $out );
947951 return $out;
948952 }
Index: branches/REL1_17/extensions/ProofreadPage/proofread.js
@@ -16,10 +16,15 @@
1717 // enforce quantization: width must be multiple of 100px
1818 var width = 100 * Math.round( requested_width / 100 );
1919 // compare to the width of the image
20 - width = Math.min( width, proofreadPageWidth );
21 - self.DisplayWidth = width;
22 - self.DisplayHeight = width * proofreadPageHeight / proofreadPageWidth;
23 - return proofreadPageThumbURL.replace( '##WIDTH##', '' + width );
 20+ if( width < proofreadPageWidth ) {
 21+ self.DisplayWidth = width;
 22+ self.DisplayHeight = width * proofreadPageHeight / proofreadPageWidth;
 23+ return proofreadPageThumbURL.replace( '##WIDTH##', '' + width );
 24+ } else {
 25+ self.DisplayWidth = proofreadPageWidth;
 26+ self.DisplayHeight = proofreadPageHeight;
 27+ return proofreadPageURL;
 28+ }
2429 }
2530 }
2631
@@ -893,12 +898,8 @@
894899 }
895900
896901 // add CSS classes to the container div
897 - var c = document.getElementById( 'pagequality' );
898 - if( c ) {
899 - c = c.nextSibling;
900 - if( c.className == 'pagetext' ) {
901 - c.className += ' ' + self.proofreadPageCss;
902 - }
 902+ if( self.proofreadPageCss) {
 903+ $( 'div.pagetext' ).addClass( self.proofreadPageCss );
903904 }
904905 }
905906
@@ -947,7 +948,7 @@
948949 if( !proofreadPageAddButtons ) {
949950 f.innerHTML =
950951 ' <input type="hidden" name="wpProofreader" value="' + escapeQuotesHTML( self.proofreadpage_username ) + '">' +
951 - '<input type="hidden" name="quality" value="' + escapeQuotesHTML( self.proofreadpage_quality ) + '" >';
 952+ '<input type="hidden" name="quality" value="' + escapeQuotesHTML( self.proofreadpage_quality +'' ) + '" >';
952953 return;
953954 }
954955
Property changes on: branches/REL1_17/extensions/ProofreadPage
___________________________________________________________________
Added: svn:mergeinfo
955956 Merged /trunk/extensions/ProofreadPage:r82404,82408-82409,82453,82460,82555
Index: branches/REL1_17/extensions/Gadgets/Gadgets_body.php
@@ -318,11 +318,11 @@
319319 public function getModule() {
320320 $pages = array();
321321 foreach( $this->styles as $style ) {
322 - $pages[$style] = array( 'ns' => NS_MEDIAWIKI, 'type' => 'style' );
 322+ $pages['MediaWiki:' . $style] = array( 'type' => 'style' );
323323 }
324324 if ( $this->supportsResourceLoader() ) {
325325 foreach ( $this->scripts as $script ) {
326 - $pages[$script] = array( 'ns' => NS_MEDIAWIKI, 'type' => 'script' );
 326+ $pages['MediaWiki:' . $script] = array( 'type' => 'script' );
327327 }
328328 }
329329 if ( !count( $pages ) ) {
@@ -363,6 +363,7 @@
364364 $struct = self::loadStructuredList();
365365 if ( !$struct ) {
366366 $gadgets = $struct;
 367+ wfProfileOut( __METHOD__ );
367368 return $gadgets;
368369 }
369370
@@ -469,8 +470,8 @@
470471 * @param $pages Array: Associative array of pages in ResourceLoaderWikiModule-compatible
471472 * format, for example:
472473 * array(
473 - * 'Gadget-foo.js' => array( 'ns' => NS_MEDIAWIKI, 'type' => 'script' ),
474 - * 'Gadget-foo.css' => array( 'ns' => NS_MEDIAWIKI, 'type' => 'style' ),
 474+ * 'MediaWiki:Gadget-foo.js' => array( 'type' => 'script' ),
 475+ * 'MediaWiki:Gadget-foo.css' => array( 'type' => 'style' ),
475476 * )
476477 * @param $dependencies Array: Names of resources this module depends on
477478 */
@@ -494,4 +495,4 @@
495496 public function getDependencies() {
496497 return $this->dependencies;
497498 }
498 -}
\ No newline at end of file
 499+}
Property changes on: branches/REL1_17/extensions/Gadgets/Gadgets_body.php
___________________________________________________________________
Added: svn:mergeinfo
499500 Merged /trunk/extensions/Gadgets/Gadgets_body.php:r81908,82524
500501 Merged /branches/Gadgets-work/Gadgets_body.php:r73145-76526
501502 Merged /branches/wmf/1.17wmf1/extensions/Gadgets/Gadgets_body.php:r81884
Property changes on: branches/REL1_17/extensions/Gadgets
___________________________________________________________________
Modified: svn:mergeinfo
502503 Merged /trunk/extensions/Gadgets:r81908
Index: branches/REL1_17/extensions/OpenSearchXml/ApiOpenSearchXml.php
@@ -261,8 +261,8 @@
262262 // First, we use the system preprocessor to break down the text
263263 // into text, templates, extensions, and comments:
264264 global $wgParser;
 265+ $wgParser->mOptions = new ParserOptions();
265266 $wgParser->clearState();
266 - $wgParser->mOptions = new ParserOptions();
267267 $frame = $wgParser->getPreprocessor()->newFrame();
268268 $dom = $wgParser->preprocessToDom( $text );
269269
Property changes on: branches/REL1_17/extensions/OpenSearchXml/ApiOpenSearchXml.php
___________________________________________________________________
Added: svn:mergeinfo
270270 Merged /trunk/extensions/OpenSearchXml/ApiOpenSearchXml.php:r81743
Index: branches/REL1_17/extensions/PagedTiffHandler/PagedTiffHandler.i18n.php
@@ -28,7 +28,7 @@
2929 'tiff_size_error' => 'The reported file size does not match the actual file size.',
3030 'tiff_script_detected' => 'The uploaded file contains scripts.',
3131 'tiff_bad_file' => 'The uploaded file contains errors: $1',
32 - 'tiff-file-info-size' => 'page $5, $1 × $2 pixel, file size: $3, MIME type: $4',
 32+ 'tiff-file-info-size' => 'page $5, $1 × $2 pixels, file size: $3, MIME type: $4',
3333 );
3434
3535 /** Message documentation (Message documentation)
Property changes on: branches/REL1_17/extensions/PagedTiffHandler/PagedTiffHandler.i18n.php
___________________________________________________________________
Added: svn:mergeinfo
3636 Merged /trunk/extensions/PagedTiffHandler/PagedTiffHandler.i18n.php:r82073
Index: branches/REL1_17/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -767,7 +767,9 @@
768768 # The title must be in the category namespace
769769 # Ignore a leading Category: if there is one
770770 $t = Title::newFromText( $title, NS_CATEGORY );
771 - if ( $t && ( $t->getNamespace() != NS_CATEGORY || $t->getInterWiki() != '' ) ) {
 771+ if ( !$t || $t->getNamespace() != NS_CATEGORY || $t->getInterWiki() != '' ) {
 772+ // If we were given something like "Wikipedia:Foo" or "Template:",
 773+ // try it again but forced.
772774 $title = "Category:$title";
773775 $t = Title::newFromText( $title );
774776 }
Property changes on: branches/REL1_17/extensions/CategoryTree/CategoryTreeFunctions.php
___________________________________________________________________
Modified: svn:mergeinfo
775777 Merged /trunk/extensions/CategoryTree/CategoryTreeFunctions.php:r82085
Property changes on: branches/REL1_17/extensions/CategoryTree
___________________________________________________________________
Added: svn:mergeinfo
776778 Merged /trunk/extensions/CategoryTree:r82085
Index: branches/REL1_17/extensions/CentralAuth/centralauth.js
@@ -21,7 +21,9 @@
2222 methodHint.style.left = wgCursorPosition.x + 'px';
2323 methodHint.style.top = wgCursorPosition.y + 'px';
2424 methodHint.setAttribute( 'onclick', 'hideMethodHint()' );
25 - document.getElementById( 'globalWrapper' ).appendChild( methodHint );
 25+
 26+ var content = document.getElementById('content') || document.getElementById('mw_content') || document.body;
 27+ content.appendChild( methodHint );
2628 }
2729
2830 function hideMethodHint() {
Property changes on: branches/REL1_17/extensions/CentralAuth/SpecialWikiSets.php
___________________________________________________________________
Modified: svn:mergeinfo
2931 Merged /trunk/extensions/CentralAuth/SpecialWikiSets.php:r82101
Index: branches/REL1_17/extensions/CentralAuth/SpecialCentralAuth.php
@@ -258,9 +258,9 @@
259259 if ( $span < 2 * $chunk ) {
260260 return wfMsgExt( "centralauth-$unit-ago", 'parsemag', $wgLang->formatNum( $span ) );
261261 }
262 - $span = $wgLang->formatNum( intval( $span / $chunk ) );
 262+ $span = intval( $span / $chunk );
263263 }
264 - return wfMsgExt( "centralauth-$unit-ago", 'parsemag', $span );
 264+ return wfMsgExt( "centralauth-$unit-ago", 'parsemag', $wgLang->formatNum( $span ) );
265265 }
266266
267267 function showInfo() {
Property changes on: branches/REL1_17/extensions/CentralAuth/SpecialCentralAuth.php
___________________________________________________________________
Added: svn:mergeinfo
268268 Merged /trunk/extensions/CentralAuth/SpecialCentralAuth.php:r82101,82386
Property changes on: branches/REL1_17/extensions/CentralAuth
___________________________________________________________________
Added: svn:mergeinfo
269269 Merged /trunk/extensions/CentralAuth:r82101
Property changes on: branches/REL1_17/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php
___________________________________________________________________
Modified: svn:mergeinfo
270270 Merged /trunk/extensions/FlaggedRevs/specialpages/ProblemChanges_body.php:r82226,82537
Property changes on: branches/REL1_17/extensions/FlaggedRevs/FlaggedRevs.hooks.php
___________________________________________________________________
Modified: svn:mergeinfo
271271 Merged /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php:r82226,82537
Index: branches/REL1_17/extensions/FlaggedRevs/client/flaggedrevs.js
@@ -20,12 +20,13 @@
2121 // Rating detail box
2222 var toggle = document.getElementById('mw-fr-revisiontoggle');
2323 if( toggle ) {
24 - toggle.style.display = 'inline';
 24+ toggle.style.display = 'inline'; /* show toggle control */
 25+ this.hideBoxDetails(); /* hide the initially displayed ratings */
2526 }
2627 // Diff detail box
2728 toggle = document.getElementById('mw-fr-difftoggle');
2829 if( toggle ) {
29 - toggle.style.display = 'inline';
 30+ toggle.style.display = 'inline'; /* show toggle control */
3031 var diff = document.getElementById('mw-fr-stablediff');
3132 if( diff ) {
3233 diff.style.display = 'none';
@@ -34,7 +35,7 @@
3536 // Log detail box
3637 toggle = document.getElementById('mw-fr-logtoggle');
3738 if( toggle ) {
38 - toggle.style.display = 'inline';
 39+ toggle.style.display = 'inline'; /* show toggle control */
3940 var log = document.getElementById('mw-fr-logexcerpt');
4041 if( log ) {
4142 log.style.display = 'none';
Property changes on: branches/REL1_17/extensions/FlaggedRevs
___________________________________________________________________
Modified: svn:mergeinfo
4243 Merged /trunk/extensions/FlaggedRevs:r82226,82537
Index: branches/REL1_17/extensions/DoubleWiki/DoubleWiki_body.php
@@ -35,11 +35,15 @@
3636 /*
3737 * Read the list of matched phrases and add tags to the html output.
3838 */
39 - function addMatchingTags ( &$text, $lang ) {
40 - $pattern = "/<div id=\"align-$lang\" style=\"display:none;\">\n<p>([^<]*?)<\/p>\n<\/div>/is";
41 - if( ! preg_match( $pattern, $text, $m ) ) return ;
 39+ function addMatchingTags ( &$text, $lang ) {
 40+ $pattern = "/<div id=\"align-$lang\" style=\"display:none;\">\n*<pre>(.*?)<\/pre>\n*<\/div>/is";
 41+ $m = array();
 42+ if ( ! preg_match( $pattern, $text, $m ) ) {
 43+ return;
 44+ }
4245 $text = str_replace( $m[1], '', $text );
43 - $line_pattern = "/\s*([^:\n]*?)\s*:\s*([^:\n]*?)\s*\n/i";
 46+ $line_pattern = '/\s*([^:\n]*?)\s*=\s*([^:\n]*?)\s*\n/i';
 47+ $items = array();
4448 preg_match_all( $line_pattern, $m[1], $items, PREG_SET_ORDER );
4549 foreach( $items as $n => $i ) {
4650 $text = str_replace( $i[1], "<span id=\"dw-$n\" title=\"{$i[2]}\"/>".$i[1], $text );
@@ -121,7 +125,8 @@
122126 $left_chunk = '';
123127 $right_chunk = '';
124128
125 - for ( $i=0 ; $i < count($left_slices) ; $i++ ) {
 129+ $leftSliceCount = count( $left_slices );
 130+ for ( $i=0 ; $i < $leftSliceCount; $i++ ) {
126131
127132 // some slices might be empty
128133 if( $left_slices[$i] == '' ) {
@@ -167,7 +172,8 @@
168173
169174 $left_chunk = '';
170175 $right_chunk = '';
171 - for($l=0; $l < count( $left_bits ) ; $l++ ) {
 176+ $leftBitCount = count( $left_bits );
 177+ for($l=0; $l < $leftBitCount ; $l++ ) {
172178 $body .=
173179 "<tr><td valign=\"top\" style=\"vertical-align:100%;padding-right: 0.5em\" lang=\"{$left_lang}\">"
174180 ."<div style=\"width:35em; margin:0px auto\">\n".$left_bits[$l]."</div>"
@@ -201,7 +207,8 @@
202208 preg_match_all( $this->tags, $text, $m, PREG_SET_ORDER);
203209 $counter = 0;
204210 $out = '';
205 - for($i=0; $i < count($m); $i++){
 211+ $matchCount = count( $m );
 212+ for( $i = 0; $i < $matchCount; $i++ ){
206213 $t = $m[$i][0];
207214 if( substr( $t, 0, 2) != "</" ) {
208215 $counter++;
@@ -251,7 +258,8 @@
252259 for( $i=0 ; $i < $n ; $i++) {
253260 preg_match_all( $this->tags, $left_slices[$i], $m, PREG_SET_ORDER);
254261 $counter = 0;
255 - for($k=0 ; $k < count($m) ; $k++) {
 262+ $matchCount = count( $m );
 263+ for($k=0 ; $k < $matchCount ; $k++) {
256264 $t = $m[$k];
257265 if( substr( $t[0], 0, 2) != "</" ) {
258266 $counter++;
Property changes on: branches/REL1_17/extensions/DoubleWiki/DoubleWiki_body.php
___________________________________________________________________
Added: svn:mergeinfo
259267 Merged /trunk/extensions/DoubleWiki/DoubleWiki_body.php:r81672,82100,82513,82552
Property changes on: branches/REL1_17/extensions/DoubleWiki
___________________________________________________________________
Modified: svn:mergeinfo
260268 Merged /trunk/extensions/DoubleWiki:r82100
Index: branches/REL1_17/extensions/ReaderFeedback/ReaderFeedback.hooks.php
@@ -24,8 +24,7 @@
2525 // Add CSS
2626 $wgOut->addExtensionStyle( $encCssFile );
2727 // Add JS
28 - $head = "<script type=\"$wgJsMimeType\" src=\"$encJsFile\"></script>\n";
29 - $wgOut->addHeadItem( 'ReaderFeedback', $head );
 28+ $wgOut->addScriptFile( "$stylepath/readerfeedback.js?$wgFeedbackStyleVersion" );
3029
3130 return true;
3231 }
Property changes on: branches/REL1_17/extensions/ReaderFeedback/ReaderFeedback.hooks.php
___________________________________________________________________
Added: svn:mergeinfo
3332 Merged /trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php:r81713

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81713Merge r81712 from 1.17wmf1: fix ReaderFeedback extension, was adding a <scrip...catrope10:46, 8 February 2011
r81742Quick fix instead of r81738. This way of working is completely unsupported...platonides15:05, 8 February 2011
r81743Same as r81742. At least this agrees to be a "TERRIBLE HACK"platonides15:08, 8 February 2011
r81908Merge r81884 (the other half is already in trunk)platonides18:05, 10 February 2011
r81966Fixes for NewUserMessage:...btongminh14:46, 11 February 2011
r81969Don't return the return value of leaveUserMessage, as there is no reason to s...btongminh15:00, 11 February 2011
r82073Bug 27383 - TIFF file description pages state "pixel" rather than "pixels"raymond19:50, 13 February 2011
r82085* (bug 26856) Fix category tree AJAX expansion and inline use for category na...brion22:19, 13 February 2011
r82088Further fixes for NewUserMessage: newusermessage contains the template name, ...btongminh22:37, 13 February 2011
r82100count() in for() is slow, just use a temporary variabledemon01:36, 14 February 2011
r82101* (bug 23320) Fix CentralAuth method popup on Vector skin...brion01:45, 14 February 2011
r82114* (bug 27399) right-codereview-associate message is missingreedy15:46, 14 February 2011
r82128Improve message from r82114 per Nikerabbitreedy19:53, 14 February 2011
r82130(Bug 27402) Disable MWSuggest when SimpleSearch is enabled. Requires MWSugges...catrope19:55, 14 February 2011
r82131Just telling users that a revision status has changed without giving them a l...reedy19:55, 14 February 2011
r82132Fixup hard coding usage of $wgUser->getName() in CodeRevision::emailNotifyUse...reedy19:58, 14 February 2011
r82226Fixed case in SpecialPage::getPage call to avoid fatalaaron08:22, 16 February 2011
r82386Bug 27430 - Special:CentralAuth shouldn't use always minutes:...raymond09:55, 18 February 2011
r82404fix bug 27454: confusion between / and /thomasv15:33, 18 February 2011
r82408toRoman is a methodthomasv17:07, 18 February 2011
r82409fix for pagetext cssthomasv17:38, 18 February 2011
r82453fix regression for small images (bug 27536)thomasv14:29, 19 February 2011
r82458(bug 27502) Monospace text too smallcatrope15:02, 19 February 2011
r82460Force conversion of proofreadpage_quality from number to string....hartman15:20, 19 February 2011
r82513fix regression in r73461: Use pre tag instead of p. Use equal sign instead of...thomasv16:29, 20 February 2011
r82524Adapt Gadgets to changes in r81692maxsem18:14, 20 February 2011
r82537Actually collapse ratings initially by JS in detailed UIaaron21:03, 20 February 2011
r82552close div forgotten in r82513; match new lines too.thomasv14:48, 21 February 2011
r82554WikiEditor: removed duplicate Hebrew characters. Reported on IRC by Yair Rand.maxsem15:35, 21 February 2011
r82555prevent unwanted paragraph creationthomasv15:36, 21 February 2011
r82574Fixup comment linking in CodeReview from /comments...reedy21:12, 21 February 2011

Comments

#Comment by Catrope (talk | contribs)   20:38, 2 April 2011

Also merges r82146

Status & tagging log