Index: branches/REL1_17/extensions/CodeReview/archives/code_signoffs.sql |
— | — | @@ -12,7 +12,10 @@ |
13 | 13 | cs_flag varchar(25) not null, |
14 | 14 | |
15 | 15 | -- Timestamp of the sign-off |
16 | | - cs_timestamp binary(14) not null default '' |
| 16 | + cs_timestamp binary(14) not null default '', |
| 17 | + |
| 18 | + -- Timestamp the sign-off was struck, or Block::infinity() if not struck |
| 19 | + cs_timestamp_struck varbinary(14) not null default 'infinity' |
17 | 20 | ) /*$wgDBTableOptions*/; |
18 | | -CREATE UNIQUE INDEX /*i*/cs_repo_rev_user_flag ON /*_*/code_signoffs (cs_repo_id, cs_rev_id, cs_user_text, cs_flag); |
| 21 | +CREATE UNIQUE INDEX /*i*/cs_repo_rev_user_flag_tstruck ON /*_*/code_signoffs (cs_repo_id, cs_rev_id, cs_user_text, cs_flag, cs_timestamp_struck); |
19 | 22 | CREATE INDEX /*i*/cs_repo_repo_rev_timestamp ON /*_*/code_signoffs (cs_repo_id, cs_rev_id, cs_timestamp); |
Index: branches/REL1_17/extensions/CodeReview/backend/CodeRevision.php |
— | — | @@ -445,7 +445,7 @@ |
446 | 446 | // Give email notices to committer and commenters |
447 | 447 | global $wgCodeReviewENotif, $wgEnableEmail, $wgCodeReviewCommentWatcherEmail, |
448 | 448 | $wgCodeReviewCommentWatcherName, $wgUser; |
449 | | - if ( !$wgCodeReviewENotif && !$wgEnableEmail ) { |
| 449 | + if ( !$wgCodeReviewENotif || !$wgEnableEmail ) { |
450 | 450 | return; |
451 | 451 | } |
452 | 452 | |
Index: branches/REL1_17/extensions/CodeReview/backend/CodePropChange.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | } |
12 | 12 | |
13 | 13 | static function newFromData( $rev, $data ) { |
14 | | - $change = new CodeComment( $rev ); |
| 14 | + $change = new CodePropChange( $rev ); |
15 | 15 | $change->attrib = $data['cpc_attrib']; |
16 | 16 | $change->removed = $data['cpc_removed']; |
17 | 17 | $change->added = $data['cpc_added']; |
Index: branches/REL1_17/extensions/CodeReview/ui/CodeRevisionCommitter.php |
— | — | @@ -104,7 +104,7 @@ |
105 | 105 | if ( count( $removeReferences ) && $this->validPost( 'codereview-associate' ) ) { |
106 | 106 | $this->mRev->removeReferencesFrom( $removeReferences ); |
107 | 107 | } |
108 | | - |
| 108 | + |
109 | 109 | // Add any comments |
110 | 110 | $commentAdded = false; |
111 | 111 | $commentId = 0; |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | // $isPreview = $wgRequest->getCheck( 'wpPreview' ); |
114 | 114 | $commentId = $this->mRev->saveComment( $commentText, $review, $parent ); |
115 | 115 | |
116 | | - $commentAdded = ($commentId !== 0); |
| 116 | + $commentAdded = ($commentId !== 0); |
117 | 117 | } |
118 | 118 | $dbw->commit(); |
119 | 119 | |
— | — | @@ -133,8 +133,8 @@ |
134 | 134 | $wgUser->getName(), $url, $this->mRev->getIdStringUnique(), $this->text |
135 | 135 | ); |
136 | 136 | } |
137 | | - } |
| 137 | + } |
138 | 138 | |
139 | | - return $commentId; |
| 139 | + return $commentId; |
140 | 140 | } |
141 | 141 | } |
Index: branches/REL1_17/extensions/OAI/OAIRepo_body.php |
— | — | @@ -877,7 +877,7 @@ |
878 | 878 | array( 'img_name' => $this->_row->page_title ), |
879 | 879 | $fname ); |
880 | 880 | if( $imageRow ) { |
881 | | - $url = Image::imageUrl( $imageRow->img_name ); |
| 881 | + $url = wfFindFile( $imageRow->img_name )->getUrl(); |
882 | 882 | |
883 | 883 | if( $url{0} == '/' ) { |
884 | 884 | global $wgServer; |
Index: branches/REL1_17/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -427,6 +427,7 @@ |
428 | 428 | 'cl_from' ); |
429 | 429 | $where = array(); |
430 | 430 | $joins = array(); |
| 431 | + $options = array( 'ORDER BY' => 'cl_type, cl_sortkey', 'LIMIT' => $wgCategoryTreeMaxChildren ); |
431 | 432 | |
432 | 433 | if ( $inverse ) { |
433 | 434 | $joins['categorylinks'] = array( 'RIGHT JOIN', 'cl_to = page_title AND page_namespace = ' . NS_CATEGORY ); |
— | — | @@ -434,6 +435,7 @@ |
435 | 436 | } else { |
436 | 437 | $joins['categorylinks'] = array( 'JOIN', 'cl_from = page_id' ); |
437 | 438 | $where['cl_to'] = $title->getDBkey(); |
| 439 | + $options['USE INDEX']['categorylinks'] = 'cl_sortkey'; |
438 | 440 | |
439 | 441 | # namespace filter. |
440 | 442 | if ( $namespaces ) { |
— | — | @@ -457,9 +459,7 @@ |
458 | 460 | $joins['category'] = array( 'LEFT JOIN', 'cat_title = page_title AND page_namespace = ' . NS_CATEGORY ); |
459 | 461 | } |
460 | 462 | |
461 | | - $res = $dbr->select( $tables, $fields, $where, __METHOD__, |
462 | | - array( 'ORDER BY' => 'cl_type, cl_sortkey', 'LIMIT' => $wgCategoryTreeMaxChildren ), |
463 | | - $joins ); |
| 463 | + $res = $dbr->select( $tables, $fields, $where, __METHOD__, $options, $joins ); |
464 | 464 | |
465 | 465 | # collect categories separately from other pages |
466 | 466 | $categories = ''; |
Property changes on: branches/REL1_17/extensions/CategoryTree/CategoryTreeFunctions.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
467 | 467 | Merged /trunk/extensions/CategoryTree/CategoryTreeFunctions.php:r80634 |
Index: branches/REL1_17/extensions/CentralAuth/SpecialWikiSets.php |
— | — | @@ -166,7 +166,8 @@ |
167 | 167 | sort( $list ); |
168 | 168 | $html = '<ul>'; |
169 | 169 | foreach ( $list as $wiki ) { |
170 | | - $html .= "<li>{$wiki}</li>"; |
| 170 | + $escWiki = htmlspecialchars( $wiki ); |
| 171 | + $html .= "<li>{$escWiki}</li>"; |
171 | 172 | } |
172 | 173 | $html .= '</ul>'; |
173 | 174 | return $html; |
Index: branches/REL1_17/phase3/includes/ImportXMLReader.php |
— | — | @@ -548,7 +548,7 @@ |
549 | 549 | $tag = $this->reader->name; |
550 | 550 | |
551 | 551 | if ( !wfRunHooks( 'ImportHandleUploadXMLTag', $this->reader, |
552 | | - $pageInfo, $revisionInfo ) ) { |
| 552 | + $pageInfo ) ) { |
553 | 553 | // Do nothing |
554 | 554 | } elseif ( in_array( $tag, $normalFields ) ) { |
555 | 555 | $uploadInfo[$tag] = $this->nodeContents(); |
Property changes on: branches/REL1_17/phase3/includes/ImportXMLReader.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
556 | 556 | Merged /trunk/phase3/includes/ImportXMLReader.php:r80507 |
Index: branches/REL1_17/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -666,7 +666,7 @@ |
667 | 667 | array( 'oldid' => intval( $row->rev_id ) ) |
668 | 668 | ); |
669 | 669 | } else { |
670 | | - $d = $date; |
| 670 | + $d = htmlspecialchars( $date ); |
671 | 671 | } |
672 | 672 | if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
673 | 673 | $d = '<span class="history-deleted">' . $d . '</span>'; |
Index: branches/REL1_17/phase3/languages/LanguageConverter.php |
— | — | @@ -308,14 +308,23 @@ |
309 | 309 | * @return String like ' alt="yyyy"' or ' title="yyyy"' |
310 | 310 | */ |
311 | 311 | protected function captionConvert( $matches ) { |
| 312 | + // TODO: cache the preferred variant in every autoConvert() process, |
| 313 | + // this helps improve performance in a way. |
312 | 314 | $toVariant = $this->getPreferredVariant(); |
313 | 315 | $title = $matches[1]; |
314 | | - $text = $matches[2]; |
| 316 | + $text = $matches[2]; |
| 317 | + |
315 | 318 | // we convert captions except URL |
316 | 319 | if ( !strpos( $text, '://' ) ) { |
317 | 320 | $text = $this->translate( $text, $toVariant ); |
318 | 321 | } |
319 | | - return " $title=\"$text\""; |
| 322 | + |
| 323 | + // remove HTML tags to prevent disrupting the layout |
| 324 | + $text = preg_replace( '/<[^>]+>/', '', $text ); |
| 325 | + // escape HTML special chars to prevent disrupting the layout |
| 326 | + $text = htmlspecialchars( $text ); |
| 327 | + |
| 328 | + return " {$title}=\"{$text}\""; |
320 | 329 | } |
321 | 330 | |
322 | 331 | /** |
Property changes on: branches/REL1_17/phase3/languages/LanguageConverter.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
323 | 332 | Merged /trunk/phase3/languages/LanguageConverter.php:r80978 |