Commit graph

55 commits

Author SHA1 Message Date
PiRSquared17 aec87de507 Follow-up I7d4bb9062. Register tracking category used.
This allows rss-tracking-category to appear in the newly added
[[Special:TrackingCategories]].

Bug: 63286
Change-Id: I9d37c37f14b29dfb4377a13d4d799f93a7c7d22e
2014-03-31 16:55:01 +00:00
Siebrand Mazeland 9a224d07c9 Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I3b3e5462cfcaa0496a0b01d491dae2f92573b293
2014-03-28 21:45:51 +01:00
Wikinaut b1f1e0b517 Bug 55763
Change-Id: I4329c4e652f3025ddcca4bcd38dedc33b1a378a6
2013-10-17 23:40:17 +02:00
Kevin Israel 8e0763a2cb Fix parsing from CLI; bumped to version 2.23
Removed references to $wgTitle, $wgUser, and $wgLang.

Follows-up r113297 and I2d9724314f94c216650370071b31390c5c2c97fc.

Bug: 53563
Change-Id: I07fb6939d16a18ecf367ee34ebc176fdc5634dd7
2013-09-03 20:53:20 +02:00
Wikinaut feaf0e186b trim white spaces around urls in feed item <link> or <id> tags
Change-Id: I2a8098cb5f0f8b01bf6b82f850bcbdfd8597be2d
2013-06-09 07:18:29 +00:00
Wikinaut 16c2dfa64a updated version number to 2.21
Change-Id: I6f5c3c83ee0c43d92ca8d295428efe58c216c4a7
2013-04-16 00:44:36 +02:00
Reedy 8d54970bdb Remove () from around date format
Change-Id: Icfd3e9e660f559f3af7e0f245c65d81da8bb54ac
2013-03-07 00:28:44 +00:00
Wikinaut 2fa8bc3cd7 follow-up change (renaming) core class HttpRequest to MWHttpRequest
Change-Id: I2c44ab3323c6da8f4b787a8fd0e36d451115e92d
2013-03-04 00:05:06 +01:00
Wikinaut 08f2300932 (bug 45387) (bug 45388) $wgRSSAllowImageTag new name; bug fixed
+++ breaking change +++
variable name $wgAllowImageTag renamed to $wgRSSAllowImageTag

+ fixed a problem that $wgAllowImageTag was not obeyed
+ added $wgRSSAllowImageTag to the variable declaration list in RSS.php

Change-Id: I112ebcdf492dfe80ba187fe6ab2406d3eed10f6a
2013-03-03 19:47:20 +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
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 660bd56b73 removed the redundant code for handling tracking categories. By using '-' for the message text rss-tracking-category , this can be disabled easily. 2012-03-19 18:56:58 +00:00
Thomas Gries ca38b650d8 add tracking category feature (enabled by default). Each page using this extensions get 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. 2012-03-09 19:43:44 +00:00
Thomas Gries 832948bb19 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. 2012-03-07 21:06:35 +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 83a5de7cd7 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. 2012-02-24 11:37:35 +00:00
Thomas Gries b276af44d9 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. 2012-02-24 10:16:34 +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
Thomas Gries 778820623b follow-up r111350 r111351 . switch replaced by if elseif construct. 2012-02-18 07:35:23 +00:00
Thomas Gries b9f38de383 follow-up r111350 . check if optional parameter isset and is_numeric, otherwise limit to the built-in default (30000) 2012-02-13 07:36:01 +00:00
Thomas Gries f54d6b047b fix for bug30377 : add a new parameter to limit the number of characters when rendering the channel item <description> 2012-02-13 07:23:56 +00:00
Thomas Gries e0d4f1dc22 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. 2012-02-13 01:39:24 +00:00
Brion Vibber 14c8d3f6bb Update a butt-ton of extension about URLs to point to https://www.mediawiki.org/ 2011-12-13 23:49:33 +00:00
Sam Reed 13834683ec Add 'path' => __FILE__, to Extension:RSS
Bug 30659 - correct extension credits
2011-08-31 14:32:50 +00:00
Thomas Gries 06e9fa6c74 new version RSS 1.90: streamlined template use, extended documentation; replaced parsing of each single channel subelement (item) by one final parser call when rendering 2011-08-15 21:52: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
Jeroen De Dauw a789ea5969 added paramater to change the template name, fixing bug 26479 2011-05-14 15:10:40 +00:00
Mark A. Hershberger 518d4b7a17 Update RSS to add the ability to restrict per-namespace. 2011-05-06 16:21:43 +00:00
Tim Starling 4606c89f74 Proxy configuration feature, since $wgHTTPProxy tends to screw up unrelated code. 2010-11-25 12:38:25 +00:00
Mark A. Hershberger d997781fb4 * Remove references to unused charset handling.
* Remove references to unused config variables.
* Consolidate renderItem() to a single loop instead of a separate one for highlighting displayFields.
* Make sure everything gets htmlspecialchars() treatment.
o
2010-11-16 23:21:36 +00:00
Jack Phoenix 4e23b840bc RSS: coding style and documentation tweaks 2010-11-05 00:59:28 +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
Mark A. Hershberger 70cd9b0503 re r75046 - implement highlighting in a (hopefully) less ugly way 2010-11-02 17:56:35 +00:00
Mark A. Hershberger b327d5d893 follow up r75046: Quote regex chars in variable strings used in preg_* 2010-11-02 15:26:19 +00:00
Mark A. Hershberger d5afc1af52 * Add note about security measures we're taking.
* Protect against possibility where rss member in renderRss is not an
  object.
* Move user-agent string up to a define().
* Remove use of $rssTemp var in renderItem() by inlining code.
2010-11-01 23:08:06 +00:00
Mark A. Hershberger 19fa56a6e9 * Add member $displayFields so that we don't highlight and/or filter
on stuff the user will never see.
* Clean up and fix canDisplay() and filter() methods so they actually
  works.
2010-11-01 21:14:26 +00:00
Mark A. Hershberger fd95eaf9cf minor stylize 2010-11-01 21:03:22 +00:00
Mark A. Hershberger 153cd40ef1 * Switch to $wgMemc from $parserMemc re 75799
* Change last_modified member var to lastModified re Pre-commit Checklist
2010-11-01 18:48:34 +00:00
Mark A. Hershberger 537efdd554 stylize, remove error_log 2010-11-01 18:29:09 +00:00
Mark A. Hershberger 76910c268b * Remove RSSCache.php and use $parserMemc to store parsed RSS feeds.
* Remove RSSFetch.php and move functionality to main RSS class
* Simplify how RSSData is constructed so we can pass it a DOMDocument
  object instead of an HTTPResponse.
* Move wf functions into RSS class since they shouldn't really be
  globally available.
2010-11-01 16:25:04 +00:00
Roan Kattouw 63eb8cf7d4 Stylize RSS extension 2010-10-20 18:28:47 +00:00
Jack Phoenix a4b3195671 RSS: follow-up to r75046: coding style tweaks 2010-10-20 11:25:10 +00:00
Mark A. Hershberger 4f78c58549 version bump 2010-10-19 22:28:12 +00:00
Mark A. Hershberger e14f1ce5f2 * Use [[Template:RSSPost]] (and [[Mediawiki:Rss-item]]) (or another
specified template) to display the feeds and remove hard-coded HTML.
* Add check to make sure the cache dir is writable and put an error in
  the debug log if not.
* Remove Snoopy.class.php — replace with use of the Http class.
* Remove RSSParse.php — which was a copy of MagpieRSS and use plain
  XML parsing.  MagpieRSS looks unmaintained and has security
  problems.  http://www.madirish.net/?article=253 
* Remove references to Magpie RSS
* Remove (over?) use of wf{Supress,Restore}Warnings
* Construct simple RSSData class for normalizing (some of) the feed
  data.
2010-10-19 21:54:53 +00:00
Matěj Grabovský 8f4a8c9bb6 Removed description in $wgExtensionCredits where descriptionmsg was used 2010-08-10 15:27:44 +00:00
Jack Phoenix 76e8fc3151 RSS: wfLoadExtensionMessages() is not needed for 1.16/trunk 2010-07-23 15:28:57 +00:00
Jack Phoenix ffdd42f217 committing my work on RSS extension. Now this extension should be totally self-contained. RSSCache.php, RSSFetch.php and RSSParse.php are MagpieRSS extension files by Kellan Elliott-McCrea, with some MediaWikification by me. Snoopy.class.php is Snoopy, with some coding style changes and whatnot by me.
to-do: use memcached for caching instead of RSSCache.php
2010-07-23 15:26:27 +00:00
Jeroen De Dauw 9fc917aca8 1.7 release 2010-07-23 14:17:46 +00:00