Last modified: 2010-07-09 11:08:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T24339, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22339 - "Go" result should be available through the API
"Go" result should be available through the API
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.16.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-01 15:13 UTC by Roan Kattouw
Modified: 2010-07-09 11:08 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch as part of list=search (2.98 KB, patch)
2010-07-09 10:24 UTC, Bryan Tong Minh
Details

Description Roan Kattouw 2010-02-01 15:13:43 UTC
There should be a way in the API to tell which page you'll be redirected to when you type a certain string in the search box and click "Go". It's possible to get this by requesting http://en.wikipedia.org/w/index.php?title=Special%3ASearch&search=something&go=Go and getting the target of the resulting HTTP 302, but this'll return an HTTP 200 with search results when there is no title match for 'something' and this is hacky. The API should have some way of requesting this so it'll be cleaner and not run a full-blown search with the associated bandwidth usage if there is no title match.
Comment 1 Gurch 2010-03-31 14:10:57 UTC
Done in r64436.
Comment 2 Sam Reed (reedy) 2010-07-09 09:51:08 UTC
r69202
Comment 3 Bryan Tong Minh 2010-07-09 10:24:40 UTC
Created attachment 7559 [details]
Patch as part of list=search

I needed to change the constructor of SearchResult to get this working. Any objections to this?
Comment 4 Max Semenik 2010-07-09 10:39:23 UTC
(In reply to comment #3)
> I needed to change the constructor of SearchResult to get this working. Any
> objections to this?

You could probably make a static function newFromTitle(), instead of comparing types in constructor.
Comment 5 Bryan Tong Minh 2010-07-09 11:08:36 UTC
r69203

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links