r47776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47775‎ | r47776 | r47777 >
Date:00:49, 25 February 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
(bug 16343) Non-exiting, but in use, category pages can be "go" match hits
Modified paths:
  • /trunk/phase3/includes/SearchEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SearchEngine.php
@@ -80,10 +80,15 @@
8181 if (is_null($title))
8282 return NULL;
8383
84 - if ( $title->getNamespace() == NS_SPECIAL || $title->isExternal()
85 - || $title->exists() ) {
 84+ if ( $title->getNamespace() == NS_SPECIAL || $title->isExternal() || $title->exists() ) {
8685 return $title;
8786 }
 87+
 88+ # See if it still otherwise has content is some sane sense
 89+ $article = MediaWiki::articleFromTitle( $title );
 90+ if( $article->hasViewableContent() ) {
 91+ return $title;
 92+ }
8893
8994 # Now try all lower case (i.e. first letter capitalized)
9095 #

Follow-up revisions

RevisionCommit summaryAuthorDate
r48807release note lines for r47771, r47773, r47776brion11:47, 25 March 2009

Comments

#Comment by Aaron Schulz (talk | contribs)   00:51, 25 February 2009
  • existing :)

Status & tagging log