mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 02:11:52 -04:00
OPML : améliorations
Charge et sauve la description des flux. Redirige vers la page d'accueil après une importation OPML (maintenant rapide, et pour mieux permettre le rafraîchissement des flux avec moins de risques que l'utilisateur quitte la page) Suite de https://github.com/marienfressinaud/FreshRSS/issues/228
This commit is contained in:
1 parent
b40783e888
commit
65c972873b
3 files changed
+10
-9
No files matched your search
@@ -340,10 +340,10 @@ class feedController extends ActionController {
|
||||
Session::_param ('notification', $notif);
|
||||
Session::_param ('actualize_feeds', true);
|
||||
|
||||
// et on redirige vers la page import/export
|
||||
// et on redirige vers la page d'accueil
|
||||
Request::forward (array (
|
||||
'c' => 'configure',
|
||||
'a' => 'importExport'
|
||||
'c' => 'index',
|
||||
'a' => 'index'
|
||||
), true);
|
||||
}
|
||||
|
||||
|
||||
+2
-4
@@ -247,10 +247,8 @@ class Feed extends Model {
|
||||
$this->_url ($subscribe_url);
|
||||
}
|
||||
|
||||
if (empty($this->name)) { // May come from OPML
|
||||
$title = $feed->get_title ();
|
||||
$this->_name (!is_null ($title) ? $title : $this->url);
|
||||
}
|
||||
$title = $feed->get_title ();
|
||||
$this->_name (!is_null ($title) ? $title : $this->url);
|
||||
|
||||
$this->_website ($feed->get_link ());
|
||||
$this->_description ($feed->get_description ());
|
||||
|
||||
+5
-2
@@ -91,7 +91,7 @@ function opml_export ($cats) {
|
||||
$txt .= '<outline text="' . $cat['name'] . '">' . "\n";
|
||||
|
||||
foreach ($cat['feeds'] as $feed) {
|
||||
$txt .= "\t" . '<outline text="' . $feed->name () . '" type="rss" xmlUrl="' . $feed->url () . '" htmlUrl="' . $feed->website () . '" />' . "\n";
|
||||
$txt .= "\t" . '<outline text="' . $feed->name () . '" type="rss" xmlUrl="' . $feed->url () . '" htmlUrl="' . $feed->website () . '" description="' . $feed->description () . '" />' . "\n";
|
||||
}
|
||||
|
||||
$txt .= '</outline>' . "\n";
|
||||
@@ -201,7 +201,10 @@ function getFeed ($outline, $cat_id) {
|
||||
$feed->_category ($cat_id);
|
||||
$feed->_name ($title);
|
||||
if (isset($outline['htmlUrl'])) {
|
||||
$feed->_website((string)$outline['htmlUrl']);
|
||||
$feed->_website(htmlspecialchars((string)$outline['htmlUrl'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
if (isset($outline['description'])) {
|
||||
$feed->_description(htmlspecialchars((string)$outline['description'], ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
return $feed;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user