MDL-67374 libraries: Upgrade SimplePie to version 1.5.3

This commit is contained in:
Shamim Rezaie
2019-12-16 16:27:07 +11:00
parent 6aacd8d6d1
commit 0df71b23a2
7 changed files with 108 additions and 80 deletions
+101 -73
View File
@@ -1,14 +1,105 @@
# SimplePie
SimplePie
=========
## Authors and contributors
SimplePie is a very fast and easy-to-use class, written in PHP, that puts the
'simple' back into 'really simple syndication'. Flexible enough to suit
beginners and veterans alike, SimplePie is focused on [speed, ease of use,
compatibility and standards compliance][what_is].
[what_is]: http://simplepie.org/wiki/faq/what_is_simplepie
Requirements
------------
* PHP 5.3.0+ (5.3.6+ recommended since SimplePie 1.4.2)
* Support for PHP 5.2 stopped in branch `one-dot-three`
* Support for PHP 4 stopped in branch `one-dot-two`
* libxml2 (certain 2.7.x releases are too buggy for words, and will crash)
* One of iconv, mbstring or intl extensions
* cURL or fsockopen()
* PCRE support
What comes in the package?
--------------------------
1. `library/` - SimplePie classes for use with the autoloader
2. `autoloader.php` - The SimplePie Autoloader if you want to use the separate
file version.
3. `README.markdown` - This document.
4. `LICENSE.txt` - A copy of the BSD license.
5. `compatibility_test/` - The SimplePie compatibility test that checks your
server for required settings.
6. `demo/` - A basic feed reader demo that shows off some of SimplePie's more
noticeable features.
7. `idn/` - A third-party library that SimplePie can optionally use to
understand Internationalized Domain Names (IDNs).
8. `build/` - Scripts related to generating pieces of SimplePie
9. `test/` - SimplePie's unit test suite.
### Where's `simplepie.inc`?
Since SimplePie 1.3, we've split the classes into separate files to make it easier
to maintain and use.
If you'd like a single monolithic file, you can run `php build/compile.php` to
generate `SimplePie.compiled.php`.
To start the demo
-----------------
1. Upload this package to your webserver.
2. Make sure that the cache folder inside of the demo folder is server-writable.
3. Navigate your browser to the demo folder.
Need support?
-------------
For further setup and install documentation, function references, etc., visit
[the wiki][wiki]. If you're using the latest version off GitHub, you can also
check out the [API documentation][].
If you can't find an answer to your question in the documentation, head on over
to one of our [support channels][]. For bug reports and feature requests, visit
the [issue tracker][].
[API documentation]: http://dev.simplepie.org/api/
[wiki]: http://simplepie.org/wiki/
[support channels]: http://simplepie.org/support/
[issue tracker]: http://github.com/simplepie/simplepie/issues
Project status
--------------
SimplePie is currently maintained by Malcolm Blaney.
As an open source project, SimplePie is maintained on a somewhat sporadic basis.
This means that feature requests may not be fulfilled straight away, as time has
to be prioritized.
If you'd like to contribute to SimplePie, the best way to get started is to fork
the project on GitHub and send pull requests for patches. When doing so, please
be aware of our [coding standards][].
[coding standards]: http://simplepie.org/wiki/misc/coding_standards
Authors and contributors
------------------------
### Current
* [Ryan McCue](http://ryanmccue.info) (Maintainer, support)
* [Malcolm Blaney][] (Maintainer, support)
### Alumni
* [Ryan Parman](http://ryanparman.com) (Creator, developer, evangelism, support)
* [Geoffrey Sneddon](http://gsnedders.com) (Lead developer)
* [Michael Shipley](http://michaelpshipley.com) (Submitter of patches, support)
* [Steve Minutillo](http://minutillo.com/steve/) (Submitter of patches)
* [Ryan McCue][] (developer, support)
* [Ryan Parman][] (Creator, developer, evangelism, support)
* [Geoffrey Sneddon][] (Lead developer)
* [Michael Shipley][] (Submitter of patches, support)
* [Steve Minutillo][] (Submitter of patches)
[Malcolm Blaney]: https://unicyclic.com/mal
[Ryan McCue]: http://ryanmccue.info
[Ryan Parman]: http://ryanparman.com
[Geoffrey Sneddon]: http://gsnedders.com
[Michael Shipley]: http://michaelpshipley.com
[Steve Minutillo]: http://minutillo.com/steve/
### Contributors
For a complete list of contributors:
@@ -17,69 +108,6 @@ For a complete list of contributors:
2. In the `simplepie` directory, run `git shortlog -ns`
## Requirements
* PHP 5.1.4 or newer
* libxml2 (certain 2.7.x releases are too buggy for words, and will crash)
* Either the iconv or mbstring extension
* cURL or fsockopen()
* PCRE support
If you're looking for PHP 4.x support, pull the "1.2" tag, as that's the last version to support PHP 4.x.
## License
[New BSD license](http://www.opensource.org/licenses/bsd-license.php)
## Project status
SimplePie is currently maintained by Ryan McCue.
SimplePie is currently in "low-power mode." If the community decides that SimplePie is a valuable tool, then the community will come together to maintain it into the future.
If you're interested in getting involved with SimplePie, please get in touch with Ryan McCue.
## Roadmap
SimplePie 1.3 should be a thoughtful reduction of features. Remove some bloat, slim it down, and break it into smaller, more manageable chunks.
Removing PHP 4.x support will certainly help with the slimming. It will also help avoid certain issues that frequently crop up with PHP 4.x. The PHP5-only migration is underway, but there is still quite a bit of work before it's "clean."
## What comes in the package?
1. `simplepie.inc` - The SimplePie library. This is all that's required for your pages.
2. `README.markdown` - This document.
3. `LICENSE.txt` - A copy of the BSD license.
4. `compatibility_test/` - The SimplePie compatibility test that checks your server for required settings.
5. `demo/` - A basic feed reader demo that shows off some of SimplePie's more noticable features.
6. `idn/` - A third-party library that SimplePie can optionally use to understand Internationalized Domain Names (IDNs).
7. `test/` - SimplePie's unit test suite.
## To start the demo
1. Upload this package to your webserver.
2. Make sure that the cache folder inside of the demo folder is server-writable.
3. Navigate your browser to the demo folder.
## Need support?
For further setup and install documentation, function references, etc., visit:
[http://simplepie.org/wiki/](http://simplepie.org/wiki/)
For bug reports and feature requests, visit:
[http://github.com/rmccue/simplepie/issues](http://github.com/rmccue/simplepie/issues)
Support mailing list -- powered by users, for users.
[http://tech.groups.yahoo.com/group/simplepie-support/](http://tech.groups.yahoo.com/group/simplepie-support/)
## Recently removed
The following have recently been removed:
* Parameters for SimplePie::__construct()
* add_to_*
* display_cached_file
* enable_xml_dump
* get_favicon
* set_favicon_handler
* subscribe_* (except subscribe_url)
* utf8_bad_replace
License
-------
[New BSD license](http://www.opensource.org/licenses/BSD-3-Clause)
+2 -2
View File
@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
* @version 1.5.2
* @version 1.5.3
* @copyright 2004-2017 Ryan Parman, Geoffrey Sneddon, Ryan McCue
* @author Ryan Parman
* @author Geoffrey Sneddon
@@ -50,7 +50,7 @@ define('SIMPLEPIE_NAME', 'SimplePie');
/**
* SimplePie Version
*/
define('SIMPLEPIE_VERSION', '1.5.2');
define('SIMPLEPIE_VERSION', '1.5.3');
/**
* SimplePie Build
View File
+1 -1
View File
@@ -402,7 +402,7 @@ class SimplePie_Locator
{
break;
}
if (preg_match('/(rss|rdf|atom|xml)/i', $value))
if (preg_match('/(feed|rss|rdf|atom|xml)/i', $value))
{
$this->checked_feeds++;
$headers = array(
@@ -575,8 +575,8 @@ class SimplePie_Parse_Date
*/
public function __construct()
{
$this->day_pcre = '(' . implode(array_keys($this->day), '|') . ')';
$this->month_pcre = '(' . implode(array_keys($this->month), '|') . ')';
$this->day_pcre = '(' . implode('|', array_keys($this->day)) . ')';
$this->month_pcre = '(' . implode('|', array_keys($this->month)) . ')';
static $cache;
if (!isset($cache[get_class($this)]))
@@ -724,7 +724,7 @@ class SimplePie_Parse_Date
}
// Convert the number of seconds to an integer, taking decimals into account
$second = round((int)$match[6] + (int)$match[7] / pow(10, strlen($match[7])));
$second = round((int)$match[6] + (int)$match[7] / (10 ** strlen($match[7])));
return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone;
}
View File
+1 -1
View File
@@ -102,7 +102,7 @@
<location>simplepie</location>
<name>SimplePie</name>
<license>BSD</license>
<version>1.5.2</version>
<version>1.5.3</version>
<licenseversion></licenseversion>
</library>
<library>