Commit graph

101 commits

Author SHA1 Message Date
Max Semenik
36e6ab15da Fix called function case in a bunch of places
Change-Id: If1e392290a5bab3bce389f7da692e53a748b8aff
2018-01-22 09:10:09 -08:00
Umherirrender
23ef520a1c Improve some parameter docs
Change-Id: I31e983d7ac287158101b18ad95779d83537302a2
2018-01-07 11:39:08 +01:00
Pppery
e60c4ea7a7 Convert includes/Feed.php to Mustache templates
Bug: T182212
Change-Id: Ic198efb6a46ecc2d8b8b49ab594205d69a03efdb
2017-12-13 15:18:20 -05:00
Reedy
c16af68fb6 Replace MimeMagic::singleton() calls
Change-Id: Ieed41b5d6b0f568fe2872e7754f2feae7868fe7a
2017-11-27 02:13:51 +00:00
Brad Jorsch
c75f0e95c9 SECURITY: API: Avoid some silliness with browser-guessed filenames
If someone is both dumb enough to blindly save an API response and to
then execute the resulting file, this can be used to attack their
computer.

We can mitigate this by disallowing PATH_INFO in api.php URLs (because
we don't make any use of them anyway) and by setting a sensible filename
using a Content-Disposition header so the browser won't go guessing at
the filename based on what is in the URL.

Issue reported by: Abdullah Hussam

Bug: T128209
Change-Id: I8526f5cc506c551edb6138d68450b6acea065e93
2017-11-15 00:58:44 +00:00
Fomafix
ea0bd74a94 Refactor global function wfBCP47 to static function LanguageCode::bcp47
Deprecate global function wfBCP47.

Change-Id: Ie6bb061b5d6ca67289bb18bc468a87421f38fc94
2017-10-05 09:54:45 +02:00
Thiemo Mättig
91a920fd85 Remove auto-generated "Constructor" documentation on constructors
Having such comments is worse than not having them. They add zero
information. But you must read the text to understand there is
nothing you don't already know from the class and the method name.

This is similar to I994d11e. Even more trivial, because this here is
about comments that don't say anything but "constructor".

Change-Id: I474dcdb5997bea3aafd11c0760ee072dfaff124c
2017-07-21 12:19:30 +02:00
umherirrender
34fe90ac52 Remove empty lines at end of functions
It looks like there is something missing after the last statement
Also remove some other empty lines at begin of functions, ifs or loops
while at these files

Change-Id: Ib00b5cfd31ca4dcd0c32ce33754d3c80bae70641
2016-11-05 11:55:10 +01:00
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
Fomafix
e4e40eabc2 Feed.php: Apply wfBCP47 to language code
Change-Id: Ibaf771f6348bd5c25a39d6e6ae328251191454e2
2015-09-23 18:11:07 +00:00
Bartosz Dziewoński
5709ec0454 FeedItem: Use full URL with protocol for <id>/<guid> in Atom/RSS feeds
Bug: T89975
Change-Id: Ib84932b70aa8194b7bdabe7c90d7fdcc66054a1c
2015-03-07 23:52:44 +01:00
ayush_garg
e2a257ac7f Improve documentation of ChannelFeed and AtomFeed class
Change-Id: I1bebaf2d17ac71490aab3ab9cd1f08a4bb1fc3fb
2015-02-04 13:40:33 +00:00
Stephan Gambke
f09e458d39 Fix for Ia9baaf0b: Make previously public variables public again
Change Ia9baaf0b changed the visibility of member variables (many of which are not
otherwise exposed, e.g. by a method) and by that introduced a major API change
breaking extensions.

This patch explicitly marks affected variables as public again, keeping the intent
of the original patch of making phpcs-strict pass on includes/ directory.

Bug: 67522
Bug: 67984
Change-Id: I498512b2a1e615365bb477c1fd210aaa3241ca03
2014-08-29 23:01:53 +02:00
Bartosz Dziewoński
3191c5cc7e Delete feed.css
It was a stylesheet loaded with our RSS and Atom feeds, intended to make
them legible when shown in a regular browser. Browsers these days tend
to have their own UI for feeds (for example IE 11 and Firefox 31), and
these that don't pretty-print the XML, which means the stylesheet
provides very little added value.

Per discussion on I6268d663.

Bug: 69277
Change-Id: I2ce9650c01f8f245707f5e88ee46520c5e598ce4
2014-08-26 16:57:08 +02:00
umherirrender
3b2b6a2773 Add missing @param to function docs
Change-Id: I47fa96a976f55a1a93cb75397285edb8c7f4cd8a
2014-08-14 20:22:52 +02:00
umherirrender
1c68a1ee86 Cleanup some docs (includes/*.php)
- Swap "$variable type" to "type $variable"
- Added missing types
- Fixed spacing inside docs
- Makes beginning of @param/@return/@var/@throws in capital
- Changed some types to match the more common spelling

Change-Id: I783e4dbfe5f6f98b32b9a03ccf6439e13e132bcc
2014-07-24 19:42:24 +02:00
Siebrand Mazeland
a7fbdd6503 Make phpcs-strict pass on includes/ (7/7)
Change-Id: Ia9baaf0b3cdbe1a3c6b50ef8c4fe86fead88f909
2014-05-15 20:07:09 +02:00
withoutaname
866f478dc9 Append redirect=no to RecentChanges/Watchlist redirect entries
This change adds redirect=no in the URL of redirect entries in the RecentChanges or in the Watchlist.
Entries which are not redirects will not be affected.
Some typos in documentation were also fixed.

Bug: 890
Change-Id: I79593811d92b2f57abd742c8ba9e66769d8bc9b7
2014-04-28 18:11:13 -07:00
umherirrender
a3983418d5 Fixed some @params documentation (includes/*)
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Also added some missing @param.

Change-Id: I0056b4a8df243cfc0c5f25378de48f7a35170aca
2014-04-22 13:07:02 +02:00
Ladsgroup
1ba0445c12 Changing URLs of mediawiki.org in scripts to the SSL-based website
http://www.mediawiki.org --> https://www.mediawiki.org

Part 2

Change-Id: I3be61fe3dfb502cc20180486eb1a8016eac151df
2014-03-12 23:24:03 +00:00
umherirrender
ef2f507d23 Fixed spacing in files direct in includes folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: Ibb8dd102db045522d12ff939075ba7420d95ab6b
2013-04-21 06:38:49 +00:00
Yuri Astrakhan
9506e3d812 Spellchecked /includes directory
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls

Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"

Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
2013-03-13 03:42:41 -04:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
1044b0b8df fix some spacing
Change-Id: I8f976013f33c5818e4402604fe8610aa3f43b0c6
2013-02-04 20:18:33 +00:00
Antoine Musso
1a9246e1b8 ChannelFeed now marked as an abstract class
The ChannelFeed class has always been considered as an abstract class.
Looks like we forgot to update its definition since PHP switched to
support class abstractions.

Also marked abstract the three inner methods that must be extended:

 ChannelFeed::outHeader()
 ChannelFeed::outItem()
 ChannelFeed::outFooter()

Change-Id: Ie0111786af37531d53ee3fc845e0125136ca298f
2012-07-10 17:06:59 +01:00
Antoine Musso
f3f985c619 remove unneeded @abstract
Doxygen does recognize abstract methods when it is properly marked as
abstracted. That keyword is a left.

Change-Id: I7df790058edf0eefb07eb4c37a2586b5c16898e3
2012-07-10 16:43:05 +01:00
Sam Reed
76246b9bf5 More return documentation 2012-02-09 21:33:27 +00:00
Sam Reed
ec4604de3d Documentation and whitespace
Clearing another w/c
2012-01-19 14:56:18 +00:00
Alexandre Emsenhuber
eefe59bc4d Per Nikerabbit, fix undefined variable notice from r102851 2011-11-12 12:13:08 +00:00
Alexandre Emsenhuber
e35e645a1b * Renamed member variables to begin with a lower case
* Moved constant definitions from the constructor to the class definition
* Removed default values from the class definition for members that are always set in the constructor
2011-11-12 09:57:47 +00:00
Alexandre Emsenhuber
7c77b828b6 Removed FeedItem::getLastMod() and FeedItem::getDBPrefixedTitle() since they are not used and would throw an error since FeedItem::$Title is a string and not an object 2011-11-10 12:09:33 +00:00
Roan Kattouw
403f87be35 Rename $wgVaryOnXFPForAPI (introduced in r93818) to $wgVaryOnXFP and extend it to also apply to HTTP redirects. The previous name was overly specific for what has become a more generic setting, and we can still change it now that it's not in any release yet. 2011-10-03 13:15:28 +00:00
Roan Kattouw
75681bc57a Expand some more URLs: for feeds, referers and the proxy script 2011-08-19 17:31:40 +00:00
Roan Kattouw
b154959876 Make $wgVaryOnXFPForAPI apply to RSS/Atom feeds too, because they too use PROT_CURRENT. Make PROT_CURRENT usage explicit there too 2011-08-19 14:41:35 +00:00
Sam Reed
50d5b074d0 And some more parameter documentation!! 2011-05-28 16:31:00 +00:00
Siebrand Mazeland
75c6696aa8 Use consistent notation for "@todo FIXME". Should update http://svn.wikimedia.org/doc/todo.html nicely. 2011-05-17 22:03:20 +00:00
Tim Starling
6fec4e3fde Revert r87635, r87637, r87639, r87643 (MW_MIN_PHP_VERSION etc.): breaks HipHop support. 2011-05-15 13:21:16 +00:00
Happy-melon
fd34d0354b * Implement MW_VERSION constant in Defines.php and use it in preference to $wgVersion. Defines.php will have been loaded anywhere that DefaultSettings.php has been loaded.
* Move the declaration of $wgFeedClasses from Defines.php to WebStart.php
2011-05-07 14:53:08 +00:00
Niklas Laxström
9b93f1635b Fix more botched something in r86457 2011-04-20 08:44:54 +00:00
Niklas Laxström
99b02fc756 Fix botched something in r86457 2011-04-20 08:38:47 +00:00
Mark A. Hershberger
45c87acdd0 Revert r86455 based on bawolff's comments 2011-04-20 04:28:20 +00:00
Mark A. Hershberger
57919f0bbd DOH, cut-n-paste error. 2011-04-20 04:08:37 +00:00
Mark A. Hershberger
aadcbd3957 Refactor need for duplicate private Title in FeedSMItem away by moving functionality to parent. 2011-04-20 03:58:34 +00:00
Sam Reed
ea056f5171 Fixup a few undefined variables and alike while checking REL1_17 2011-04-04 21:13:34 +00:00
Niklas Laxström
665ed62453 Spell false with small latter 2011-01-11 14:28:35 +00:00
Platonides
c7e95055fa The default value of isPermaLink is true, not including it does nothing.
http://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt
2010-11-16 17:44:08 +00:00
Platonides
537826a674 Remove $wgContLanguageCode usage in core.
sed -i 's/$wgContLanguageCode/$wgLanguageCode/g'
These are now the same, always. Per and since r15827.

$wgLanguageCode wins due to being the one set by LocalSettings.

$wgContLanguageCode definition at includes/Setup.php kept for now.
2010-09-07 22:37:55 +00:00
Alexandre Emsenhuber
7b79d94515 * Standardised file description headers
* Added some descriptions
* Added @file where needed
2010-08-14 17:42:40 +00:00
Aryeh Gregor
11284695f1 Add <guid> to RSS to avoid duplicates
Bug 7346.  Patch by Jools Wills (buzz).
2010-01-15 18:00:56 +00:00
Alexandre Emsenhuber
36d2910fa9 * Document a bit
* Add new doxygen group "Feed"
* Fix some doxygen warnings
2010-01-09 21:59:40 +00:00