Skip to content

Commit

Permalink
[EpicgamesBridge] Fix Undefined property, added all languages from ep…
Browse files Browse the repository at this point in the history
…icgames site
  • Loading branch information
Alexander Fadeev committed Aug 19, 2020
1 parent dc11664 commit 116ae03
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions bridges/EpicgamesBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,22 @@ class EpicgamesBridge extends BridgeAbstract {
'name' => 'Language',
'type' => 'list',
'values' => array(
'Eng' => 'en',
'Rus' => 'ru',
'English' => 'en',
'العربية' => 'ar',
'Deutsch' => 'de',
'Español (Spain)' => 'es-ES',
'Español (LA)' => 'es-MX',
'Français' => 'fr',
'Italiano' => 'it',
'日本語' => 'ja',
'한국어' => 'ko',
'Polski' => 'pl',
'Português (Brasil)' => 'pt-BR',
'Русский' => 'ru',
'ไทย' => 'th',
'Türkçe' => 'tr',
'简体中文' => 'zh-CN',
'繁體中文' => 'zh-Hant',
),
'title' => 'Language of blog posts',
'defaultValue' => 'en',
Expand All @@ -47,15 +61,21 @@ public function collectData() {
$item['uri'] = self::URI . $value->url;
$item['title'] = $value->title;
$item['timestamp'] = $value->date;
$item['author'] = $value->author;

$content = $value->content;
$content = str_replace('href="/', 'href="' . self::URI . '/', $content);
$item['content'] = $content;

$item['enclosures'][] = $value->image;
$item['author'] = 'EpicGames';
if(!empty($value->author)) {
$item['author'] = $value->author;
}
if(!empty($value->content)) {
$content = $value->content;
$content = str_replace('href="/', 'href="' . self::URI . '/', $content);
$item['content'] = $content;
}
if(!empty($value->image)) {
$item['enclosures'][] = $value->image;
}
$item['uid'] = $value->_id;
$item['id'] = $value->_id;
$item['id'] = $value->_id;

$this->items[] = $item;
}
}
Expand Down

0 comments on commit 116ae03

Please sign in to comment.