aboutsummaryrefslogtreecommitdiffstats
path: root/includes/SpecialPage.php
Commit message (Collapse)AuthorAgeFilesLines
...
* | (bug 35060) more allowed params to Special:MyPage, Special:MyTalkDerrick Coetzee2012-07-191-8/+92
|/ | | | | | | | | | | | | | | | | | | I investigated the available parameters and considered which could be plausibly useful for Special:MyPage and Special:MyTalk, and there are quite a few. See inline documentation for a list of them. More could potentially be added in the future if a use case is discovered. This patch also make it possible for extensions to add their own parameters to this list, through the new hook: RedirectSpecialArticleRedirectParams It has at least one application - with FlaggedRevs, it's desirable to pass the "stable" flag through Special:MyPage. It also makes it simple for individual servers that have some special reason to pass on a particular parameter to do so in LocalSettings.php, simplifying upgrades. Change-Id: I3101fbe2eba8712b87a53706583f4e8f3e907478
* Added SpecialPageAfterExecute and SpecialPageBeforeExecute hooksjeroendedauw2012-07-061-0/+20
| | | | | | Danwe apparently needs them :) Change-Id: Ic74c7ba7f4168d2b0cfbd3c4e551218f6cb2693a
* Change entry point of SpecialPagejeroendedauw2012-07-051-3/+38
| | | | | | | | The old entry point is the execute method, which clearly is not meant to be an entry point, as it's overloaded in most subclasses, making it impossible for the deriving classes to do anything before or after (which for instance sucks big time in SpecialCachedPage). Change-Id: I74c22a1dc3b1a9d062295d5fb709fb87577810ae
* Big oops - merged to wrong branch.awjrichards2012-06-051-1/+1
| | | | | Revert "Revert to arbitrarily old point before initial remote branch creation to help clean up" This reverts commit ee0d3d330f76b97c451c168dc9b052ee84609b5b
* Revert to arbitrarily old point before initial remote branch creation to ↵awjrichards2012-06-021-1/+1
| | | | | | help clean up Change-Id: I41a3d1e55d3ea9dffa42451237fe065f9334361d
* bug 37015: Allow disabling special page summaryAmir E. Aharoni2012-05-221-1/+1
| | | | | | | | | Replaced isBlank() with isDisabled() in SpecialPage::outputHeader. This allows disabling the default headers (*-summary). Patch set 2: Hid recentchangestext if nothing is written there. Change-Id: Id3ec2aeb1fab00344908b7bff01929bdafbfd08f
* Added missing GPLv2 headers in some places.Alexandre Emsenhuber2012-05-101-14/+13
| | | | | | Also made file/class documentation more consistent and removed a duplicate comment from SpecialPageFactory.php in SpecialPage.php. Change-Id: I99dd2de7fe461f2fad4e0bd315ebc2899958a90f
* setGroup doesn't return anything, so don't try and return its valueReedy2012-04-071-3/+2
| | | | | | Fix docs on getGroup Change-Id: Ia5f29013e01eee3b97dc755486175c21c5e24f4f
* Follow-up r113223: set the "interface" flag in Message to true by default ↵Alexandre Emsenhuber2012-03-131-2/+2
| | | | | | | | | and set it to false when the page is included. The point is to have the fix applied to all usages of IContextSource::msg() calls instead of only SpecialPage. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113745
* My proposed fix to bug 34987: gender not working in many special pages.Niklas Laxström2012-03-071-1/+9
| | | | | | | I haven't checked if there are other places whereh context is set to Message class, but if there are they might need a fix too. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/113223
* (bug 28019) Make Special:MyPage and Special:MyTalk carry preloadtitleBrian Wolff2012-03-041-2/+2
| | | | | | | | | | | url parameter to target page. Useful for inputbox extension. Patch by Bagariavivek. Perhaps should go through [[Manual:Parameters_to_index.php]] and add anything that's sane to the allowed list, at some point. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/112967
* Fix user related direct member variable accessSam Reed2012-02-161-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111605
* Fixing some of the "@return true" or "@return false", need to be "@return ↵Sam Reed2012-02-091-4/+4
| | | | | | | | | bool" and then the metadata can say true if foo, false if bar Other documentation improvements Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/111052
* Improve/add to documentationSam Reed2011-12-241-1/+1
| | | | | | | | | Add braces Explicitly define member variable Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/107235
* StylizeNiklas Laxström2011-12-161-25/+25
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106421
* Self revert r106080 which was a revert of r106070. Raimond Spekking2011-12-141-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106173
* Partly revert r106070 for now: Flooding of translatewiki.net log/channel: Raimond Spekking2011-12-131-1/+1
| | | | | | | PHP Notice: Use of SpecialPage::getPage was deprecated in MediaWiki 1.18. [Called from SFFormLinker::getFormEditLinkForPage in /www/w/extensions/SemanticForms/includes/SF_FormLinker.php at line 207] in /www/w/includes/GlobalFunctions.php on line 3520 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106080
* Followup r106070, r86347: copy some doc comments that apply to multiple ↵Brion Vibber2011-12-131-0/+32
| | | | | | | functions so doxygen will pick them up Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106079
* added missing deprecation noticesJeroen De Dauw2011-12-131-9/+26
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/106070
* Followup r103817, backing out ContextSource changes to SpecialPage and ActionJohn Du Hart2011-11-231-1/+87
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/104011
* Bug 29524 - Rename RequestContext::getLang to getLanguageJohn Du Hart2011-11-211-76/+1
| | | | | | | I'll be amazed if this doens't break any tests. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103817
* Moved read only check after permissions and block so that the user doesn't ↵Alexandre Emsenhuber2011-11-151-4/+4
| | | | | | | think the error is temporary in case he doesn't have the permission and the database is in read only mode Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103204
* Adding function for checking if the database is in readonly modeJohn Du Hart2011-11-151-5/+15
| | | | | | | Replacing some code in SpecialPageForm to use these new functions Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103111
* Added function to SpecialPage to simplify permissions checking in ↵John Du Hart2011-11-151-10/+18
| | | | | | | SpecialPage classes. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/103095
* * fixing Special:ListBots which behaved like Special:ListAdminsDanny B2011-11-051-3/+3
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/102104
* bug 32086 Special:Permanentlink require a parameterAntoine Musso2011-11-011-0/+4
| | | | | | | | | When Special:Permanentlink was not given any parameter it assumed oldid=0 and redirected to the Main_Page. This make it throw an error page instead. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/101478
* Followup to r86053 - fix special page casesNiklas Laxström2011-10-271-2/+2
| | | | | | | | | [27-Oct-2011 05:51:24] PHP Notice: Found alias defined for Listadmins when searching for special page aliases for ListAdmins. Case mismatch? [Called from SpecialPage::getLocalName in /www/sandwiki/includes/SpecialPage.php at line 464] in /www/sandwiki/includes/GlobalFunctions.php on line 3378 [27-Oct-2011 05:51:24] PHP Notice: Found alias defined for Listadmins when searching for special page aliases for ListAdmins. Case mismatch? [Called from SpecialPage::getTitleFor in /www/sandwiki/includes/SpecialPage.php at line 261] in /www/sandwiki/includes/GlobalFunctions.php on line 3378 [27-Oct-2011 05:51:24] PHP Notice: Found alias defined for Listusers when searching for special page aliases for ListUsers. Case mismatch? [Called from SpecialPage::getTitleFor in /www/sandwiki/includes/SpecialPage.php at line 261] in /www/sandwiki/includes/GlobalFunctions.php on line 3378 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100947
* Split out checkExecutePermissions() function from userCanExecute() in ↵Aaron Schulz2011-10-261-8/+6
| | | | | | | FormSpecialPage. The former handles actual execute() calls and throws exceptions, the later inherits its purpose from SpecialPage. It just checks the page restriction to see if a user generally *could* execute. This avoids the breakage that came up in r100723 where Special:SpecialPages was throwing permission errors due to the getUsablePages() call. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100795
* Added a User parameter to SpecialPageFactory::getUsablePages() so that it ↵Alexandre Emsenhuber2011-10-171-2/+4
| | | | | | | does not need to depend on $wgUser; updated the only call to it Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100032
* Use local context to get messagesAlexandre Emsenhuber2011-10-171-4/+4
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100029
* * (bug 31374) Pass relevant additional parameters for action=raw on ↵Brion Vibber2011-10-061-1/+3
| | | | | | | | | | | | | | | | | | Special:Mypage redirects Found that Special:MyPage was sometimes being used in importScript() calls to make references to the owner's other user subpages, such as loading a User:Blah/monobook.js from User:Blah/vector.js. The importScript() correctly included action=raw and ctype=text/javascript parameters, but Special:MyPage was redirecting to the actual URL and dropped the ctype parameter. IE 9 actually now validates content-type for scripts loaded into <script> -- if and only if you send X-Content-Type-Options: nosniff. Since we now do that (since bug 15461 / r87997) this created a break for IE9 users when upgrading from MW 1.17 (without the nosniff) to MW 1.18 (with it). Can also work around by replacing the Special:MyPage reference with a direct one. No other browsers I tested (Firefox 8, Chrome 14, Opera 11.5) rejected a <script> load for text/x-wiki but it's a legit thing to do (Firefox does check for CSS) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/99067
* * (bug 31289) Fix fatal error on special pages using $this->msg() on PHP 5.2Brion Vibber2011-10-011-1/+6
| | | | | | | | | | According to online PHP docs, func_get_args() doesn't work in function parameter lists until PHP 5.3.0. It does, however, work as the *first* parameter, which happens here and there in older code (eg array_slice(func_get_args(),1)). Assigning to a variable and passing through works fine for this case on PHP 5.2.17. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98598
* Follow-up r89568: use local context instead of $wgOutAlexandre Emsenhuber2011-09-291-2/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/98408
* Use IContextSource instead of RequestContext inside type hints and ↵Daniel Friesen2011-09-151-6/+6
| | | | | | | instanceof checks. All we need is something that implements IContextSource and it's possible we may want to implement types of RequestContext that don't directly extend RequestContext but are perfectly valid to be passed to classes. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/97159
* Per Reedy, follow-up r93758: SpecialPage::capturePath() now has incorrect ↵Alexandre Emsenhuber2011-08-161-13/+0
| | | | | | | signature. Removed the function rather than updating it, since it's not called at all and current behavior is incompatible with the old one. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/94619
* Followup r92430 per CR, like r94448Sam Reed2011-08-151-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/94548
* Fu r93249: I see no reason to mark this private - protected should be the ↵Niklas Laxström2011-07-281-1/+1
| | | | | | | default value, only use private if you have some reason to. Avoids most of the breakage in out of tree extensions. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93368
* Revert r93237 ("use User::getBlock() accessor rather than accessing $mBlock ↵Roan Kattouw2011-07-271-1/+2
| | | | | | | directly ..."): breaks a test (specifically TitlePermissionTest::testUserBlock()). From what I can tell it looks like the test case is expecting the text of the infinite-block message, but got a Message object instead Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93321
* makes SpecialPage::mName explicitly privateAntoine Musso2011-07-261-1/+1
| | | | | | | | | Only one occurence in Core : SpecialRandompage. Extensions are done in a following commit. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93249
* Follow-up r93234: use User::getBlock() accessor rather than accessing ↵Happy-melon2011-07-261-2/+1
| | | | | | | $mBlock directly. Also fixes r85951 CR, and remove code duplication in Title::checkUserBlock(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/93237
* Removed Special{$this->getName()}ModifyFormFields from r86482. Seems kind of ↵Aaron Schulz2011-07-221-3/+0
| | | | | | | weird, was undocumented, and is unused by extensions. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92898
* Update code comments that point to 1.18 to point to 1.19Sam Reed2011-07-181-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/92498
* * Fixed commentAlexandre Emsenhuber2011-07-071-5/+3
| | | | | | | * Wrap arround RequestContext::msg() instead of doing that all that stuff once more Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/91677
* Add SpecialPermanentLink to AutoloaderSam Reed2011-06-281-4/+2
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/90929
* * Fixed 'Fatal error: Class 'SpecialMyuploads' not found in ↵Aaron Schulz2011-06-271-18/+25
| | | | | | | | | | C:\wamp\www\MW_trunk\includes\SpecialPageFactory.php on line 318' * Made use of $this->getUser() with special pages rather than wgUser * Broke long lines Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/90905
* Comment shuffling, also fixing r86347 CR.Happy-melon2011-06-261-5/+35
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/90861
* And I forgot to commit this file in r89874Alexandre Emsenhuber2011-06-111-0/+10
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89875
* Recommit SpecialPage.php and SpecialPageFactory.php parts of r89406 (removal ↵Alexandre Emsenhuber2011-06-091-2/+2
| | | | | | | of magic __get() accessor for RequestContext) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89794
* Refactoring to r89566Sam Reed2011-06-061-0/+17
| | | | | | | Refactor out duplicate code to SpecialPage Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89568
* Provisional revert of r89406, r89414: reference-related warnings need ↵Brion Vibber2011-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | cleanup before applying code like this Per CR http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89406#c17545 : 'Here is a third one: Strict Standards: Only variables should be passed by reference in /www/sandwiki/includes/Wiki.php on line 177 ' Offending bit is this: - SpecialPageFactory::executePath( $this->context->title, $this->context ); + SpecialPageFactory::executePath( $this->getTitle(), $this->getContext() ); That function demands reference paramters for $title and $context, which is being violated here where we now pass function return values: public static function executePath( Title &$title, RequestContext &$context, $including = false ) { The $title does sometimes get replaced within the function body, but $context does not appear to ever be replaced (its *contents* are modified, which does not require passing by reference) If replacing it is something it should be doing, then we need to be able to replace it upstream presumably, so $this->getTitle() probably isn't appropriate. The $context probably should have the reference simply removed. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/89430