aboutsummaryrefslogtreecommitdiff
path: root/lib/SimplePie
diff options
context:
space:
mode:
authorGravatar Craig Andrews <candrews@integralblue.com> 2019-12-06 12:10:06 -0500
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-12-06 18:10:06 +0100
commitecd00854bef9d99ed78d4a20b71d4eb5951cc9a6 (patch)
treed48aa6b1896d2c7a950422f093a865f0f2547ff0 /lib/SimplePie
parent1ce94136e0886fd26f3ed0f93849cd8fdb4cb2f4 (diff)
Manual update to SimplePie 1.5.3 (#2702)
Diffstat (limited to 'lib/SimplePie')
-rw-r--r--lib/SimplePie/SimplePie.php4
-rw-r--r--lib/SimplePie/SimplePie/Locator.php2
-rw-r--r--lib/SimplePie/SimplePie/Parse/Date.php39
3 files changed, 39 insertions, 6 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php
index d684c1a2c..87626f369 100644
--- a/lib/SimplePie/SimplePie.php
+++ b/lib/SimplePie/SimplePie.php
@@ -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
diff --git a/lib/SimplePie/SimplePie/Locator.php b/lib/SimplePie/SimplePie/Locator.php
index 3876a2da6..12bc15e15 100644
--- a/lib/SimplePie/SimplePie/Locator.php
+++ b/lib/SimplePie/SimplePie/Locator.php
@@ -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(
diff --git a/lib/SimplePie/SimplePie/Parse/Date.php b/lib/SimplePie/SimplePie/Parse/Date.php
index b29274c64..18e60e281 100644
--- a/lib/SimplePie/SimplePie/Parse/Date.php
+++ b/lib/SimplePie/SimplePie/Parse/Date.php
@@ -145,6 +145,14 @@ class SimplePie_Parse_Date
'Παρ' => 5,
'Σαβ' => 6,
'Κυρ' => 7,
+ // Russian
+ 'Пн.' => 1,
+ 'Вт.' => 2,
+ 'Ср.' => 3,
+ 'Чт.' => 4,
+ 'Пт.' => 5,
+ 'Сб.' => 6,
+ 'Вс.' => 7,
);
/**
@@ -290,6 +298,31 @@ class SimplePie_Parse_Date
'Οκτ' => 10,
'Νοέ' => 11,
'Δεκ' => 12,
+ // Russian
+ 'Янв' => 1,
+ 'января' => 1,
+ 'Фев' => 2,
+ 'февраля' => 2,
+ 'Мар' => 3,
+ 'марта' => 3,
+ 'Апр' => 4,
+ 'апреля' => 4,
+ 'Май' => 5,
+ 'мая' => 5,
+ 'Июн' => 6,
+ 'июня' => 6,
+ 'Июл' => 7,
+ 'июля' => 7,
+ 'Авг' => 8,
+ 'августа' => 8,
+ 'Сен' => 9,
+ 'сентября' => 9,
+ 'Окт' => 10,
+ 'октября' => 10,
+ 'Ноя' => 11,
+ 'ноября' => 11,
+ 'Дек' => 12,
+ 'декабря' => 12,
);
/**
@@ -541,8 +574,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)]))
@@ -690,7 +723,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;
}