aboutsummaryrefslogtreecommitdiffstats
path: root/includes/SpecialPage.php
Commit message (Collapse)AuthorAgeFilesLines
...
* More unpicking of r85288. I think this is all of the magic method calls, ↵Happy-melon2011-06-031-2/+2
| | | | | | | but they're very hard to grep for (part of the problem with them!), so let's leave the calls in with a wfDeprecated() for a while... Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89408
* Start unpicking r85288 (magic __get() accessor for RequestContext). ↵Happy-melon2011-06-031-2/+2
| | | | | | | Instead, bring back some of r86872 (abstract base class for classes providing access to RequestContext methods), which is a more 'classical' solution. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89406
* Misc EOL w/s and spaces-instead-of-tabs fixes. One day I'll get around to ↵Mark A. Hershberger2011-05-251-5/+5
| | | | | | | nagging people for this stuff, but for now, I'll JFDI myself. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88797
* Use consistent notation for "@todo FIXME". Should update ↵Siebrand Mazeland2011-05-171-2/+2
| | | | | | | http://svn.wikimedia.org/doc/todo.html nicely. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88355
* Make @deprecated documentation more consistent (see: ↵Siebrand Mazeland2011-05-171-1/+1
| | | | | | | http://svn.wikimedia.org/doc/deprecated.html). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88290
* Revert r86872: Breaks LiquidThreads page moves with the below failure. ↵Siebrand Mazeland2011-04-251-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Threads are lost and nowhere to be found any more. [25-Apr-2011 18:12:45] /wiki/Special:MoveThread/Thread:User_talk:Siebrand/test/One_new_message: Exception: MWNamespace::getTalk does not make any sense for given namespace -1 #0 /www/w/includes/Namespace.php(81): MWNamespace::isMethodValidFor(-1, 'MWNamespace::ge...') #1 /www/w/includes/WatchedItem.php(73): MWNamespace::getTalk(-1) #2 /www/w/includes/User.php(2304): WatchedItem->addWatch() #3 /www/w/includes/actions/WatchAction.php(53): User->addWatch(Object(Title)) #4 /www/w/includes/Action.php(376): WatchAction->onView() #5 /www/w/extensions/LiquidThreads/classes/Thread.php(115): FormlessAction->execute() #6 /www/w/extensions/LiquidThreads/classes/Thread.php(435): Thread::create(Object(Article), Object(Article), NULL, 1, 'One new message') #7 /www/w/extensions/LiquidThreads/classes/Thread.php(414): Thread->leaveTrace('move test', Object(Title), Object(Title)) #8 /www/w/extensions/LiquidThreads/pages/SpecialMoveThread.php(107): Thread->moveToPage(Object(Title), 'move test', true) #9 [internal function]: SpecialMoveThread->trySubmit(Array) #10 /www/w/includes/HTMLForm.php(279): call_user_func(Array, Array) #11 /www/w/includes/HTMLForm.php(228): HTMLForm->trySubmit() #12 /www/w/includes/HTMLForm.php(242): HTMLForm->tryAuthorizedSubmit() #13 /www/w/extensions/LiquidThreads/pages/ThreadActionPage.php(37): HTMLForm->show() #14 /www/w/includes/SpecialPageFactory.php(459): ThreadActionPage->execute('Thread:User_tal...') #15 /www/w/includes/Wiki.php(252): SpecialPageFactory::executePath(Object(Title), Object(RequestContext)) #16 /www/w/includes/Wiki.php(98): MediaWiki->handleSpecialCases() #17 /www/w/index.php(145): MediaWiki->performRequestForTitle(NULL) #18 {main} Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86875
* Implement an interface and abstract class to hold the widely-reused ↵Happy-melon2011-04-251-53/+3
| | | | | | | get(Request|User|Title|Lang|Skin|Output) accessors for objects acting as a context source. Article is rather messier because both getTitle() and getUser() are in use for other things, and Article::$mTitle is in extremely wide use both within Article.php and outside. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86872
* (bug 13015, bug 18347, bug 18996, bug 20473, bug 23669, bug 28244) separate ↵Happy-melon2011-04-201-0/+132
| | | | | | | | | | | | | | the password-reset request dialogue from SpecialUserlogin. * Refactor with all the latest bells and whistles * Allow wikis to enable resettting by entering an email address (bug 13015). This is currently an unindexed query, but it is disabled by default so no immediate problem. * Allow resetting to be disabled entirely (bug 20473). * Don't send registered users' IP addresses in the emails (bug 18347) * Check that a user is not globally blocked before letting them send messages (bug 23669) * Display a more useful error message when an account exists globally but not locally (bug 18996). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86482
* Quick comments for r79036Aaron Schulz2011-04-191-0/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86443
* Follow-up r86255: don't special-case redirecting special pages in ↵Happy-melon2011-04-191-25/+50
| | | | | | | executePath(), make them subclass a RedirectSpecialPage and have their execute() method do the redirection. Fixes fatal errors seen on TWN where executePath() was trying to call SpecialMyPage::execute(), which bubbled up to SpecialPage::execute() and made a horrible mess. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86407
* Cleanup in SpecialPage.php:Happy-melon2011-04-181-102/+148
| | | | | | | | | | | | | * Enforce private access for member variables suggested since at least 1.4. Didn't do $mName because grepping for "->mName" gave far too many results to check. * Move the stuff related to redirects (getRedirect(), getRedirectQuery(), $mAllowedRedirectParams and $mAddedRedirectParams) to SpecialRedirectToSpecial and adjust callers * Document stuff * Mark getFile() as deprecated * Group together getListed(), setListed() and listed() to draw attention to the fact that all three have been there since 1.6 and that we need to pick one and deprecate the other(s) * add isIncludable() getter * mark as deprecated and evil the mutators added in 1.6 for things which *really* shouldn't be mutating anywhere. AFAICT they're not actually used many places. Didn't deprecate including() as it's in wide use and it's legitimately set in SpecialPageFactory::executePath(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86347
* Warn that SpecialPage::execute() will be made abstract at some point in the ↵Happy-melon2011-04-181-1/+1
| | | | | | | future, which is the endpoint of getting rid of the define-special-pages-by-global-functions structure. Committing this separate to the other changes because it should be backported to 1.17. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86346
* Follow-up r86255: getTitleFor() was not migrated.Happy-melon2011-04-181-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86339
* Revert avars deprecation in r11308Sam Reed2011-04-181-11/+1
| | | | | | | Swap a couple of name() to getName() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86336
* Follow-up r86255: rm duplicated config listHappy-melon2011-04-171-122/+0
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86282
* Refactor the factory/i18n/list/etc static methods from SpecialPage into ↵Happy-melon2011-04-171-315/+54
| | | | | | | | | | | 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. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86255
* Merge r81448 from REL1_17: reverting RevisionMove feature back out until ↵Chad Horohoe2011-04-151-1/+0
| | | | | | | somebody has the time to work on it again. Reverts r67094 and its followups in trunk: r67099, r67111, r67112, r67115, r67398, r81425, r81427 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86155
* Revert r77555 and followups r77563, r77572, r78116 (merge DisableAccount to ↵Chad Horohoe2011-04-151-1/+0
| | | | | | | | | | | core). Per CR at the time: this creates a nearly irreversable action that is not nearly well documented enough (even if disabled by default). We already have the $wgBlockDisablesLogin kludge in place for this. If we're going to do more work on this idea, it should be well thought out, not another hack. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86146
* Changes to SpecialPage: deprecate any syntax for defining pages other than ↵Happy-melon2011-04-141-14/+38
| | | | | | | $wgSpecialPage['PageName'] = 'ClassName', including SpecialRedirectToSpecial, which is ugly and nasty anyway. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86053
* Recommit r84805, but without removing UsersPager, which is actually a Good ↵Happy-melon2011-04-141-1/+1
| | | | | | | Thing to use for this class of queries. Yay for the end of global-function-based special pages in core. About fifteen left in extensions now... Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/86048
* Revert r84805: broke CentralAuth by removing base UsersPager class used in ↵Brion Vibber2011-04-121-1/+1
| | | | | | | other special pages Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85889
* Instead of creating an OutputPage and then setting a context start ↵Daniel Friesen2011-04-041-8/+0
| | | | | | | | | initializing OutputPages 'with' a context and send depreciated calls to extensions directly creating OutputPage instances. Now that we've taken care of the mess of mTitle inside OutputPage and Skin and made RequestContext track Skin instead of $wgUser we don't need the hack in SpecialPage anymore. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85302
* Clean out some globals from SpecialPage.phpHappy-melon2011-04-031-15/+13
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85293
* Follow-up r85278, r85240:Happy-melon2011-04-031-5/+6
| | | | | | | | | * Internalise $title in MediaWiki base class * Fix access fatal in SpecialPage by getting the context from the MediaWiki base class rather than the OutputPage * Fix a couple of typos in RequestContext which would have thrown errors/fatals if anyone had ever called them. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85285
* Implement the RequestContext class. Some credit to IAlex, ;) other credit ↵Daniel Friesen2011-04-031-41/+43
| | | | | | | | | for me and that plethora of bugs and hicoughs I had to deal with in impelenting it. http://www.mediawiki.org/wiki/Requests_for_comment/Context_object (it's little different though) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85240
* Follow-up r85226, r85227: add @since annotationsNiklas Laxström2011-04-031-0/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85234
* Followup r85227; Back out changes related to avoiding calls to OutputPage ↵Daniel Friesen2011-04-031-20/+4
| | | | | | | from includable special pages. After some re-examination we replace the OutputPage and OutputPage is coded in a way to avoid poluting global things with things like the use of header(); in set* calls, so setting things on OutputPage while in an includable special page just gets discarded. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85231
* Followup r85227. Convert all IncludableSpecialPages to use context properly ↵Daniel Friesen2011-04-031-8/+29
| | | | | | | (they are the worse offenders), and fix some bugs related to inculudable special pages and their context. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85229
* Start managing output and input context from special pages themselves ↵Daniel Friesen2011-04-031-0/+47
| | | | | | | instead of using globals. We already had a setContext, Special page implementations should be properly utalizing that data. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85227
* Start better utalizing OutputPage as the focal point for things related to ↵Daniel Friesen2011-04-031-1/+2
| | | | | | | the output of the page. Like getTitle use $out->get{User,Skin} instead of $wgUser and $wgUser->getSkin() for things where the user or skin is being used for output generation back to $out instead of using globals with bad structure. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/85226
* Topple the last bastion of global-function-based special pages. Also fix ↵Happy-melon2011-03-261-1/+1
| | | | | | | HTMLCheckField to work with GET forms. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/84814
* Update SpecialListfiles to subclass SpecialPage. Nearly there!Happy-melon2011-03-261-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/84807
* Convert SpecialListusers to subclass SpecialPage. Only two left now! Happy-melon2011-03-261-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/84805
* Break svn blame on every single line of SpecialWatchlist.php by converting ↵Happy-melon2011-03-261-1/+1
| | | | | | | | | it to subclass SpecialPage and hence changing the indentation :D. SpecialInterwikiWatchlist.php is virtually a clone of this code, so make it subclass in turn and remove duplication; there is probably more that could be removed. Only three more global-function special page implementations left. \o/ Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/84796
* Move WatchlistEditor.php to /specials since inside it is essentially a ↵Happy-melon2011-03-241-0/+1
| | | | | | | complete special page. Make it subclass SpecialPage and do all the usual stuff. Rewrite it to use HTMLForm and other exciting things, and give it a good general clean up. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/84718
* Complete the trinity of blocking frontend interfaces by rewriting ↵Happy-melon2011-03-141-1/+1
| | | | | | | | | | | | | SpecialIpblocklist: * Move and rename to SpecialBlockList * Use an HTMLForm in GET mode for the options form * Use TablePager to organise the results more nicely * Standardise the filtration for IPs and IP ranges, so looking at blocks for a range will now also show rangeblocks which contain the range * General tidy up Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/83909
* Further massive rewrite of the blocking frontend: spin out unblocking into a ↵Happy-melon2011-03-131-1/+1
| | | | | | | new SpecialUnblock.php. This leaves IPBlockList as, astonishingly enough, a list of blocks... :D Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/83855
* Divert a river through the Augean Stables that is SpecialBlockip.php.Happy-melon2011-03-121-1/+1
| | | | | | | | | | | | * Move to SpecialBlock.php, and rename class appropriately * Complete refactor * Use HTMLForm in block form. This changes most of the ids and field names on the form, but allows proper validation, nicer formatting, clears up several fixmes, and is generally Better(TM). * Spin various parts out into static functions, several of which properly belong in the backend (but Block.php is a worse mess still) * Invert some of the block options so that every checkbox makes the block more severe (so "check to disable email" is fine, but "check to allow usertalk edit" (default true) is inverted to "check to disable usertalk edit" (default false). * revert r40359 (move doMassUserBlock() to core). No one seems to be using this function, which has nothing to do with the frontend UI in SpecialBlock (it might perhaps belong in Block.php); it is pretty bespoke for CheckUser, doesn't seem to have very much utility elsewhere. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/83786
* (bug 14645) Show expensive special pages differently in miser mode on ↵Ilmari Karonen2011-03-091-0/+12
| | | | | | | Special:SpecialPages. Patch by Jarry1250 with a few tweaks by me. Tested, saw no errors or warnings. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/83554
* w/s fixupsMark A. Hershberger2011-02-121-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/82008
* Add a context to SpecialPage, so that subclasses don't need globals anymore. ↵Bryan Tong Minh2011-02-101-0/+40
| | | | | | | Introduces $mRequest, $mOutput and $mFullTitle, which can be used instead of $wgRequest, $wgOut and $wgTitle. Introduces msg(), which is a wrapper around wfMessage()->title(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/81895
* Small fixesKrinkle2011-01-251-1/+1
| | | | | | | | * Missing space in SpecialPage.php * Raising z-index of .suggestions (when used in a jQuery UI modal box the suggestion list appeared behind the modal instead of on top (ui modal has z-index: 1000; ) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80981
* Implement Message::isBlank and Message::isDisabled.Daniel Friesen2011-01-141-5/+5
| | | | | | | And while we're at it... update a random assortment of code using wfEmptyMsg to use the new wfMessage class and our exists/isBlank/isDisabled methods. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80248
* rm stray tabNiklas Laxström2011-01-111-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80004
* Followup r68129: rename UndeleteForm to SpecialUndelete per CR. Not used in ↵Chad Horohoe2011-01-051-1/+1
| | | | | | | any extensions Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79643
* Move wfCreateObject to MWFunction::newObj. This uses the ReflectionClass toX!2011-01-031-1/+1
| | | | | | | | | instantiate a variable-length constructor in php 5.1.3 and up, and falls back to the old, ugly, manual method that was in the old wfCreateObject function. The instances in the core have been replaced. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79504
* Follow-up r79036: update comment.Happy-melon2010-12-271-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79037
* (bug 268) add Special:PermanentLink/### as an internally-linkable redirect ↵Happy-melon2010-12-271-10/+38
| | | | | | | | | to index.php?oldid=###. Also refactor SpecialPage::getRedirectQuery() to return an associative array to pass to wfArrayToCGI(), rather than bodging the query string together internally. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/79036
* Follow-up r78786: for consistency, removed array() when there's only one itemAlexandre Emsenhuber2010-12-221-31/+31
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/78793
* Merge querypage-work2 branch from trunk. The most relevant changes are:Roan Kattouw2010-12-221-33/+33
| | | | | | | | | | | | | * QueryPage now uses array-based query building instead of raw SQL * Converted all QueryPage-based special pages that were using old-style wfSpecialFoo functions to new-style SpecialPage subclasses; this is possible because QueryPage is changed to extend SpecialPage * Backward compatibility for extensions is partly preserved: getSQL() is fallen back on for QueryPage subclasses that don't implement getQueryInfo(), but getOrder() will be ignored (implement getOrderFields() instead). This also means that dual compatibility (1.18 compat and b/c with pre-1.18) is trivial Extension changes will be merged after this commit. These changes make it easier to write an API module for QueryPages (bug 14869); this wasn't done in the branch but will be done in trunk soon. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/78786