Commit graph

28 commits

Author SHA1 Message Date
Kunal Mehta
6e9b4f0e9c Convert all array() syntax to []
Per wikitech-l consensus:
 https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html

Notes:
* Disabled CallTimePassByReference due to false positives (T127163)

Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
2016-02-17 01:33:00 -08:00
Timo Tijhof
f95dc8faff specials: Clean up redirect special pages ($subpage can be null)
$subpage being null is clearly documented in SpecialPage::run,
SpecialPage::execute, and most special page subclasses.

But all the redirect subclasses only copied part of the typehint,
making it look like it's always a string.

For SpecialMyLanguage, follows-up b1853bba0. Don't cast null to
empty string, and don't bother giving Title::newFromText an empty
string only to bail out with null again.

Also:
* Add visibility 'public' where missing.
* Add or correct relevant documentation comments.
* In SpecialMyRedirectPages, handle error first and avoid having
  final return inside a conditional; Remove redunant 'else'.

Change-Id: Ie3543f44011832b198bb3d3e32528b6a2868dee1
2015-04-13 20:10:00 +01:00
Timo Tijhof
ff6513f28b Remove '@section LICENSE'
This was used in 2 special classes, the logger classes and spread
to a few other random classes.

Afaik this has no meaning. Is for something we don't use, and
goes against the meaning of '@section' in Doxygen, which we do
use.

In Doxygen output, all LICENSE references became links to
ProfilerXhprof (the one Doxygen encoutered first).

Bug: T72328
Change-Id: Icc7c443245c70bc0f549bee7d105eef5691c864d
2014-11-26 02:20:55 +00:00
Brian Wolff
77b5a3573f Make Special:FilePath redirect to Special:Redirect/file
Used to redirect to Special:Redirect/file/, which caused an error.

Bug: 66980
Change-Id: I8eb484fc88fad323122ddb6c25c55ab404030c64
2014-07-24 02:14:27 +00:00
Siebrand Mazeland
374cce86c8 Update formatting for includes/specials/
Change-Id: I478dedd0b692eae002a0ca9b0ec15cb2c357411f
2014-03-23 11:19:12 +00:00
Alexandre Emsenhuber
b03a87204c Make "Special:FilePath?file=.." work again
bug: 51542
Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
2013-07-23 11:56:07 +00:00
C. Scott Ananian
83bcc4835e Reimplement Special:Filepath as a redirect through Special:Redirect/File.
Reduces code duplication (and some ugly deprecated code patterns in the
Special:Filepath implementation).  In the long term, reduces the need for
one-off redirection pages (Special:PermanentLink, Special:Filepath, etc)
in favor of an extensible system based around Special:Redirect.

Change-Id: I42d5879342bc18412f0383c538e83c68b1c3cc2a
2013-04-30 13:40:55 -04:00
Siebrand Mazeland
87ec7ad22e Update formatting
Change-Id: I0e334d910a311f067276215b6bff94cd814fc3b3
2013-04-20 10:02:19 +02:00
C. Scott Ananian
7d14d3f46d Clean up SpecialFilepath.
Prompted by comments on https://gerrit.wikimedia.org/r/59050
which identified problems with code lifted directly from SpecialFilepath.

Change-Id: Iab8a5d3d007b3aca72b7c6c1145d830a74b4399e
2013-04-17 11:40:58 -04:00
umherirrender
96a5486ed0 Add SpecialPage::getGroupName and use it
Having all group mapping for Special:SpecialPages in the global
$wgSpecialPageGroups is not a good OO style.
Created a method SpecialPage::getGroupName, which than can be overridden
by each subclasses to the featured group name.

Added also SpecialPage::getFinalGroupName to get the groupname on
Special:SpecialPages to handle the customization and
to keep $wgSpecialPageGroups for b/c

Change-Id: I1de3a186f0a59ec5ecb8996c5f805cf164e9637f
2013-03-07 21:15:54 +01:00
Siebrand Mazeland
9b7889b84b Use American English spelling for behavior
Spotted in ipbreason-dropdown by Shirayuki.

Change-Id: I576ed4bc0abe5ab980aaee3fb9f9e4b43087311f
2013-03-04 10:24:57 +01:00
Alexandre Emsenhuber
c4ae62347d Use local context to get messages 2012-02-25 13:21:26 +00:00
Brion Vibber
7bab72edeb * (bug 30977) Remove directions cruft, undo random limitation of input format for Special:Filepath
Reverts r43471 which forced Special:FilePath's input to not accept titles with the File: or Image: namespace on them, or otherwise requiring any normalization beyond space/underscore.
Also removes the extra line saying 'input the name without the file: prefix' which used the native namespace name, which prompted a question about its formatting in mixed-directionality contexts.
2011-09-19 21:16:00 +00:00
Alexandre Emsenhuber
fde4d6ef8d Use local context instead of global variables 2011-08-23 19:48:18 +00:00
Sam Reed
50d5b074d0 And some more parameter documentation!! 2011-05-28 16:31:00 +00:00
Mark A. Hershberger
6826aed670 w/s diff. mostly eol w/s and using only tabs of width 4 to indent. 2011-03-18 20:37:11 +00:00
Krinkle
3cc14d4bf8 Bug 26870 - add width/height param to {{filepath:}}
* In addition to r80381
* Expanded comments in SpecialFilePath a little bit
2011-01-23 13:09:15 +00:00
Andrew Garrett
e0cfef93f3 Revert r80544 -- need to handle the case in which there is an error 2011-01-19 01:10:53 +00:00
Andrew Garrett
af5eed753f Quick adjustments to the if-block layout in r80381 to make the way the code works clearer 2011-01-19 01:03:39 +00:00
Roan Kattouw
771701eeef Add width parameter to Special:Filepath to allow getting the file path of a thumbnail. Requested by Krinkle for his Wordpress plugin (PhotoCommons) 2011-01-15 11:20:24 +00:00
Alexandre Emsenhuber
144c825809 Standardised file description headers; first path 2010-08-14 19:19:41 +00:00
Alexandre Emsenhuber
1ade5c518b Modified Special:Filepath to subclass SpecialPage; also changed some calls from Xml:: to Html:: 2010-07-03 18:39:20 +00:00
Derk-Jan Hartman
f68b7bddb4 Correct the address of the FSF in some of the GPL headers
59 Temple Place -> 51 Franklin Street
Follow up to r68351
2010-06-21 13:16:32 +00:00
Sam Reed
7b229a2047 GPL Headers for all! 2010-06-21 12:59:04 +00:00
Chad Horohoe
8b88d701b5 First round of war on $wgTitle. Don't use it in Special Pages. We've got SpecialPage::getTitleFor() which returns the localized title 100% of the time. Use that. 2009-04-07 16:33:12 +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
Tim Starling
19f1fa7576 Fix incorrect use of Title::newFromText(). That function lets the user choose the namespace using a title with colons, to force the namespace you must use Title::makeTitleSafe(). Images are always in the image namespace. 2008-11-14 00:44:08 +00:00
Brion Vibber
660a5eb7aa Rename all the special page class files back to their proper names.
1) This keeps the filename the same as the classname, which is always nice
2) This avoids duplicate filenames (such as includes/Export.php and includes/specials/Export.php)
So I've at least got a chance of figuring out what file is what still...
2008-06-19 21:12:45 +00:00
Renamed from includes/specials/Filepath.php (Browse further)