Commit graph

17 commits

Author SHA1 Message Date
Alexandre Emsenhuber
d1f8640a3b Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: Ia45d0756cd84138da267bf1cbd1a58be7f28c6d1
2012-05-11 10:34:29 +02:00
Happy-melon
2c9cfd7cce Refactor the factory/i18n/list/etc static methods from SpecialPage into their own class; there's no reason we need to be parsing them in every single SpecialPage subclass. Leave all the methods as stubs in SpecialPage.php; if we required PHP 5.3 they could be replaced by a a __callStatic() magic method, but that doesn't work on PHP 5.2.
Also make a few changes to the functions available.  SpecialPageFactory::resolveAlias() now takes an optional subpage and returns array(<name>,<subpage>).  Similarly merge getPage() and getPageByAlias().  There were many examples of (extensions particularly) making dubious assumptions about the presence or absence of subpages or canonical-ness.

I didn't deprecate SpecialPage::getTitleFor() as it's got over six hundred calls.  I'm rather undecided on the best position of getPage()/executePath().  Although the latter needs cleanup anyway.
2011-04-17 11:31:11 +00:00
Jack Phoenix
3b5750adb4 coding style tweaks, doc updates, marked some public functions as such 2011-03-22 20:23:52 +00:00
Roan Kattouw
ec3c2f8f84 Revert r67661 (change Title::makeTitle(NS_SPECIAL, $foo) to SpecialPage::getTitleFor($foo)), caused bug 27671 (search suggestions no longer list canonical names for special pages). Went with makeTitleSafe() instead of makeTitle() just in case weird things make their way into the special page aliases. 2011-03-14 10:03:07 +00:00
Brion Vibber
03fa2561b6 * (bug 25675) Fix search suggestions for Special: pages with spaces
Patch by Umherirrender on https://bugzilla.wikimedia.org/show_bug.cgi?id=25675 - normalizes spaces to underscores for our direct alias list comparison.

The current English names mostly use CamelCase, but this is visible with eg German localization, where ExpandTemplates extension has [[Spezial:Vorlagen expandieren]].
2011-02-14 00:32:13 +00:00
Antoine Musso
c5906068fa Lame documentation, code style 2010-10-27 21:11:36 +00:00
Niklas Laxström
4492854f61 Suppress warnings 2010-06-25 14:21:07 +00:00
Siebrand Mazeland
042585fb9d Replace Title::makeTitle[Safe]( NS_SPECIAL, 'x' ) with SpecialPage::getTitleFor ( 'x' )
And a few other minor changes.
2010-06-08 19:36:44 +00:00
Alexandre Emsenhuber
52ccd25ed2 * Fixed some doxygen warnings
* Removed trailing spaces
2010-01-20 21:06:22 +00:00
Alexandre Emsenhuber
0b8c5ca6b9 * (bug 20885) Search box no longer suggests unavailable special pages 2009-10-02 09:44:34 +00:00
Niklas Laxström
36dbe35374 * STFU E_WARN, please review for correcteness 2009-02-05 19:55:57 +00:00
Ilmari Karonen
34fb6297cd Step 2 in NS_IMAGE -> NS_FILE transition (bug 44) (WARNING: huge commit).
This is a global search and replace of NS_IMAGE and NS_IMAGE_TALK with NS_FILE and NS_FILE_TALK respectively in all core files, excluding those already updated in step 1 (r44004).
2008-12-01 17:14:30 +00:00
Chad Horohoe
8b26c3550b Basic docs for the class. 2008-08-07 23:09:11 +00:00
Chad Horohoe
aaf794947a Remove a bit of useless $wgCapitalLinks logic, all these code paths lead through Title::secureAndSpit() which handles initial-character-capitalization.
*In SearchEngine's case, it gets caught every time further up the page (it never even reaches the upper/lower casing of only first character part)
*PrefixSearch eventually sends it through ApiQueryBase::titleToKey()
*AjaxFunctions immediately sends it to Title::newFromText()
2008-07-25 23:12:27 +00:00
Robert Stojnić
d6fd8e7c13 Ajax suggestions:
* check in a new ajax suggestion engine (mwsuggest.js) which uses 
  OpenSearch to fetch results (by default via API), this should
  deprecated the old ajaxsearch thingy
* extend PrefixSearchBackend hook to accept multiple namespaces for
  future lucene use (default implementation however can still 
  process only one)
* Added to preferences, also a feature to turn it on/off for every 
  input (disabled atm until I work out browser issues completely)
* WMF wikis probably won't be using API to fetch results, but a 
  custom php wrapper that just forwards the request to appropriate
  lucene daemon, added support for that

SpecialSearch:
* moved stuff out of SpecialSearch to SearchEngine, like snippet
  highlighting and such
* support for additional interwiki results, e.g. title matches
  from other projects shown in a separate box on the right
* todo: interwiki box doesn't have standard prev/next links to 
  avoid clutter and unintuitive interface
* support for related articles
2008-04-15 23:06:28 +00:00
Siebrand Mazeland
79d5225c0e * remove end of line whitespace
* remove empty lines at end of file
* remove "?>" where still present
2008-04-14 07:45:50 +00:00
Brion Vibber
7a3227596e * Merged backends for OpenSearch suggestions and AJAX search.
Both now accept namespace prefixes, handle 'Media:' and 'Special:' pages,
  and reject interwiki prefixes. PrefixSearch class centralizes this code,
  and the backend part can be overridden by the PrefixSearchBackend hook.
2008-01-30 01:07:49 +00:00