Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
309
Merge Requests
309
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
22d46a60
Commit
22d46a60
authored
Mar 17, 2013
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1940306
by dawehner: Convert the node RSS feed to a display of the frontpage view.
parent
7690b07b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
39 additions
and
54 deletions
+39
-54
core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
...r/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
+4
-7
core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
...egator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
+1
-1
core/modules/comment/lib/Drupal/comment/Tests/CommentRssTest.php
...dules/comment/lib/Drupal/comment/Tests/CommentRssTest.php
+8
-0
core/modules/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php
...es/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php
+7
-0
core/modules/node/config/views.view.frontpage.yml
core/modules/node/config/views.view.frontpage.yml
+13
-3
core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php
core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php
+0
-31
core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php
...modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php
+1
-1
core/modules/node/node.module
core/modules/node/node.module
+3
-9
core/modules/system/config/system.rss.yml
core/modules/system/config/system.rss.yml
+1
-1
core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php
core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php
+1
-1
No files found.
core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorRenderingTest.php
View file @
22d46a60
...
...
@@ -81,9 +81,10 @@ public function testBlockLinks() {
public
function
testFeedPage
()
{
// Increase the number of items published in the rss.xml feed so we have
// enough articles to test paging.
$config
=
config
(
'system.rss'
);
$config
->
set
(
'items.limit'
,
30
);
$config
->
save
();
$view
=
entity_load
(
'view'
,
'frontpage'
);
$display
=
&
$view
->
getDisplay
(
'feed_1'
);
$display
[
'display_options'
][
'pager'
][
'options'
][
'items_per_page'
]
=
30
;
$view
->
save
();
// Create a feed with 30 items.
$this
->
createSampleNodes
(
30
);
...
...
@@ -94,9 +95,5 @@ public function testFeedPage() {
$this
->
drupalGet
(
'aggregator/sources/'
.
$feed
->
id
());
$elements
=
$this
->
xpath
(
"//ul[@class=:class]"
,
array
(
':class'
=>
'pager'
));
$this
->
assertTrue
(
!
empty
(
$elements
),
'Individual source page contains a pager.'
);
// Reset the number of items in rss.xml to the default value.
$config
->
set
(
'items.limit'
,
10
);
$config
->
save
();
}
}
core/modules/aggregator/lib/Drupal/aggregator/Tests/AggregatorTestBase.php
View file @
22d46a60
...
...
@@ -20,7 +20,7 @@ abstract class AggregatorTestBase extends WebTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'node'
,
'aggregator'
,
'aggregator_test'
);
public
static
$modules
=
array
(
'node'
,
'aggregator'
,
'aggregator_test'
,
'views'
);
function
setUp
()
{
parent
::
setUp
();
...
...
core/modules/comment/lib/Drupal/comment/Tests/CommentRssTest.php
View file @
22d46a60
...
...
@@ -11,6 +11,14 @@
* Tests for Comment module integration with RSS feeds.
*/
class
CommentRssTest
extends
CommentTestBase
{
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
array
(
'views'
);
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Comment RSS'
,
...
...
core/modules/file/lib/Drupal/file/Tests/FileFieldRSSContentTest.php
View file @
22d46a60
...
...
@@ -12,6 +12,13 @@
*/
class
FileFieldRSSContentTest
extends
FileFieldTestBase
{
/**
* Modules to enable.
*
* @var array
*/
public
static
$modules
=
array
(
'node'
,
'views'
);
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'File field RSS content'
,
...
...
core/modules/node/config/views.view.frontpage.yml
View file @
22d46a60
langcode
:
en
status
:
'
1'
base_field
:
nid
base_table
:
node
core
:
8.x
description
:
'
A
list
of
nodes
marked
for
display
on
the
front
page.'
status
:
'
1'
display
:
default
:
display_options
:
...
...
@@ -138,8 +137,19 @@ display:
display_title
:
Page
id
:
page_1
position
:
{
}
feed_1
:
display_plugin
:
feed
id
:
feed_1
display_title
:
Feed
position
:
'
'
display_options
:
sitename_title
:
'
1'
path
:
rss.xml
displays
:
page_1
:
page_1
default
:
'
0'
human_name
:
Frontpage
langcode
:
und
module
:
node
id
:
frontpage
tag
:
'
'
langcode
:
en
core/modules/node/lib/Drupal/node/Tests/NodeFeedTest.php
deleted
100644 → 0
View file @
7690b07b
<?php
/**
* @file
* Definition of Drupal\node\Tests\NodeFeedTest.
*/
namespace
Drupal\node\Tests
;
use
Drupal\simpletest\WebTestBase
;
/**
* Test the node_feed() functionality.
*/
class
NodeFeedTest
extends
WebTestBase
{
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Node feed'
,
'description'
=>
'Ensures that node_feed() functions correctly.'
,
'group'
=>
'Node'
,
);
}
/**
* Ensures that node_feed() accepts and prints extra channel elements.
*/
function
testNodeFeedExtraChannelElements
()
{
$response
=
node_feed
(
array
(),
array
(
'copyright'
=>
'Drupal is a registered trademark of Dries Buytaert.'
));
$this
->
assertTrue
(
strpos
(
$response
->
getContent
(),
'<copyright>Drupal is a registered trademark of Dries Buytaert.</copyright>'
)
!==
FALSE
);
}
}
core/modules/node/lib/Drupal/node/Tests/NodeRSSContentTest.php
View file @
22d46a60
...
...
@@ -21,7 +21,7 @@ class NodeRSSContentTest extends NodeTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'node_test'
);
public
static
$modules
=
array
(
'node_test'
,
'views'
);
public
static
function
getInfo
()
{
return
array
(
...
...
core/modules/node/node.module
View file @
22d46a60
...
...
@@ -1719,15 +1719,6 @@ function node_menu() {
'access callback'
=>
'_node_add_access'
,
'file'
=>
'node.pages.inc'
,
);
$items
[
'rss.xml'
]
=
array
(
'title'
=>
'RSS feed'
,
'page callback'
=>
'node_feed'
,
// Pass a FALSE and array argument to ensure that additional path components
// are not passed to node_feed().
'page arguments'
=>
array
(
FALSE
,
array
()),
'access arguments'
=>
array
(
'access content'
),
'type'
=>
MENU_CALLBACK
,
);
$items
[
'node/add/%node_type'
]
=
array
(
'title callback'
=>
'node_type_get_clean_name'
,
'title arguments'
=>
array
(
2
),
...
...
@@ -2075,6 +2066,9 @@ function node_block_access($block) {
* @link http://cyber.law.harvard.edu/rss/rss.html RSS 2.0 Specification. @endlink
* The link should be an absolute URL.
*
* @todo Convert taxonomy_term_feed() to a view, so this method is not needed
* anymore.
*
* @return Symfony\Component\HttpFoundation\Response
* A response object.
*
...
...
core/modules/system/config/system.rss.yml
View file @
22d46a60
...
...
@@ -2,4 +2,4 @@ channel:
description
:
'
'
items
:
limit
:
'
10'
view_mode
:
fulltext
view_mode
:
rss
core/modules/taxonomy/lib/Drupal/taxonomy/Tests/RssTest.php
View file @
22d46a60
...
...
@@ -17,7 +17,7 @@ class RssTest extends TaxonomyTestBase {
*
* @var array
*/
public
static
$modules
=
array
(
'node'
,
'field_ui'
);
public
static
$modules
=
array
(
'node'
,
'field_ui'
,
'views'
);
public
static
function
getInfo
()
{
return
array
(
...
...
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