From b672fc190d7df163449e91400c6d6a08a3775835 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 11 Nov 2018 17:31:50 +0100 Subject: Tweaks for Vienna RSS (#2093) * Tweaks for Vienna RSS https://github.com/FreshRSS/FreshRSS/issues/2091 https://github.com/ViennaRSS/vienna-rss/issues/1197 * Fix get feed by URL * Fix get item ids returning starred elements * API add item ids by feed URL * Add API filter `it` https://feedhq.readthedocs.io/en/latest/api/reference.html#stream-items-ids * API add `nt=` filter + refactoring * No ; prefix for author https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435562495 * Add id long form prefix and accept short id form https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435631259 * Fix quote problem https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435683930 * Isolate bug fix for News+ https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-435687041 * Rework encoding conventions https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-437441834 * Unicode escaping alternative Alternative approach to encode XML special characters and other problematic characters into their Unicode fullwidth version when we cannot use HTML-encoding because clients disagree wether they should HTML-decode or not. https://github.com/FreshRSS/FreshRSS/issues/2091#issuecomment-436059559 --- p/api/greader.php | 226 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 140 insertions(+), 86 deletions(-) (limited to 'p/api') diff --git a/p/api/greader.php b/p/api/greader.php index c6701096c..7c5c54951 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -19,6 +19,7 @@ Server-side API compatible with Google Reader API layer 2 * https://github.com/devongovett/reader * https://github.com/theoldreader/api * https://www.inoreader.com/developers/ +* https://feedhq.readthedocs.io/en/latest/api/index.html */ require(__DIR__ . '/../../constants.php'); @@ -198,6 +199,7 @@ function clientLogin($email, $pass) { //http://web.archive.org/web/2013060409104 header('Content-Type: text/plain; charset=UTF-8'); $auth = $email . '/' . sha1(FreshRSS_Context::$system_conf->salt . $email . FreshRSS_Context::$user_conf->apiPasswordHash); echo 'SID=', $auth, "\n", + 'LSID=null', "\n", //Vienna RSS 'Auth=', $auth, "\n"; exit(); } else { @@ -258,7 +260,7 @@ function tagList() { foreach ($res as $cName) { $tags[] = array( - 'id' => 'user/-/label/' . $cName, + 'id' => 'user/-/label/' . htmlspecialchars_decode($cName, ENT_QUOTES), //'sortid' => $cName, 'type' => 'folder', //Inoreader ); @@ -270,7 +272,7 @@ function tagList() { $labels = $tagDAO->listTags(true); foreach ($labels as $label) { $tags[] = array( - 'id' => 'user/-/label/' . $label->name(), + 'id' => 'user/-/label/' . htmlspecialchars_decode($label->name(), ENT_QUOTES), //'sortid' => $cName, 'type' => 'tag', //Inoreader 'unread_count' => $label->nbUnread(), //Inoreader @@ -298,17 +300,17 @@ function subscriptionList() { foreach ($res as $line) { $subscriptions[] = array( 'id' => 'feed/' . $line['id'], - 'title' => $line['name'], + 'title' => escapeToUnicodeAlternative($line['name']), 'categories' => array( array( - 'id' => 'user/-/label/' . $line['c_name'], - 'label' => $line['c_name'], + 'id' => 'user/-/label/' . htmlspecialchars_decode($line['c_name'], ENT_QUOTES), + 'label' => htmlspecialchars_decode($line['c_name'], ENT_QUOTES), ), ), //'sortid' => $line['name'], //'firstitemmsec' => 0, - 'url' => $line['url'], - 'htmlUrl' => $line['website'], + 'url' => htmlspecialchars_decode($line['url'], ENT_QUOTES), + 'htmlUrl' => htmlspecialchars_decode($line['website'], ENT_QUOTES), 'iconUrl' => $faviconsUrl . hash('crc32b', $salt . $line['url']), ); } @@ -345,6 +347,7 @@ function subscriptionEdit($streamNames, $titles, $action, $add = '', $remove = ' $c_name = ''; } } + $c_name = htmlspecialchars($c_name, ENT_COMPAT, 'UTF-8'); $cat = $categoryDAO->searchByName($c_name); $addCatId = $cat == null ? 0 : $cat->id(); } else if ($remove != '' && strpos($remove, 'user/-/label/')) { @@ -355,26 +358,28 @@ function subscriptionEdit($streamNames, $titles, $action, $add = '', $remove = ' badRequest(); } for ($i = count($streamNames) - 1; $i >= 0; $i--) { - $streamName = $streamNames[$i]; //feed/http://example.net/sample.xml ; feed/338 - if (strpos($streamName, 'feed/') === 0) { - $streamName = substr($streamName, 5); + $streamUrl = $streamNames[$i]; //feed/http://example.net/sample.xml ; feed/338 + if (strpos($streamUrl, 'feed/') === 0) { + $streamUrl = substr($streamUrl, 5); $feedId = 0; - if (ctype_digit($streamName)) { + if (ctype_digit($streamUrl)) { if ($action === 'subscribe') { continue; } - $feedId = $streamName; + $feedId = $streamUrl; } else { - $feed = $feedDAO->searchByUrl($streamName); + $streamUrl = htmlspecialchars($streamUrl, ENT_COMPAT, 'UTF-8'); + $feed = $feedDAO->searchByUrl($streamUrl); $feedId = $feed == null ? -1 : $feed->id(); } $title = isset($titles[$i]) ? $titles[$i] : ''; + $title = htmlspecialchars($title, ENT_COMPAT, 'UTF-8'); switch ($action) { case 'subscribe': if ($feedId <= 0) { - $http_auth = ''; //TODO + $http_auth = ''; try { - $feed = FreshRSS_feed_Controller::addFeed($streamName, $title, $addCatId, $c_name, $http_auth); + $feed = FreshRSS_feed_Controller::addFeed($streamUrl, $title, $addCatId, $c_name, $http_auth); continue; } catch (Exception $e) { Minz_Log::error('subscriptionEdit error subscribe: ' . $e->getMessage(), API_LOG); @@ -407,6 +412,7 @@ function subscriptionEdit($streamNames, $titles, $action, $add = '', $remove = ' function quickadd($url) { try { + $url = htmlspecialchars($url, ENT_COMPAT, 'UTF-8'); $feed = FreshRSS_feed_Controller::addFeed($url); exit(json_encode(array( 'numResults' => 1, @@ -442,7 +448,7 @@ function unreadCount() { //http://blog.martindoms.com/2009/10/16/using-the-googl } } $unreadcounts[] = array( - 'id' => 'user/-/label/' . $cat->name(), + 'id' => 'user/-/label/' . htmlspecialchars_decode($cat->name(), ENT_QUOTES), 'count' => $cat->nbNotRead(), 'newestItemTimestampUsec' => $catLastUpdate . '000000', ); @@ -455,7 +461,7 @@ function unreadCount() { //http://blog.martindoms.com/2009/10/16/using-the-googl $tagDAO = FreshRSS_Factory::createTagDao(); foreach ($tagDAO->listTags(true) as $label) { $unreadcounts[] = array( - 'id' => 'user/-/label/' . $label->name(), + 'id' => 'user/-/label/' . htmlspecialchars_decode($label->name(), ENT_QUOTES), 'count' => $label->nbUnread(), ); } @@ -496,28 +502,29 @@ function entriesToArray($entries) { $f_name = '_'; } $item = array( - 'id' => /*'tag:google.com,2005:reader/item/' .*/ dec2hex($entry->id()), //64-bit hexa http://code.google.com/p/google-reader-api/wiki/ItemId + 'id' => 'tag:google.com,2005:reader/item/' . dec2hex($entry->id()), //64-bit hexa http://code.google.com/p/google-reader-api/wiki/ItemId 'crawlTimeMsec' => substr($entry->id(), 0, -3), 'timestampUsec' => '' . $entry->id(), //EasyRSS 'published' => $entry->date(true), - 'title' => $entry->title(), + 'title' => escapeToUnicodeAlternative($entry->title()), 'summary' => array('content' => $entry->content()), 'alternate' => array( array('href' => htmlspecialchars_decode($entry->link(), ENT_QUOTES)), ), 'categories' => array( 'user/-/state/com.google/reading-list', - 'user/-/label/' . $c_name, + 'user/-/label/' . htmlspecialchars_decode($c_name, ENT_QUOTES), ), 'origin' => array( 'streamId' => 'feed/' . $f_id, - 'title' => $f_name, //EasyRSS + 'title' => escapeToUnicodeAlternative($f_name), //EasyRSS //'htmlUrl' => $line['f_website'], ), ); $author = $entry->authors(true); + $author = trim($author, '; '); if ($author != '') { - $item['author'] = $author; + $item['author'] = escapeToUnicodeAlternative($author); } if ($entry->isRead()) { $item['categories'][] = 'user/-/state/com.google/read'; @@ -527,69 +534,117 @@ function entriesToArray($entries) { } $tagNames = isset($entryIdsTagNames['e_' . $entry->id()]) ? $entryIdsTagNames['e_' . $entry->id()] : array(); foreach ($tagNames as $tagName) { - $item['categories'][] = 'user/-/label/' . $tagName; + $item['categories'][] = 'user/-/label/' . htmlspecialchars_decode($tagName, ENT_QUOTES); } $items[] = $item; } return $items; } -function streamContents($path, $include_target, $start_time, $count, $order, $exclude_target, $continuation) { -//http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI -//http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#feed - header('Content-Type: application/json; charset=UTF-8'); - - switch ($path) { - case 'reading-list': - $type = 'A'; - break; - case 'starred': - $type = 's'; - break; - case 'feed': - $type = 'f'; +function streamContentsFilters($type, $streamId, $filter_target, $exclude_target, $start_time, $stop_time) { + switch ($type) { + case 'f': //feed + if ($streamId != '' && !ctype_digit($streamId)) { + $feedDAO = FreshRSS_Factory::createFeedDao(); + $streamId = htmlspecialchars($streamId, ENT_COMPAT, 'UTF-8'); + $feed = $feedDAO->searchByUrl($streamId); + $streamId = $feed == null ? -1 : $feed->id(); + } break; - case 'label': + case 'c': //category or label $categoryDAO = FreshRSS_Factory::createCategoryDao(); - $cat = $categoryDAO->searchByName($include_target); + $streamId = htmlspecialchars($streamId, ENT_COMPAT, 'UTF-8'); + $cat = $categoryDAO->searchByName($streamId); if ($cat != null) { $type = 'c'; - $include_target = $cat->id(); + $streamId = $cat->id(); } else { $tagDAO = FreshRSS_Factory::createTagDao(); - $tag = $tagDAO->searchByName($include_target); + $tag = $tagDAO->searchByName($streamId); if ($tag != null) { $type = 't'; - $include_target = $tag->id(); + $streamId = $tag->id(); } else { $type = 'A'; - $include_target = -1; + $streamId = -1; } } break; + } + + switch ($filter_target) { + case 'user/-/state/com.google/read': + $state = FreshRSS_Entry::STATE_READ; + break; + case 'user/-/state/com.google/unread': + $state = FreshRSS_Entry::STATE_NOT_READ; + break; + case 'user/-/state/com.google/starred': + $state = FreshRSS_Entry::STATE_FAVORITE; + break; default: - $type = 'A'; + $state = FreshRSS_Entry::STATE_ALL; break; } switch ($exclude_target) { case 'user/-/state/com.google/read': - $state = FreshRSS_Entry::STATE_NOT_READ; + $state &= FreshRSS_Entry::STATE_NOT_READ; break; case 'user/-/state/com.google/unread': - $state = FreshRSS_Entry::STATE_READ; + $state &= FreshRSS_Entry::STATE_READ; + break; + case 'user/-/state/com.google/starred': + $state &= FreshRSS_Entry::STATE_NOT_FAVORITE; + break; + } + + $searches = new FreshRSS_BooleanSearch(''); + if ($start_time != '') { + $search = new FreshRSS_Search(''); + $search->setMinDate($start_time); + $searches->add($search); + } + if ($stop_time != '') { + $search = new FreshRSS_Search(''); + $search->setMaxDate($stop_time); + $searches->add($search); + } + + return array($type, $streamId, $state, $searches); +} + +function streamContents($path, $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation) { +//http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI +//http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#feed + header('Content-Type: application/json; charset=UTF-8'); + + switch ($path) { + case 'reading-list': + $type = 'A'; + break; + case 'starred': + $type = 's'; + break; + case 'feed': + $type = 'f'; + break; + case 'label': + $type = 'c'; break; default: - $state = FreshRSS_Entry::STATE_ALL; + $type = 'A'; break; } + list($type, $include_target, $state, $searches) = streamContentsFilters($type, $include_target, $filter_target, $exclude_target, $start_time, $stop_time); + if ($continuation != '') { $count++; //Shift by one element } $entryDAO = FreshRSS_Factory::createEntryDao(); - $entries = $entryDAO->listWhere($type, $include_target, $state, $order === 'o' ? 'ASC' : 'DESC', $count, $continuation, new FreshRSS_BooleanSearch(''), $start_time); + $entries = $entryDAO->listWhere($type, $include_target, $state, $order === 'o' ? 'ASC' : 'DESC', $count, $continuation, $searches); $items = entriesToArray($entries); @@ -614,7 +669,7 @@ function streamContents($path, $include_target, $start_time, $count, $order, $ex exit(); } -function streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude_target, $continuation) { +function streamContentsItemsIds($streamId, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation) { //http://code.google.com/p/google-reader-api/wiki/ApiStreamItemsIds //http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI //http://blog.martindoms.com/2009/10/16/using-the-google-reader-api-part-2/#feed @@ -622,55 +677,32 @@ function streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude $id = ''; if ($streamId === 'user/-/state/com.google/reading-list') { $type = 'A'; - } elseif ('user/-/state/com.google/starred') { + } elseif ($streamId === 'user/-/state/com.google/starred') { $type = 's'; } elseif (strpos($streamId, 'feed/') === 0) { $type = 'f'; - $id = basename($streamId); + $streamId = substr($streamId, 5); } elseif (strpos($streamId, 'user/-/label/') === 0) { $type = 'c'; - $c_name = substr($streamId, 13); - $categoryDAO = FreshRSS_Factory::createCategoryDao(); - $cat = $categoryDAO->searchByName($c_name); - if ($cat != null) { - $type = 'c'; - $id = $cat->id(); - } else { - $tagDAO = FreshRSS_Factory::createTagDao(); - $tag = $tagDAO->searchByName($c_name); - if ($tag != null) { - $type = 't'; - $id = $tag->id(); - } else { - $type = 'A'; - $id = -1; - } - } + $streamId = substr($streamId, 13); } - switch ($exclude_target) { - case 'user/-/state/com.google/read': - $state = FreshRSS_Entry::STATE_NOT_READ; - break; - default: - $state = FreshRSS_Entry::STATE_ALL; - break; - } + list($type, $id, $state, $searches) = streamContentsFilters($type, $streamId, $filter_target, $exclude_target, $start_time, $stop_time); if ($continuation != '') { $count++; //Shift by one element } $entryDAO = FreshRSS_Factory::createEntryDao(); - $ids = $entryDAO->listIdsWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, $continuation, new FreshRSS_BooleanSearch(''), $start_time); + $ids = $entryDAO->listIdsWhere($type, $id, $state, $order === 'o' ? 'ASC' : 'DESC', $count, $continuation, $searches); if ($continuation != '') { array_shift($ids); //Discard first element that was already sent in the previous response $count--; } - if (empty($ids)) { //For News+ bug https://github.com/noinnion/newsplus/issues/84#issuecomment-57834632 - $ids[] = 0; + if (empty($ids) && isset($_GET['client']) && $_GET['client'] === 'newsplus') { + $ids[] = 0; //For News+ bug https://github.com/noinnion/newsplus/issues/84#issuecomment-57834632 } $itemRefs = array(); foreach ($ids as $id) { @@ -697,7 +729,10 @@ function streamContentsItems($e_ids, $order) { header('Content-Type: application/json; charset=UTF-8'); foreach ($e_ids as $i => $e_id) { - $e_ids[$i] = hex2dec(basename($e_id)); //Strip prefix 'tag:google.com,2005:reader/item/' + if (strpos($e_id, '/') !== null) { + $e_id = hex2dec(basename($e_id)); //Strip prefix 'tag:google.com,2005:reader/item/' + } + $e_ids[$i] = $e_id; } $entryDAO = FreshRSS_Factory::createEntryDao(); @@ -717,7 +752,10 @@ function streamContentsItems($e_ids, $order) { function editTag($e_ids, $a, $r) { foreach ($e_ids as $i => $e_id) { - $e_ids[$i] = hex2dec(basename($e_id)); //Strip prefix 'tag:google.com,2005:reader/item/' + if (strpos($e_id, '/') !== null) { + $e_id = hex2dec(basename($e_id)); //Strip prefix 'tag:google.com,2005:reader/item/' + } + $e_ids[$i] = $e_id; } $entryDAO = FreshRSS_Factory::createEntryDao(); @@ -748,6 +786,7 @@ function editTag($e_ids, $a, $r) { } } if ($tagName != '') { + $tagName = htmlspecialchars($tagName, ENT_COMPAT, 'UTF-8'); $tag = $tagDAO->searchByName($tagName); if ($tag == null) { $tagDAO->addTag(array('name' => $tagName)); @@ -771,6 +810,7 @@ function editTag($e_ids, $a, $r) { default: if (strpos($r, 'user/-/label/') === 0) { $tagName = substr($r, 13); + $tagName = htmlspecialchars($tagName, ENT_COMPAT, 'UTF-8'); $tag = $tagDAO->searchByName($tagName); if ($tag != null) { foreach ($e_ids as $e_id) { @@ -788,7 +828,9 @@ function renameTag($s, $dest) { if ($s != '' && strpos($s, 'user/-/label/') === 0 && $dest != '' && strpos($dest, 'user/-/label/') === 0) { $s = substr($s, 13); + $s = htmlspecialchars($s, ENT_COMPAT, 'UTF-8'); $dest = substr($dest, 13); + $dest = htmlspecialchars($dest, ENT_COMPAT, 'UTF-8'); $categoryDAO = FreshRSS_Factory::createCategoryDao(); $cat = $categoryDAO->searchByName($s); @@ -810,6 +852,7 @@ function renameTag($s, $dest) { function disableTag($s) { if ($s != '' && strpos($s, 'user/-/label/') === 0) { $s = substr($s, 13); + $s = htmlspecialchars($s, ENT_COMPAT, 'UTF-8'); $categoryDAO = FreshRSS_Factory::createCategoryDao(); $cat = $categoryDAO->searchByName($s); if ($cat != null) { @@ -838,6 +881,7 @@ function markAllAsRead($streamId, $olderThanId) { $entryDAO->markReadFeed($f_id, $olderThanId); } elseif (strpos($streamId, 'user/-/label/') === 0) { $c_name = substr($streamId, 13); + $c_name = htmlspecialchars($c_name, ENT_COMPAT, 'UTF-8'); $categoryDAO = FreshRSS_Factory::createCategoryDao(); $cat = $categoryDAO->searchByName($c_name); if ($cat != null) { @@ -902,12 +946,14 @@ if (count($pathInfos) < 3) { * exclude items from a particular feed (obviously not useful in this * request, but xt appears in other listing requests). */ $exclude_target = isset($_GET['xt']) ? $_GET['xt'] : ''; + $filter_target = isset($_GET['it']) ? $_GET['it'] : ''; $count = isset($_GET['n']) ? intval($_GET['n']) : 20; //n=[integer] : The maximum number of results to return. $order = isset($_GET['r']) ? $_GET['r'] : 'd'; //r=[d|n|o] : Sort order of item results. d or n gives items in descending date order, o in ascending order. /* ot=[unix timestamp] : The time from which you want to retrieve * items. Only items that have been crawled by Google Reader after * this time will be returned. */ $start_time = isset($_GET['ot']) ? intval($_GET['ot']) : 0; + $stop_time = isset($_GET['nt']) ? intval($_GET['nt']) : 0; /* Continuation token. If a StreamContents response does not represent * all items in a timestamp range, it will have a continuation attribute. * The same request can be re-issued with the value of that attribute put @@ -920,23 +966,31 @@ if (count($pathInfos) < 3) { if (isset($pathInfos[7])) { if ($pathInfos[6] === 'feed') { $include_target = $pathInfos[7]; - StreamContents($pathInfos[6], $include_target, $start_time, $count, $order, $exclude_target, $continuation); + if ($include_target != '' && !ctype_digit($include_target)) { + $include_target = empty($_SERVER['REQUEST_URI']) ? '' : $_SERVER['REQUEST_URI']; + if (preg_match('#/reader/api/0/stream/contents/feed/([A-Za-z0-9\'!*()%$_.~+-]+)#', $include_target, $matches) && isset($matches[1])) { + $include_target = urldecode($matches[1]); + } else { + $include_target = ''; + } + } + streamContents($pathInfos[6], $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation); } elseif ($pathInfos[6] === 'user' && isset($pathInfos[8]) && isset($pathInfos[9])) { if ($pathInfos[8] === 'state') { if ($pathInfos[9] === 'com.google' && isset($pathInfos[10])) { if ($pathInfos[10] === 'reading-list' || $pathInfos[10] === 'starred') { $include_target = ''; - streamContents($pathInfos[10], $include_target, $start_time, $count, $order, $exclude_target, $continuation); + streamContents($pathInfos[10], $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation); } } } elseif ($pathInfos[8] === 'label') { $include_target = $pathInfos[9]; - streamContents($pathInfos[8], $include_target, $start_time, $count, $order, $exclude_target, $continuation); + streamContents($pathInfos[8], $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation); } } } else { //EasyRSS $include_target = ''; - streamContents('reading-list', $include_target, $start_time, $count, $order, $exclude_target, $continuation); + streamContents('reading-list', $include_target, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation); } } elseif ($pathInfos[5] === 'items') { if ($pathInfos[6] === 'ids' && isset($_GET['s'])) { @@ -944,7 +998,7 @@ if (count($pathInfos) < 3) { * be repeated to fetch the item IDs from multiple streams at once * (more efficient from a backend perspective than multiple requests). */ $streamId = $_GET['s']; - streamContentsItemsIds($streamId, $start_time, $count, $order, $exclude_target, $continuation); + streamContentsItemsIds($streamId, $start_time, $stop_time, $count, $order, $filter_target, $exclude_target, $continuation); } else if ($pathInfos[6] === 'contents' && isset($_POST['i'])) { //FeedMe $e_ids = multiplePosts('i'); //item IDs streamContentsItems($e_ids, $order); -- cgit v1.2.3 From 0fce9892ff2b03083706b4f78495539861db98aa Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 12 Nov 2018 09:03:20 +0100 Subject: API encoding tuning (#2120) Use only minimal XML->Unicode encoding for articles title. Follow-up of https://github.com/FreshRSS/FreshRSS/pull/2093 --- app/Models/Feed.php | 2 +- lib/lib_rss.php | 21 +++++++++++++-------- p/api/greader.php | 8 ++++---- 3 files changed, 18 insertions(+), 13 deletions(-) (limited to 'p/api') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index a5ef33d6b..acf3bd981 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -424,7 +424,7 @@ class FreshRSS_Feed extends Minz_Model { $author_names = ''; if (is_array($authors)) { foreach ($authors as $author) { - $author_names .= escapeToUnicodeAlternative(strip_tags($author->name == '' ? $author->email : $author->name)) . '; '; + $author_names .= escapeToUnicodeAlternative(strip_tags($author->name == '' ? $author->email : $author->name), true) . '; '; } } $author_names = substr($author_names, 0, -2); diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 52e4408d2..c445874c8 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -102,16 +102,21 @@ function safe_ascii($text) { return filter_var($text, FILTER_DEFAULT, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH); } -function escapeToUnicodeAlternative($text) { +function escapeToUnicodeAlternative($text, $extended = true) { $text = htmlspecialchars_decode($text, ENT_QUOTES); + + //Problematic characters + $problem = array('&', '<', '>'); + //Use their fullwidth Unicode form instead: + $replace = array('&', '<', '>'); + // https://raw.githubusercontent.com/mihaip/google-reader-api/master/wiki/StreamId.wiki - return trim(str_replace( - //Problematic characters - array("'", '"', '^', '<', '>', '?', '&', '\\', '/', ',', ';'), - //Use their fullwidth Unicode form instead: - array("’", '"', '^', '<', '>', '?', '&', '\', '/', ',', ';'), - $text - )); + if ($extended) { + $problem += array("'", '"', '^', '?', '\\', '/', ',', ';'); + $replace += array("’", '"', '^', '?', '\', '/', ',', ';'); + } + + return trim(str_replace($problem, $replace, $text)); } /** diff --git a/p/api/greader.php b/p/api/greader.php index 7c5c54951..7cd312f2c 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -300,7 +300,7 @@ function subscriptionList() { foreach ($res as $line) { $subscriptions[] = array( 'id' => 'feed/' . $line['id'], - 'title' => escapeToUnicodeAlternative($line['name']), + 'title' => escapeToUnicodeAlternative($line['name'], true), 'categories' => array( array( 'id' => 'user/-/label/' . htmlspecialchars_decode($line['c_name'], ENT_QUOTES), @@ -506,7 +506,7 @@ function entriesToArray($entries) { 'crawlTimeMsec' => substr($entry->id(), 0, -3), 'timestampUsec' => '' . $entry->id(), //EasyRSS 'published' => $entry->date(true), - 'title' => escapeToUnicodeAlternative($entry->title()), + 'title' => escapeToUnicodeAlternative($entry->title(), false), 'summary' => array('content' => $entry->content()), 'alternate' => array( array('href' => htmlspecialchars_decode($entry->link(), ENT_QUOTES)), @@ -517,14 +517,14 @@ function entriesToArray($entries) { ), 'origin' => array( 'streamId' => 'feed/' . $f_id, - 'title' => escapeToUnicodeAlternative($f_name), //EasyRSS + 'title' => escapeToUnicodeAlternative($f_name, true), //EasyRSS //'htmlUrl' => $line['f_website'], ), ); $author = $entry->authors(true); $author = trim($author, '; '); if ($author != '') { - $item['author'] = escapeToUnicodeAlternative($author); + $item['author'] = escapeToUnicodeAlternative($author, false); } if ($entry->isRead()) { $item['categories'][] = 'user/-/state/com.google/read'; -- cgit v1.2.3 From 75a0b12c72890c69797f0d75065cc155ad9cfb7d Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 16 Dec 2018 14:43:32 +0100 Subject: Documentation Vienna (#2126) * Documentation Vienna / Open Reader https://github.com/FreshRSS/FreshRSS/issues/2091 https://github.com/FreshRSS/FreshRSS/pull/2093 https://github.com/ViennaRSS/vienna-rss/issues/1197 * Remove references to Open Reader API for now --- CHANGELOG.md | 4 ++-- README.fr.md | 2 ++ README.md | 2 ++ docs/en/users/06_Mobile_access.md | 2 ++ docs/fr/users/06_Mobile_access.md | 3 ++- p/api/index.php | 4 ++-- 6 files changed, 12 insertions(+), 5 deletions(-) (limited to 'p/api') diff --git a/CHANGELOG.md b/CHANGELOG.md index dfc982d40..74747d9cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,8 @@ ## 2018-1X-XX FreshRSS 1.12.1-dev * API - * Improvements to the Google Reader API / Open Reader API [#2093](https://github.com/FreshRSS/FreshRSS/pull/2093) - * Support for Vienna RSS (client for Mac OS X) [#2091](https://github.com/FreshRSS/FreshRSS/issues/2091) + * Improvements to the Google Reader API [#2093](https://github.com/FreshRSS/FreshRSS/pull/2093) + * Support for [Vienna RSS](http://www.vienna-rss.com/) (client for Mac OS X) [#2091](https://github.com/FreshRSS/FreshRSS/issues/2091) * Features * Ability to import XML files exported from Tiny-Tiny-RSS [#2079](https://github.com/FreshRSS/FreshRSS/issues/2079) * UI diff --git a/README.fr.md b/README.fr.md index b697a9b85..1cf1c07a0 100644 --- a/README.fr.md +++ b/README.fr.md @@ -180,6 +180,8 @@ Tout client supportant une API de type Google Reader ; Sélection : * [EasyRSS](https://github.com/Alkarex/EasyRSS) (Libre, [F-Droid](https://f-droid.org/fr/packages/org.freshrss.easyrss/)) * GNU/Linux * [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Libre) +* MacOS + * [Vienna RSS](http://www.vienna-rss.com/) (Libre) ## Via l’API compatible Fever diff --git a/README.md b/README.md index 00a1f145a..a97edc736 100644 --- a/README.md +++ b/README.md @@ -180,6 +180,8 @@ Supported clients are: * [EasyRSS](https://github.com/Alkarex/EasyRSS) (Open source, [F-Droid](https://f-droid.org/packages/org.freshrss.easyrss/)) * GNU/Linux * [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Open source) +* MacOS + * [Vienna RSS](http://www.vienna-rss.com/) (Open source) ## Fever API diff --git a/docs/en/users/06_Mobile_access.md b/docs/en/users/06_Mobile_access.md index c354f98f0..d1b310db3 100644 --- a/docs/en/users/06_Mobile_access.md +++ b/docs/en/users/06_Mobile_access.md @@ -53,6 +53,8 @@ See the [page about the Fever compatible API](06_Fever_API.md) for another possi * [EasyRSS](https://github.com/Alkarex/EasyRSS) (Open source, [F-Droid](https://f-droid.org/packages/org.freshrss.easyrss/)) * Linux * [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Open source) + * MacOS + * [Vienna RSS](http://www.vienna-rss.com/) (Open source) # Google Reader compatible API diff --git a/docs/fr/users/06_Mobile_access.md b/docs/fr/users/06_Mobile_access.md index 6981a74a6..6f7d92ade 100644 --- a/docs/fr/users/06_Mobile_access.md +++ b/docs/fr/users/06_Mobile_access.md @@ -67,7 +67,8 @@ Tout client supportant une API de type Google Reader. Sélection : * [EasyRSS](https://github.com/Alkarex/EasyRSS) (Libre, F-Droid) * Linux * [FeedReader 2.0+](https://jangernert.github.io/FeedReader/) (Libre) - +* MacOS + * [Vienna RSS](http://www.vienna-rss.com/) (Libre) # API compatible Google Reader diff --git a/p/api/index.php b/p/api/index.php index 108841819..ee37b794b 100644 --- a/p/api/index.php +++ b/p/api/index.php @@ -2,13 +2,13 @@ -FreshRSS API +FreshRSS API endpoints -

FreshRSS API

+

FreshRSS API endpoints

Google Reader compatible API

-- cgit v1.2.3 From 512d047f02b601dcf21f8c807117ea154967e58f Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 16 Dec 2018 17:02:03 +0100 Subject: Update naming to WebSub (#2184) Instead of PubSubHubbub / PuSH --- README.fr.md | 7 +++++-- README.md | 7 +++++-- app/Controllers/feedController.php | 12 ++++++------ app/Models/Feed.php | 18 +++++++++--------- app/i18n/cz/sub.php | 2 +- app/i18n/de/sub.php | 2 +- app/i18n/en/sub.php | 2 +- app/i18n/es/sub.php | 2 +- app/i18n/fr/sub.php | 2 +- app/i18n/he/sub.php | 2 +- app/i18n/it/sub.php | 2 +- app/i18n/kr/sub.php | 2 +- app/i18n/nl/sub.php | 2 +- app/i18n/oc/sub.php | 2 +- app/i18n/pt-br/sub.php | 2 +- app/i18n/ru/sub.php | 2 +- app/i18n/tr/sub.php | 2 +- app/i18n/zh-cn/sub.php | 2 +- app/views/helpers/feed/update.phtml | 2 +- cli/README.md | 2 +- config.default.php | 2 +- docs/en/users/05_Configuration.md | 2 +- docs/fr/contributing.md | 2 +- docs/fr/users/08_PubSubHubbub.md | 23 ++++++++++++++++------- p/api/pshb.php | 4 ++-- 25 files changed, 62 insertions(+), 47 deletions(-) (limited to 'p/api') diff --git a/README.fr.md b/README.fr.md index 9db5907a0..14d780b18 100644 --- a/README.fr.md +++ b/README.fr.md @@ -8,9 +8,12 @@ FreshRSS est un agrégateur de flux RSS à auto-héberger à l’image de [Leed] Il se veut léger et facile à prendre en main tout en étant un outil puissant et paramétrable. -Il permet de gérer plusieurs utilisateurs, et dispose d’un mode de lecture anonyme. -Il supporte les étiquettes personnalisées, et [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub) pour des notifications instantanées depuis les sites compatibles. +Il permet de gérer plusieurs utilisateurs, dispose d’un mode de lecture anonyme, et supporte les étiquettes personnalisées. Il y a une API pour les clients (mobiles), ainsi qu’une [interface en ligne de commande](cli/README.md). + +Grâce au standard [WebSub](https://www.w3.org/TR/websub/) (anciennement [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub)), +FreshRSS est capable de recevoir des notifications push instantanées depuis les sources compatibles, telles [Mastodon](https://joinmastodon.org), [Friendica](https://friendi.ca), [WordPress](https://wordpress.org/plugins/pubsubhubbub/), Blogger, FeedBurner, etc. + Enfin, il permet l’ajout d’[extensions](#extensions) pour encore plus de personnalisation. Les demandes de fonctionnalités, rapports de bugs, et autres contributions sont les bienvenues. Privilégiez pour cela des [demandes sur GitHub](https://github.com/FreshRSS/FreshRSS/issues). diff --git a/README.md b/README.md index 1904dad2c..4cf598172 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,12 @@ FreshRSS is a self-hosted RSS feed aggregator like [Leed](http://leed.idleman.fr It is lightweight, easy to work with, powerful, and customizable. -It is a multi-user application with an anonymous reading mode. -It supports custom tags, and [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub) for instant notifications from compatible Web sites. +It is a multi-user application with an anonymous reading mode. It supports custom tags. There is an API for (mobile) clients, and a [Command-Line Interface](cli/README.md). + +Thanks to the [WebSub](https://www.w3.org/TR/websub/) standard (formerly [PubSubHubbub](https://github.com/pubsubhubbub/PubSubHubbub)), +FreshRSS is able to receive instant push notifications from compatible sources, such as [Mastodon](https://joinmastodon.org), [Friendica](https://friendi.ca), [WordPress](https://wordpress.org/plugins/pubsubhubbub/), Blogger, FeedBurner, etc. + Finally, it supports [extensions](#extensions) for further tuning. Feature requests, bug reports, and other contributions are welcome. The best way to contribute is to [open an issue on GitHub](https://github.com/FreshRSS/FreshRSS/issues). diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index f2b1b8960..74c9eacfa 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -266,7 +266,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $nb_month_old = max(FreshRSS_Context::$user_conf->old_entries, 1); $date_min = time() - (3600 * 24 * 30 * $nb_month_old); - // PubSubHubbub support + // WebSub (PubSubHubbub) support $pubsubhubbubEnabledGeneral = FreshRSS_Context::$system_conf->pubsubhubbub_enabled; $pshbMinAge = time() - (3600 * 24); //TODO: Make a configuration. @@ -437,13 +437,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $entryDAO->commit(); } - if ($feed->hubUrl() && $feed->selfUrl()) { //selfUrl has priority for PubSubHubbub + if ($feed->hubUrl() && $feed->selfUrl()) { //selfUrl has priority for WebSub if ($feed->selfUrl() !== $url) { //https://code.google.com/p/pubsubhubbub/wiki/MovingFeedsOrChangingHubs $selfUrl = checkUrl($feed->selfUrl()); if ($selfUrl) { - Minz_Log::debug('PubSubHubbub unsubscribe ' . $feed->url(false)); + Minz_Log::debug('WebSub unsubscribe ' . $feed->url(false)); if (!$feed->pubSubHubbubSubscribe(false)) { //Unsubscribe - Minz_Log::warning('Error while PubSubHubbub unsubscribing from ' . $feed->url(false)); + Minz_Log::warning('Error while WebSub unsubscribing from ' . $feed->url(false)); } $feed->_url($selfUrl, false); Minz_Log::notice('Feed ' . $url . ' canonical address moved to ' . $feed->url(false)); @@ -457,9 +457,9 @@ class FreshRSS_feed_Controller extends Minz_ActionController { $feed->faviconPrepare(); if ($pubsubhubbubEnabledGeneral && $feed->pubSubHubbubPrepare()) { - Minz_Log::notice('PubSubHubbub subscribe ' . $feed->url(false)); + Minz_Log::notice('WebSub subscribe ' . $feed->url(false)); if (!$feed->pubSubHubbubSubscribe(true)) { //Subscribe - Minz_Log::warning('Error while PubSubHubbub subscribing to ' . $feed->url(false)); + Minz_Log::warning('Error while WebSub subscribing to ' . $feed->url(false)); } } $feed->unlock(); diff --git a/app/Models/Feed.php b/app/Models/Feed.php index fc7ed8c68..b21a8bbbe 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -498,7 +498,7 @@ class FreshRSS_Feed extends Minz_Model { @unlink($this->lockPath); } - // + // public function pubSubHubbubEnabled() { $url = $this->selfUrl ? $this->selfUrl : $this->url; @@ -534,13 +534,13 @@ class FreshRSS_Feed extends Minz_Model { if ($hubFile = @file_get_contents($hubFilename)) { $hubJson = json_decode($hubFile, true); if (!$hubJson || empty($hubJson['key']) || !ctype_xdigit($hubJson['key'])) { - $text = 'Invalid JSON for PubSubHubbub: ' . $this->url; + $text = 'Invalid JSON for WebSub: ' . $this->url; Minz_Log::warning($text); Minz_Log::warning($text, PSHB_LOG); return false; } if ((!empty($hubJson['lease_end'])) && ($hubJson['lease_end'] < (time() + (3600 * 23)))) { //TODO: Make a better policy - $text = 'PubSubHubbub lease ends at ' + $text = 'WebSub lease ends at ' . date('c', empty($hubJson['lease_end']) ? time() : $hubJson['lease_end']) . ' and needs renewal: ' . $this->url; Minz_Log::warning($text); @@ -560,7 +560,7 @@ class FreshRSS_Feed extends Minz_Model { file_put_contents($hubFilename, json_encode($hubJson)); @mkdir(PSHB_PATH . '/keys/'); file_put_contents(PSHB_PATH . '/keys/' . $key . '.txt', base64url_encode($this->selfUrl)); - $text = 'PubSubHubbub prepared for ' . $this->url; + $text = 'WebSub prepared for ' . $this->url; Minz_Log::debug($text); Minz_Log::debug($text, PSHB_LOG); } @@ -579,17 +579,17 @@ class FreshRSS_Feed extends Minz_Model { $hubFilename = PSHB_PATH . '/feeds/' . base64url_encode($url) . '/!hub.json'; $hubFile = @file_get_contents($hubFilename); if ($hubFile === false) { - Minz_Log::warning('JSON not found for PubSubHubbub: ' . $this->url); + Minz_Log::warning('JSON not found for WebSub: ' . $this->url); return false; } $hubJson = json_decode($hubFile, true); if (!$hubJson || empty($hubJson['key']) || !ctype_xdigit($hubJson['key']) || empty($hubJson['hub'])) { - Minz_Log::warning('Invalid JSON for PubSubHubbub: ' . $this->url); + Minz_Log::warning('Invalid JSON for WebSub: ' . $this->url); return false; } $callbackUrl = checkUrl(Minz_Request::getBaseUrl() . '/api/pshb.php?k=' . $hubJson['key']); if ($callbackUrl == '') { - Minz_Log::warning('Invalid callback for PubSubHubbub: ' . $this->url); + Minz_Log::warning('Invalid callback for WebSub: ' . $this->url); return false; } if (!$state) { //unsubscribe @@ -618,7 +618,7 @@ class FreshRSS_Feed extends Minz_Model { $response = curl_exec($ch); $info = curl_getinfo($ch); - Minz_Log::warning('PubSubHubbub ' . ($state ? 'subscribe' : 'unsubscribe') . ' to ' . $url . + Minz_Log::warning('WebSub ' . ($state ? 'subscribe' : 'unsubscribe') . ' to ' . $url . ' via hub ' . $hubJson['hub'] . ' with callback ' . $callbackUrl . ': ' . $info['http_code'] . ' ' . $response, PSHB_LOG); @@ -634,5 +634,5 @@ class FreshRSS_Feed extends Minz_Model { return false; } - // + // } diff --git a/app/i18n/cz/sub.php b/app/i18n/cz/sub.php index ec4c6f374..ad02f6f49 100644 --- a/app/i18n/cz/sub.php +++ b/app/i18n/cz/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Zobrazit ve “Všechny kanály”', 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'Okamžité oznámení s PubSubHubbub', + 'websub' => 'Okamžité oznámení s WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php index c4455c4be..aa408e8c7 100644 --- a/app/i18n/de/sub.php +++ b/app/i18n/de/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'In Haupt-Feeds zeigen', 'normal' => 'Zeige in eigener Kategorie', ), - 'pubsubhubbub' => 'Sofortbenachrichtigung mit PubSubHubbub', + 'websub' => 'Sofortbenachrichtigung mit WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php index 1dac808b0..9acbcbf33 100644 --- a/app/i18n/en/sub.php +++ b/app/i18n/en/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Show in main stream', 'normal' => 'Show in its category', ), - 'pubsubhubbub' => 'Instant notification with PubSubHubbub', + 'websub' => 'Instant notification with WebSub', 'show' => array( 'all' => 'Show all feeds', 'error' => 'Show only feeds with error', diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php index b6a7eb568..64e420dc1 100755 --- a/app/i18n/es/sub.php +++ b/app/i18n/es/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Mostrar en salida principal', 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'Notificación inmedaiata con PubSubHubbub', + 'websub' => 'Notificación inmedaiata con WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php index b5eaccef4..6cb31414d 100644 --- a/app/i18n/fr/sub.php +++ b/app/i18n/fr/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Afficher dans le flux principal', 'normal' => 'Afficher dans sa catégorie', ), - 'pubsubhubbub' => 'Notification instantanée par PubSubHubbub', + 'websub' => 'Notification instantanée par WebSub', 'show' => array( 'all' => 'Montrer tous les flux', 'error' => 'Montrer seulement les flux en erreur', diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php index f467df28c..e4c487b84 100644 --- a/app/i18n/he/sub.php +++ b/app/i18n/he/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'הצגה בזרם המרכזי', 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'Instant notification with PubSubHubbub', //TODO - Translation + 'websub' => 'Instant notification with WebSub', //TODO - Translation 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php index cbb488f3e..6faa48d63 100644 --- a/app/i18n/it/sub.php +++ b/app/i18n/it/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Mostra in homepage', //TODO - Translation 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'Notifica istantanea con PubSubHubbub', + 'websub' => 'Notifica istantanea con WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/kr/sub.php b/app/i18n/kr/sub.php index 785a3ea96..463496c57 100644 --- a/app/i18n/kr/sub.php +++ b/app/i18n/kr/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => '메인 스트림에 표시하기', 'normal' => '피드가 속한 카테고리에만 표시하기', ), - 'pubsubhubbub' => 'PubSubHubbub을 사용한 즉시 알림', + 'websub' => 'WebSub을 사용한 즉시 알림', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php index 53954ad3f..36c96b53f 100644 --- a/app/i18n/nl/sub.php +++ b/app/i18n/nl/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Zichtbaar in het overzicht', 'normal' => 'Toon in categorie', ), - 'pubsubhubbub' => 'Directe notificaties met PubSubHubbub', + 'websub' => 'Directe notificaties met WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php index 1d2e0007b..f9ddf339a 100644 --- a/app/i18n/oc/sub.php +++ b/app/i18n/oc/sub.php @@ -44,7 +44,7 @@ return array( 'main_stream' => 'Mostar al flux màger', 'normal' => 'Mostar dins sa categoria', ), - 'pubsubhubbub' => 'Notificaciones instantáneas amb PubSubHubbub', + 'websub' => 'Notificaciones instantáneas amb WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/pt-br/sub.php b/app/i18n/pt-br/sub.php index 03ae9d014..78684c14c 100644 --- a/app/i18n/pt-br/sub.php +++ b/app/i18n/pt-br/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Mostrar na tela principal', 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'Notificação instantânea com PubSubHubbub', + 'websub' => 'Notificação instantânea com WebSub', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php index ccd3b0020..7de80586b 100644 --- a/app/i18n/ru/sub.php +++ b/app/i18n/ru/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Show in main stream', //TODO - Translation 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'Instant notification with PubSubHubbub', //TODO - Translation + 'websub' => 'Instant notification with WebSub', //TODO - Translation 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php index 4d71e3dbf..b5b56f4b8 100644 --- a/app/i18n/tr/sub.php +++ b/app/i18n/tr/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => 'Ana akışda göster', 'normal' => 'Show in its category', //TODO - Translation ), - 'pubsubhubbub' => 'PubSubHubbub ile anlık bildirim', + 'websub' => 'WebSub ile anlık bildirim', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php index 49b6e4304..e1c176bc6 100644 --- a/app/i18n/zh-cn/sub.php +++ b/app/i18n/zh-cn/sub.php @@ -45,7 +45,7 @@ return array( 'main_stream' => '在首页中显示', 'normal' => '在分类中显示', ), - 'pubsubhubbub' => 'PubSubHubbub 即时通知', + 'websub' => 'WebSub 即时通知', 'show' => array( 'all' => 'Show all feeds', //TODO - Translation 'error' => 'Show only feeds with error', //TODO - Translation diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 4dbaacd04..bc90ba456 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -133,7 +133,7 @@
- +