Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
75debc11
Commit
75debc11
authored
Oct 28, 2013
by
catch
Browse files
Issue
#2115063
by marcingy: Remove drupal_add_feed().
parent
dfd537fe
Changes
5
Hide whitespace changes
Inline
Side-by-side
core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
View file @
75debc11
...
...
@@ -294,10 +294,10 @@ public function categories() {
* The rendered list of items for the feed.
*/
public
function
pageLast
()
{
drupal_add_feed
(
'aggregator/rss'
,
$this
->
config
(
'system.site'
)
->
get
(
'name'
)
.
' '
.
$this
->
t
(
'aggregator'
));
$items
=
$this
->
entityManager
()
->
getStorageController
(
'aggregator_item'
)
->
loadAll
();
return
$this
->
buildPageList
(
$items
);
$build
=
$this
->
buildPageList
(
$items
);
$build
[
'#attached'
][
'drupal_add_feed'
][]
=
array
(
'aggregator/rss'
,
$this
->
config
(
'system.site'
)
->
get
(
'name'
)
.
' '
.
$this
->
t
(
'aggregator'
));
return
$build
;
}
/**
...
...
core/modules/forum/lib/Drupal/forum/Controller/ForumController.php
View file @
75debc11
...
...
@@ -117,10 +117,6 @@ public function forumPage(TermInterface $taxonomy_term) {
// Get forum details.
$taxonomy_term
->
forums
=
$this
->
forumManager
->
getChildren
(
$this
->
config
->
get
(
'vocabulary'
),
$taxonomy_term
->
id
());
$taxonomy_term
->
parents
=
$this
->
forumManager
->
getParents
(
$taxonomy_term
->
id
());
if
(
empty
(
$taxonomy_term
->
forum_container
->
value
))
{
// Add RSS feed for forums.
drupal_add_feed
(
'taxonomy/term/'
.
$taxonomy_term
->
id
()
.
'/feed'
,
'RSS - '
.
$taxonomy_term
->
label
());
}
if
(
empty
(
$taxonomy_term
->
forum_container
->
value
))
{
$topics
=
$this
->
forumManager
->
getTopics
(
$taxonomy_term
->
id
());
...
...
@@ -178,6 +174,9 @@ protected function build($forums, TermInterface $term, $topics = array(), $paren
'#forums_per_page'
=>
$this
->
config
->
get
(
'topics.page_limit'
),
);
$build
[
'#attached'
][
'library'
][]
=
array
(
'forum'
,
'forum.index'
);
if
(
empty
(
$term
->
forum_container
->
value
))
{
$build
[
'#attached'
][
'drupal_add_feed'
][]
=
array
(
'taxonomy/term/'
.
$term
->
id
()
.
'/feed'
,
'RSS - '
.
$term
->
label
());
}
return
$build
;
}
...
...
core/modules/system/lib/Drupal/system/Tests/Common/AddFeedTest.php
View file @
75debc11
...
...
@@ -71,9 +71,11 @@ function testBasicFeedAddNoTitle() {
);
foreach
(
$urls
as
$description
=>
$feed_info
)
{
drupal_add_feed
(
$feed_info
[
'input_url'
],
$feed_info
[
'title'
]);
$build
[
'#attached'
][
'
drupal_add_feed
'
][]
=
array
(
$feed_info
[
'input_url'
],
$feed_info
[
'title'
]);
}
drupal_render
(
$build
);
$this
->
drupalSetContent
(
drupal_get_html_head
());
foreach
(
$urls
as
$description
=>
$feed_info
)
{
$this
->
assertPattern
(
$this
->
urlToRSSLinkPattern
(
$feed_info
[
'output_url'
],
$feed_info
[
'title'
]),
format_string
(
'Found correct feed header for %description'
,
array
(
'%description'
=>
$description
)));
...
...
core/modules/taxonomy/taxonomy.pages.inc
View file @
75debc11
...
...
@@ -19,7 +19,7 @@ function taxonomy_term_page(Term $term) {
// Assign the term name as the page title.
drupal_set_title
(
$term
->
label
());
drupal_add_feed
(
'taxonomy/term/'
.
$term
->
id
()
.
'/feed'
,
'RSS - '
.
$term
->
label
());
$build
[
'#attached'
][
'
drupal_add_feed
'
][]
=
array
(
'taxonomy/term/'
.
$term
->
id
()
.
'/feed'
,
'RSS - '
.
$term
->
label
());
foreach
(
$term
->
uriRelationships
()
as
$rel
)
{
$uri
=
$term
->
uri
(
$rel
);
...
...
core/modules/views/lib/Drupal/views/Plugin/views/style/Rss.php
View file @
75debc11
...
...
@@ -44,7 +44,8 @@ public function attachTo($display_id, $path, $title) {
$url
=
url
(
$this
->
view
->
getUrl
(
NULL
,
$path
),
$url_options
);
if
(
$display
->
hasPath
())
{
if
(
empty
(
$this
->
preview
))
{
drupal_add_feed
(
$url
,
$title
);
$build
[
'#attached'
][
'drupal_add_feed'
][]
=
array
(
$url
,
$title
);
drupal_render
(
$build
);
}
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment