r65351 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65350‎ | r65351 | r65352 >
Date:23:06, 20 April 2010
Author:siebrand
Status:ok
Tags:
Comment:
(bug 22647) Add category details in search results. Contributed by Lejonel.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -818,6 +818,7 @@
819819 'searchprofile-everything-tooltip',
820820 'searchprofile-advanced-tooltip',
821821 'search-result-size',
 822+ 'search-result-category-size',
822823 'search-result-score',
823824 'search-redirect',
824825 'search-section',
Index: trunk/phase3/CREDITS
@@ -89,9 +89,10 @@
9090 * Karun Dambietz
9191 * Kim Hyun-Joon
9292 * Lee Worden
 93+* Lejonel
9394 * liangent
 95+* Louperivois
9496 * Lucas Garczewski
95 -* Louperivois
9697 * Luigi Corsaro
9798 * Manuel Menal
9899 * Marcin Cieślak
Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -539,6 +539,18 @@
540540 $this->sk->formatSize( $byteSize ),
541541 $wgLang->formatNum( $wordCount )
542542 );
 543+
 544+ if( $t->getNamespace() == NS_CATEGORY ) {
 545+ $cat = Category::newFromTitle( $t );
 546+ $size = wfMsgExt(
 547+ 'search-result-category-size',
 548+ array( 'parsemag', 'escape' ),
 549+ $wgLang->formatNum( $cat->getPageCount() ),
 550+ $wgLang->formatNum( $cat->getSubcatCount() ),
 551+ $wgLang->formatNum( $cat->getFileCount() )
 552+ );
 553+ }
 554+
543555 $date = $wgLang->timeanddate( $timestamp );
544556
545557 // link to related articles if supported
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1625,6 +1625,7 @@
16261626 'searchprofile-everything-tooltip' => 'Search all of content (including talk pages)',
16271627 'searchprofile-advanced-tooltip' => 'Search in custom namespaces',
16281628 'search-result-size' => '$1 ({{PLURAL:$2|1 word|$2 words}})',
 1629+'search-result-category-size' => '{{PLURAL:$1|1 member|$1 members}} ({{PLURAL:$2|1 subcategory|$2 subcategories}}, {{PLURAL:$3|1 file|$3 files}})',
16291630 'search-result-score' => 'Relevance: $1%',
16301631 'search-redirect' => '(redirect $1)',
16311632 'search-section' => '(section $1)',
Index: trunk/phase3/RELEASE-NOTES
@@ -51,6 +51,7 @@
5252 * (bug 23206) Add Special::Search hook for detecting successful "Go"
5353 * When visiting a "red link" of a deleted file, a deletion and move log excerpt
5454 is provided on the Upload form.
 55+* (bug 22647) Add category details in search results.
5556
5657 === Bug fixes in 1.17 ===
5758 * (bug 17560) Half-broken deletion moved image files to deletion archive

Follow-up revisions

RevisionCommit summaryAuthorDate
r65357Follow-up r65351: Add a missing comma in messageraymond06:40, 21 April 2010

Status & tagging log