Commit graph

24 commits

Author SHA1 Message Date
Umherirrender 47f2ba3e4c Improve some parameter docs
Change-Id: Ie22b3de368199e77decb118150e7bde516b74bef
2017-10-14 17:23:24 +02:00
Kunal Mehta e6f36ecb6a build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I2f8e57c10e62a2aed4fe50c3844022283e56b009
2017-06-20 00:20:13 -07:00
Umherirrender 2c33c0d465 Add phpcs and make pass
Change-Id: I8d7db66655d983eb295f302f38ab27fd711f23e5
2017-05-20 23:41:06 +02:00
Justin Du 937cc81686 Convert RSS to use new extension registration
Bug: T87968
Change-Id: Iadd0a7baa826a1dee815c3b56b7a43c2c07e255b
2016-07-26 19:58:18 +00:00
Thomas Gries afa5cff8a9 version 2.18 + squashed commit RSS changes fromSVN
bump version number from 2.17 to 2.18 for the releas version

removed 4 white spaces tabs.

followed the advices of the code reviewer. removed an unwanted switch(true) structure
removed switch case by an assoc array, removed unneeded http factory comments Wikinaut 2013-01-04

removed unneeded INSTALL text file
new version 2.17 incl. code cosmetics. rebased on master bea4447d24  2012-12-22
bear with me ! It's my first real-life commit to gerrit. Wikinaut, 2012-12-30

Catrope squashed these together per Wikinaut's request. List of commit
summaries:

adding the long-wanted date format attribute.
implemented a date format equalising function,
so that dates of RSS feeds are rendered in a common format.

follow-up r111347 : adding escapeTemplateParameter around the user supplied optional date attribute

fix for bug30377 : add a new parameter to limit the number of characters when rendering the channel item <description>

follow-up r111350 . check if optional parameter  isset and is_numeric, otherwise limit to the built-in default (30000)

removed a wrong comment regarding PHP 5.3 function date_create_from_format,
which is not suited to auto-detect a time string in any formats -  only strtotime() can do it.

follow-up r111350 r111351 . switch replaced by if elseif construct.

name and behaviour change of wgRSSAllowedFeeds towgRSSUrlWhitelist.
The wgRSSUrlWhitelist is _now_ empty by default which was not the case until this version.
Admins who want to allow their users to insert arbitrary feed urls must now denote this expressly
with an asterisk in quotes as whitelist array element.
This is harmonised to the same method as recently introduced in E:EtherpadLite.
The RELEASE NOTES file has been updated, updates to the MediaWiki manual page will follow soon.

increased wgRSSFetchTimeout default from 5 to 15 seconds - many sites are too slow.

v2.00 can parse ATOM feeds, at least some.
This is a major improvement over pre-2.00 versions which only could read and parse RSS feeds but no ATOM feeds.
Version 2.00 begins to keep care of namespaces in the XML.
The parser still leaves room for further improvements.
At least, E:RSS can now read E:WikiArticleFeeds generated RSS _and_ ATOM feeds.

v2.01 fixed ATOM summary element was forgotten to be parsed.
Added handling of basic HTML layout tags (p br b u i s) in feed descriptions,
they are preserved in the wiki output after sanitizing.

improved code legibility function namespacePrefixedQuery

fix for ultra bug 30028 .
The RSS extension can parse RSS and ATOM feeds of different flavours.
The php xml dom xpath query uses now a namespace-safe method to find all elements like item (RSS, RDF)
or entry (ATOM).
Further fixed a hidden problem when the feed url was redirecting,
this threw the Cannot parse RSS for XML error, which is now history.
Introduced a new parameter wgRSSUrlNumberOfAllowedRedirects which defaults to zero,
i.e. no redirects are allowed by default. See Manual page

removed superfluous code for setting userAgent since r112466

function name typo correction. Version number update

fix for bug34763 'RSS feed items (HTML) are not rendered as HTML but htmlescaped';
tolerated controlled regression bug30377 'feed item length limitation',
because this now becomes very tricky when we allow some tags in order to close bug 34763.

add tracking category feature (enabled by default). Each page using this extensions gets
automatically the tracking category with MediaWiki:Rss-tracking-category name (= RSS).
Tracking-Cat-Feature can be disabled, or a different MediaWiki message text can be assigned.
Documentation of the switch is inline and follows on MediaWiki.

follow up r113508 : escaped html tag brackets to make translaters happy

beautifying the tracking category name

adding casts. better ?

removed the redundant code for handling tracking categories.
By using '-' for the message text rss-tracking-category , this can be disabled easily.

+ Patchset 11

rebased on master

+ Patchset 12

wrapped commit message text lines
version number bumped to 2.18

+ Patchset 13

improved and updated README
added history of the present version 2.18

+ Patchset 14

white space fixes
version number fixes

Change-Id: I2d9724314f94c216650370071b31390c5c2c97fc
2013-02-20 20:10:11 +01:00
Siebrand Mazeland 876e323eb6 Maintenance for RSS extension.
* Replace deprecated methods.
* Remove superfluous newlines.
* Update docs.
* Remove unused local variable.

Change-Id: I38e053980c40fdaf2ffa43a664c03f34a82b5e7c
2012-10-07 12:11:49 +02:00
Roan Kattouw f31547eb82 Revert r111347, r111348, r111350, r111351, r111515, r111816, r112243, r112251, r112308, r112314, r112315, r112465, r112467, r112709, r113297, r113508, r113510, r113524, r113546, r114168. Unreviewed revisions in the RSS extension and their dependencies.
All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-21 18:40:06 +00:00
Thomas Gries 62960795a8 adding casts. better ? 2012-03-09 23:28:30 +00:00
Thomas Gries bb33523be4 function name typo correction. Version number update 2012-02-29 20:00:43 +00:00
Thomas Gries 896a9a3274 fix for ultra bug 30028 . The RSS extension can parse RSS and ATOM feeds of different flavours. The php xml dom xpath query uses now a namespace-safe method to find all elements like item (RSS, RDF) or entry (ATOM). Further fixed a hidden problem when the feed url was redirecting, this threw the Cannot parse RSS for XML error, which is now history. Introduced a new parameter wgRSSUrlNumberOfAllowedRedirects which defaults to zero, i.e. no redirects are allowed by default. See Manual page 2012-02-27 01:10:57 +00:00
Thomas Gries e7e7b70a73 increased wgRSSFetchTimeout default from 5 to 15 seconds - many sites are too slow. 2012-02-23 22:24:00 +00:00
Thomas Gries 01c12d4927 name and behaviour change of wgRSSAllowedFeeds towgRSSUrlWhitelist. The wgRSSUrlWhitelist is _now_ empty by default which was not the case until this version. Admins who want to allow their users to insert arbitrary feed urls must now denote this expressly with an asterisk in quotes as whitelist array element. This is harmonised to the same method as recently introduced in E:EtherpadLite. The RELEASE NOTES file has been updated, updates to the MediaWiki manual page will follow soon. 2012-02-23 21:12:54 +00:00
Sam Reed ac778b6394 Fix unused variables
Fix trailing whitespace

Add/Improve documentation

Explicit member variable declaration
2012-01-28 17:05:20 +00:00
Sam Reed aff269967f MFT r91774 2011-07-09 02:17:08 +00:00
Sam Reed bd5d63fcf0 * (bug 27768) Make it possible to restrict use of RSS tags
Added URL whitelist to configuration

If there are items in the array, and the used URL isn't in the array, it will not be allowed
2011-07-09 01:59:02 +00:00
Mark A. Hershberger e03eee9134 Update per Reedy's mini-review on IRC:
* Make parens more spacey
* Use empty array instead of null for default.
2011-05-06 16:40:14 +00:00
Mark A. Hershberger 518d4b7a17 Update RSS to add the ability to restrict per-namespace. 2011-05-06 16:21:43 +00:00
Sam Reed 334d5e60b0 Fixup a few bits of documentation 2011-01-08 01:33:42 +00:00
Mark A. Hershberger a5321b114b * Remove the call to disableCache(), that, upon double-checking, does undermine the caching that updateCacheExpiry() is trying to set up in the very next line.
* Fix renderItem so that it isn't overly complex and just subsitutes the parsed contents of RSS elements (e.g. {{{description}}} is substituted with the contents of the <description> tag).
2010-11-16 22:06:59 +00:00
Mark A. Hershberger c06345b95e Add back cache setting that was accidently removed 2010-11-15 23:47:12 +00:00
Roan Kattouw ff4e370bed RSS: instanceOf -> instanceof, $ERROR -> $error 2010-11-13 19:11:28 +00:00
Jack Phoenix 4e23b840bc RSS: coding style and documentation tweaks 2010-11-05 00:59:28 +00:00
Mark A. Hershberger 81d995c0aa Remove bogus check for !isGood() status. 2010-11-04 23:38:47 +00:00
Mark A. Hershberger 3aa74a03f8 Re Roan's new review on IRC yesterday:
* Add function documentation that I should have written before.
* Create separate RSSParser class to clean up RSS.php
* Create separate RSSHooks class to handle parser initialization and
  public interface for parser to use.
* Move User Agent definition to $wgRSSUserAgent from a define.
* Eliminate references to $wgRSSUseGzip (since were using MW's
  internal HTTP client, it didn't do anything anyway, ATM).

Re Tim's emailed review (discovered yesterday):
* Switch to DOMXPath::query() from DOMXPath::evaluate() at Tim's
  suggestion.
* Move highlighting callback to its own class, RSSHighlighter, so that
  it works as a callback without create_function() and other mess.
2010-11-04 23:19:00 +00:00