summaryrefslogtreecommitdiff
path: root/modules/aggregator
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-24 17:11:42 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-08-24 17:11:42 +0000
commitc95c99f75157ccf2dd00b21926ed0e45f3478448 (patch)
treed283deb8192ebd9279ababa3981d9760087fe094 /modules/aggregator
parent7d2da906005d844941e7dd639e239c219ed8c086 (diff)
downloadbrdo-c95c99f75157ccf2dd00b21926ed0e45f3478448.tar.gz
brdo-c95c99f75157ccf2dd00b21926ed0e45f3478448.tar.bz2
#535564 follow-up by pwolanin and Gábor Hojtsy: Create 'Web services' category and move Aggregator under there.
Diffstat (limited to 'modules/aggregator')
-rw-r--r--modules/aggregator/aggregator.admin.inc26
-rw-r--r--modules/aggregator/aggregator.api.php22
-rw-r--r--modules/aggregator/aggregator.module46
-rw-r--r--modules/aggregator/aggregator.pages.inc2
-rw-r--r--modules/aggregator/aggregator.test46
5 files changed, 70 insertions, 72 deletions
diff --git a/modules/aggregator/aggregator.admin.inc b/modules/aggregator/aggregator.admin.inc
index c425c6d3c..05efbe151 100644
--- a/modules/aggregator/aggregator.admin.inc
+++ b/modules/aggregator/aggregator.admin.inc
@@ -27,7 +27,7 @@ function aggregator_view() {
$header = array(t('Title'), t('Items'), t('Last update'), t('Next update'), array('data' => t('Operations'), 'colspan' => '3'));
$rows = array();
foreach ($result as $feed) {
- $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/settings/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/settings/aggregator/remove/$feed->fid"), l(t('update items'), "admin/settings/aggregator/update/$feed->fid"));
+ $rows[] = array(l($feed->title, "aggregator/sources/$feed->fid"), format_plural($feed->items, '1 item', '@count items'), ($feed->checked ? t('@time ago', array('@time' => format_interval(REQUEST_TIME - $feed->checked))) : t('never')), ($feed->checked && $feed->refresh ? t('%time left', array('%time' => format_interval($feed->checked + $feed->refresh - REQUEST_TIME))) : t('never')), l(t('edit'), "admin/config/services/aggregator/edit/feed/$feed->fid"), l(t('remove items'), "admin/config/services/aggregator/remove/$feed->fid"), l(t('update items'), "admin/config/services/aggregator/update/$feed->fid"));
}
if (empty($rows)) {
$rows[] = array(array('data' => t('No feeds available. <a href="@link">Add feed</a>.', array('@link' => url('admin/content/aggregator/add/feed'))), 'colspan' => '5', 'class' => array('message')));
@@ -41,10 +41,10 @@ function aggregator_view() {
$header = array(t('Title'), t('Items'), t('Operations'));
$rows = array();
foreach ($result as $category) {
- $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/settings/aggregator/edit/category/$category->cid"));
+ $rows[] = array(l($category->title, "aggregator/categories/$category->cid"), format_plural($category->items, '1 item', '@count items'), l(t('edit'), "admin/config/services/aggregator/edit/category/$category->cid"));
}
if (empty($rows)) {
- $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/content/aggregator/add/category'))), 'colspan' => '5', 'class' => array('message')));
+ $rows[] = array(array('data' => t('No categories available. <a href="@link">Add category</a>.', array('@link' => url('admin/config/services/aggregator/add/category'))), 'colspan' => '5', 'class' => array('message')));
}
$output .= theme('table', $header, $rows);
@@ -169,7 +169,7 @@ function aggregator_form_feed_submit($form, &$form_state) {
if (isset($form_state['values']['title'])) {
drupal_set_message(t('The feed %feed has been updated.', array('%feed' => $form_state['values']['title'])));
if (arg(0) == 'admin') {
- $form_state['redirect'] = 'admin/settings/aggregator/';
+ $form_state['redirect'] = 'admin/config/services/aggregator/';
return;
}
else {
@@ -181,7 +181,7 @@ function aggregator_form_feed_submit($form, &$form_state) {
watchdog('aggregator', 'Feed %feed deleted.', array('%feed' => $title));
drupal_set_message(t('The feed %feed has been deleted.', array('%feed' => $title)));
if (arg(0) == 'admin') {
- $form_state['redirect'] = 'admin/settings/aggregator/';
+ $form_state['redirect'] = 'admin/config/services/aggregator/';
return;
}
else {
@@ -191,7 +191,7 @@ function aggregator_form_feed_submit($form, &$form_state) {
}
}
else {
- watchdog('aggregator', 'Feed %feed added.', array('%feed' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/aggregator'));
+ watchdog('aggregator', 'Feed %feed added.', array('%feed' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/config/services/aggregator'));
drupal_set_message(t('The feed %feed has been added.', array('%feed' => $form_state['values']['title'])));
}
}
@@ -205,7 +205,7 @@ function aggregator_admin_remove_feed($form_state, $feed) {
),
),
t('Are you sure you want to remove all items from the feed %feed?', array('%feed' => $feed->title)),
- 'admin/settings/aggregator',
+ 'admin/config/services/aggregator',
t('This action cannot be undone.'),
t('Remove items'),
t('Cancel')
@@ -220,7 +220,7 @@ function aggregator_admin_remove_feed($form_state, $feed) {
*/
function aggregator_admin_remove_feed_submit($form, &$form_state) {
aggregator_remove($form_state['values']['feed']);
- $form_state['redirect'] = 'admin/settings/aggregator';
+ $form_state['redirect'] = 'admin/config/services/aggregator';
}
/**
@@ -339,7 +339,7 @@ function aggregator_form_opml_submit($form, &$form_state) {
drupal_form_submit('aggregator_form_feed', $form_state);
}
- $form_state['redirect'] = 'admin/settings/aggregator';
+ $form_state['redirect'] = 'admin/config/services/aggregator';
}
/**
@@ -382,7 +382,7 @@ function _aggregator_parse_opml($opml) {
*/
function aggregator_admin_refresh_feed($feed) {
aggregator_refresh($feed);
- drupal_goto('admin/settings/aggregator');
+ drupal_goto('admin/config/services/aggregator');
}
/**
@@ -551,7 +551,7 @@ function aggregator_form_category_submit($form, &$form_state) {
if (isset($form_state['values']['title'])) {
drupal_set_message(t('The category %category has been updated.', array('%category' => $form_state['values']['title'])));
if (arg(0) == 'admin') {
- $form_state['redirect'] = 'admin/settings/aggregator/';
+ $form_state['redirect'] = 'admin/config/services/aggregator/';
return;
}
else {
@@ -563,7 +563,7 @@ function aggregator_form_category_submit($form, &$form_state) {
watchdog('aggregator', 'Category %category deleted.', array('%category' => $title));
drupal_set_message(t('The category %category has been deleted.', array('%category' => $title)));
if (arg(0) == 'admin') {
- $form_state['redirect'] = 'admin/settings/aggregator/';
+ $form_state['redirect'] = 'admin/config/services/aggregator/';
return;
}
else {
@@ -573,7 +573,7 @@ function aggregator_form_category_submit($form, &$form_state) {
}
}
else {
- watchdog('aggregator', 'Category %category added.', array('%category' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/settings/aggregator'));
+ watchdog('aggregator', 'Category %category added.', array('%category' => $form_state['values']['title']), WATCHDOG_NOTICE, l(t('view'), 'admin/config/services/aggregator'));
drupal_set_message(t('The category %category has been added.', array('%category' => $form_state['values']['title'])));
}
}
diff --git a/modules/aggregator/aggregator.api.php b/modules/aggregator/aggregator.api.php
index 87ec5dfca..cdf57b752 100644
--- a/modules/aggregator/aggregator.api.php
+++ b/modules/aggregator/aggregator.api.php
@@ -21,7 +21,7 @@
* data.
*
* Modules that define this hook can be set as active fetcher on
- * admin/settings/aggregator. Only one fetcher can be active at a time.
+ * admin/config/services/aggregator. Only one fetcher can be active at a time.
*
* @param $feed
* The $feed object that describes the resource to be downloaded.
@@ -43,7 +43,7 @@ function hook_aggregator_fetch($feed) {
* fetcher.
*
* The title and the description provided are shown on
- * admin/settings/aggregator among other places. Use as title the human
+ * admin/config/services/aggregator among other places. Use as title the human
* readable name of the fetcher and as description a brief (40 to 80 characters)
* explanation of the fetcher's functionality.
*
@@ -75,7 +75,7 @@ function hook_aggregator_fetch_info() {
* data.
*
* Modules that define this hook can be set as active parser on
- * admin/settings/aggregator. Only one parser can be active at a time.
+ * admin/config/services/aggregator. Only one parser can be active at a time.
*
* @param $feed
* The $feed object that describes the resource to be parsed.
@@ -108,10 +108,10 @@ function hook_aggregator_parse($feed) {
* Implement this hook to expose the title and a short description of your
* parser.
*
- * The title and the description provided are shown on admin/settings/aggregator
- * among other places. Use as title the human readable name of the parser and
- * as description a brief (40 to 80 characters) explanation of the parser's
- * functionality.
+ * The title and the description provided are shown on
+ * admin/config/services/aggregator among other places. Use as title the human
+ * readable name of the parser and as description a brief (40 to 80 characters)
+ * explanation of the parser's functionality.
*
* This hook is only called if your module implements hook_aggregator_parse().
* If this hook is not implemented aggregator will use your module's file name
@@ -141,7 +141,7 @@ function hook_aggregator_parse_info() {
* data.
*
* Modules that define this hook can be activated as processor on
- * admin/settings/aggregator.
+ * admin/config/services/aggregator.
*
* @param $feed
* The $feed object that describes the resource to be processed. $feed->items
@@ -167,9 +167,9 @@ function hook_aggregator_process($feed) {
* processor.
*
* The title and the description provided are shown most importantly on
- * admin/settings/aggregator. Use as title the natural name of the processor
- * and as description a brief (40 to 80 characters) explanation of the
- * functionality.
+ * admin/config/services/aggregator. Use as title the natural name of the
+ * processor and as description a brief (40 to 80 characters) explanation of
+ * the functionality.
*
* This hook is only called if your module implements
* hook_aggregator_process(). If this hook is not implemented aggregator
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 89664ceec..9ec19be48 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -18,18 +18,18 @@ function aggregator_help($path, $arg) {
switch ($path) {
case 'admin/help#aggregator':
$output = '<p>' . t('The aggregator is a powerful on-site syndicator and news reader that gathers fresh content from RSS-, RDF-, and Atom-based feeds made available across the web. Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include <a href="@rss">RSS</a>, <a href="@rdf">RDF</a>, and <a href="@atom">Atom</a>.', array('@rss' => 'http://cyber.law.harvard.edu/rss/', '@rdf' => 'http://www.w3.org/RDF/', '@atom' => 'http://www.atomenabled.org')) . '</p>';
- $output .= '<p>' . t('Feeds contain feed items, or individual posts published by the site providing the feed. Feeds may be grouped in categories, generally by topic. Users view feed items in the <a href="@aggregator">main aggregator display</a> or by <a href="@aggregator-sources">their source</a>. Administrators can <a href="@feededit">add, edit and delete feeds</a> and choose how often to check each feed for newly updated items. The most recent items in either a feed or category can be displayed as a block through the <a href="@admin-block">blocks administration page</a>. A <a href="@aggregator-opml">machine-readable OPML file</a> of all feeds is available. A correctly configured <a href="@cron">cron maintenance task</a> is required to update feeds automatically.', array('@aggregator' => url('aggregator'), '@aggregator-sources' => url('aggregator/sources'), '@feededit' => url('admin/settings/aggregator'), '@admin-block' => url('admin/structure/block'), '@aggregator-opml' => url('aggregator/opml'), '@cron' => url('admin/reports/status'))) . '</p>';
+ $output .= '<p>' . t('Feeds contain feed items, or individual posts published by the site providing the feed. Feeds may be grouped in categories, generally by topic. Users view feed items in the <a href="@aggregator">main aggregator display</a> or by <a href="@aggregator-sources">their source</a>. Administrators can <a href="@feededit">add, edit and delete feeds</a> and choose how often to check each feed for newly updated items. The most recent items in either a feed or category can be displayed as a block through the <a href="@admin-block">blocks administration page</a>. A <a href="@aggregator-opml">machine-readable OPML file</a> of all feeds is available. A correctly configured <a href="@cron">cron maintenance task</a> is required to update feeds automatically.', array('@aggregator' => url('aggregator'), '@aggregator-sources' => url('aggregator/sources'), '@feededit' => url('admin/config/services/aggregator'), '@admin-block' => url('admin/structure/block'), '@aggregator-opml' => url('aggregator/opml'), '@cron' => url('admin/reports/status'))) . '</p>';
$output .= '<p>' . t('For more information, see the online handbook entry for <a href="@aggregator">Aggregator module</a>.', array('@aggregator' => 'http://drupal.org/handbook/modules/aggregator/')) . '</p>';
return $output;
- case 'admin/settings/aggregator':
+ case 'admin/config/services/aggregator':
$output = '<p>' . t('Thousands of sites (particularly news sites and blogs) publish their latest headlines and posts in feeds, using a number of standardized XML-based formats. Formats supported by the aggregator include <a href="@rss">RSS</a>, <a href="@rdf">RDF</a>, and <a href="@atom">Atom</a>.', array('@rss' => 'http://cyber.law.harvard.edu/rss/', '@rdf' => 'http://www.w3.org/RDF/', '@atom' => 'http://www.atomenabled.org')) . '</p>';
- $output .= '<p>' . t('Current feeds are listed below, and <a href="@addfeed">new feeds may be added</a>. For each feed or feed category, the <em>latest items</em> block may be enabled at the <a href="@block">blocks administration page</a>.', array('@addfeed' => url('admin/settings/aggregator/add/feed'), '@block' => url('admin/structure/block'))) . '</p>';
+ $output .= '<p>' . t('Current feeds are listed below, and <a href="@addfeed">new feeds may be added</a>. For each feed or feed category, the <em>latest items</em> block may be enabled at the <a href="@block">blocks administration page</a>.', array('@addfeed' => url('admin/config/services/aggregator/add/feed'), '@block' => url('admin/structure/block'))) . '</p>';
return $output;
- case 'admin/settings/aggregator/add/feed':
+ case 'admin/config/services/aggregator/add/feed':
return '<p>' . t('Add a feed in RSS, RDF or Atom format. A feed may only have one entry.') . '</p>';
- case 'admin/settings/aggregator/add/category':
+ case 'admin/config/services/aggregator/add/category':
return '<p>' . t('Categories allow feed items from different feeds to be grouped together. For example, several sport-related feeds may belong to a category named <em>Sports</em>. Feed items may be grouped automatically (by selecting a category when creating or editing a feed) or manually (via the <em>Categorize</em> page available from feed item listings). Each category provides its own feed page and block.') . '</p>';
- case 'admin/settings/aggregator/add/opml':
+ case 'admin/config/services/aggregator/add/opml':
return '<p>' . t('<acronym title="Outline Processor Markup Language">OPML</acronym> is an XML format used to exchange multiple feeds between aggregators. A single OPML document may contain a collection of many feeds. Drupal can parse such a file and import all feeds at once, saving you the effort of adding them manually. You may either upload a local file from your computer or enter a URL where Drupal can download it.') . '</p>';
}
}
@@ -86,67 +86,65 @@ function aggregator_theme() {
* Implement hook_menu().
*/
function aggregator_menu() {
- $items['admin/settings/aggregator'] = array(
+ $items['admin/config/services/aggregator'] = array(
'title' => 'Feed aggregator',
'description' => "Configure which content your site aggregates from other sites, how often it polls them, and how they're categorized.",
'page callback' => 'aggregator_admin_overview',
'access arguments' => array('administer news feeds'),
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/add/feed'] = array(
+ $items['admin/config/services/aggregator/add/feed'] = array(
'title' => 'Add feed',
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_feed'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_ACTION,
- 'parent' => 'admin/settings/aggregator',
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/add/category'] = array(
+ $items['admin/config/services/aggregator/add/category'] = array(
'title' => 'Add category',
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_category'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_ACTION,
- 'parent' => 'admin/settings/aggregator',
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/add/opml'] = array(
+ $items['admin/config/services/aggregator/add/opml'] = array(
'title' => 'Import OPML',
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_form_opml'),
'access arguments' => array('administer news feeds'),
'type' => MENU_LOCAL_ACTION,
- 'parent' => 'admin/settings/aggregator',
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/remove/%aggregator_feed'] = array(
+ $items['admin/config/services/aggregator/remove/%aggregator_feed'] = array(
'title' => 'Remove items',
'page callback' => 'drupal_get_form',
- 'page arguments' => array('aggregator_admin_remove_feed', 4),
+ 'page arguments' => array('aggregator_admin_remove_feed', 5),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/update/%aggregator_feed'] = array(
+ $items['admin/config/services/aggregator/update/%aggregator_feed'] = array(
'title' => 'Update items',
'page callback' => 'aggregator_admin_refresh_feed',
- 'page arguments' => array(4),
+ 'page arguments' => array(5),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/list'] = array(
+ $items['admin/config/services/aggregator/list'] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
- $items['admin/settings/aggregator'] = array(
- 'title' => 'Aggregator',
+ $items['admin/config/services/aggregator/settings'] = array(
+ 'title' => 'Settings',
'description' => 'Configure the behavior of the feed aggregator, including when to discard feed items and how to present feed items and categories.',
'page callback' => 'drupal_get_form',
'page arguments' => array('aggregator_admin_form'),
'access arguments' => array('administer news feeds'),
+ 'type' => MENU_LOCAL_TASK,
'file' => 'aggregator.admin.inc',
);
$items['aggregator'] = array(
@@ -242,18 +240,18 @@ function aggregator_menu() {
'weight' => 1,
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/edit/feed/%aggregator_feed'] = array(
+ $items['admin/config/services/aggregator/edit/feed/%aggregator_feed'] = array(
'title' => 'Edit feed',
'page callback' => 'drupal_get_form',
- 'page arguments' => array('aggregator_form_feed', 5),
+ 'page arguments' => array('aggregator_form_feed', 6),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
);
- $items['admin/settings/aggregator/edit/category/%aggregator_category'] = array(
+ $items['admin/config/services/aggregator/edit/category/%aggregator_category'] = array(
'title' => 'Edit category',
'page callback' => 'drupal_get_form',
- 'page arguments' => array('aggregator_form_category', 5),
+ 'page arguments' => array('aggregator_form_category', 6),
'access arguments' => array('administer news feeds'),
'type' => MENU_CALLBACK,
'file' => 'aggregator.admin.inc',
diff --git a/modules/aggregator/aggregator.pages.inc b/modules/aggregator/aggregator.pages.inc
index 463872c10..35583b327 100644
--- a/modules/aggregator/aggregator.pages.inc
+++ b/modules/aggregator/aggregator.pages.inc
@@ -499,6 +499,6 @@ function template_preprocess_aggregator_feed_source(&$variables) {
}
if (user_access('administer news feeds')) {
- $variables['last_checked'] = l($variables['last_checked'], 'admin/settings/aggregator');
+ $variables['last_checked'] = l($variables['last_checked'], 'admin/config/services/aggregator');
}
}
diff --git a/modules/aggregator/aggregator.test b/modules/aggregator/aggregator.test
index c0b59b3cd..b8ea4120f 100644
--- a/modules/aggregator/aggregator.test
+++ b/modules/aggregator/aggregator.test
@@ -14,7 +14,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
}
/**
- * Create an aggregator feed (simulate form submission on admin/settings/aggregator/add/feed).
+ * Create an aggregator feed (simulate form submission on admin/config/services/aggregator/add/feed).
*
* @param $feed_url
* If given, feed will be created with this URL, otherwise /rss.xml will be used.
@@ -25,7 +25,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
*/
function createFeed($feed_url = NULL) {
$edit = $this->getFeedEditArray($feed_url);
- $this->drupalPost('admin/settings/aggregator/add/feed', $edit, t('Save'));
+ $this->drupalPost('admin/config/services/aggregator/add/feed', $edit, t('Save'));
$this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title'])));
$feed = db_query("SELECT * FROM {aggregator_feed} WHERE title = :title AND url = :url", array(':title' => $edit['title'], ':url' => $edit['url']))->fetch();
@@ -40,7 +40,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
* Feed object representing the feed.
*/
function deleteFeed($feed) {
- $this->drupalPost('admin/settings/aggregator/edit/feed/' . $feed->fid, array(), t('Delete'));
+ $this->drupalPost('admin/config/services/aggregator/edit/feed/' . $feed->fid, array(), t('Delete'));
$this->assertRaw(t('The feed %title has been deleted.', array('%title' => $feed->title)), t('Feed deleted successfully.'));
}
@@ -81,7 +81,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
}
/**
- * Update feed items (simulate click to admin/settings/aggregator/update/$fid).
+ * Update feed items (simulate click to admin/config/services/aggregator/update/$fid).
*
* @param $feed
* Feed object representing the feed.
@@ -94,7 +94,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
$this->assertResponse(200, t('!url is reachable.', array('!url' => $feed->url)));
// Refresh the feed (simulated link click).
- $this->drupalGet('admin/settings/aggregator/update/' . $feed->fid);
+ $this->drupalGet('admin/config/services/aggregator/update/' . $feed->fid);
// Ensure we have the right number of items.
$result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid));
@@ -114,7 +114,7 @@ class AggregatorTestCase extends DrupalWebTestCase {
* Feed object representing the feed.
*/
function removeFeedItems($feed) {
- $this->drupalPost('admin/settings/aggregator/remove/' . $feed->fid, array(), t('Remove items'));
+ $this->drupalPost('admin/config/services/aggregator/remove/' . $feed->fid, array(), t('Remove items'));
$this->assertRaw(t('The news items from %title have been removed.', array('%title' => $feed->title)), t('Feed items removed.'));
}
@@ -275,7 +275,7 @@ class AddFeedTestCase extends AggregatorTestCase {
$feed = $this->createFeed();
// Check feed data.
- $this->assertEqual($this->getUrl(), url('admin/settings/aggregator/add/feed', array('absolute' => TRUE)), t('Directed to correct url.'));
+ $this->assertEqual($this->getUrl(), url('admin/config/services/aggregator/add/feed', array('absolute' => TRUE)), t('Directed to correct url.'));
$this->assertTrue($this->uniqueFeed($feed->title, $feed->url), t('The feed is unique.'));
// Check feed source.
@@ -311,11 +311,11 @@ class UpdateFeedTestCase extends AggregatorTestCase {
if (isset($feed->{$same_field})) {
$edit[$same_field] = $feed->{$same_field};
}
- $this->drupalPost('admin/settings/aggregator/edit/feed/' . $feed->fid, $edit, t('Save'));
+ $this->drupalPost('admin/config/services/aggregator/edit/feed/' . $feed->fid, $edit, t('Save'));
$this->assertRaw(t('The feed %name has been updated.', array('%name' => $edit['title'])), t('The feed %name has been updated.', array('%name' => $edit['title'])));
// Check feed data.
- $this->assertEqual($this->getUrl(), url('admin/settings/aggregator/', array('absolute' => TRUE)));
+ $this->assertEqual($this->getUrl(), url('admin/config/services/aggregator/', array('absolute' => TRUE)));
$this->assertTrue($this->uniqueFeed($edit['title'], $edit['url']), t('The feed is unique.'));
// Check feed source.
@@ -368,7 +368,7 @@ class UpdateFeedItemTestCase extends AggregatorTestCase {
}
/**
- * Test running "update items" from the 'admin/settings/aggregator' page.
+ * Test running "update items" from the 'admin/config/services/aggregator' page.
*/
function testUpdateFeedItem() {
$this->createSampleNodes();
@@ -392,11 +392,11 @@ class UpdateFeedItemTestCase extends AggregatorTestCase {
$this->drupalGet($edit['url']);
$this->assertResponse(array(200), t('URL !url is accessible', array('!url' => $edit['url'])));
- $this->drupalPost('admin/settings/aggregator/add/feed', $edit, t('Save'));
+ $this->drupalPost('admin/config/services/aggregator/add/feed', $edit, t('Save'));
$this->assertRaw(t('The feed %name has been added.', array('%name' => $edit['title'])), t('The feed !name has been added.', array('!name' => $edit['title'])));
$feed = db_query("SELECT * FROM {aggregator_feed} WHERE url = :url", array(':url' => $edit['url']))->fetchObject();
- $this->drupalGet('admin/settings/aggregator/update/' . $feed->fid);
+ $this->drupalGet('admin/config/services/aggregator/update/' . $feed->fid);
$before = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField();
@@ -411,7 +411,7 @@ class UpdateFeedItemTestCase extends AggregatorTestCase {
'modified' => 0,
))
->execute();
- $this->drupalGet('admin/settings/aggregator/update/' . $feed->fid);
+ $this->drupalGet('admin/config/services/aggregator/update/' . $feed->fid);
$after = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', array(':fid' => $feed->fid))->fetchField();
@@ -429,7 +429,7 @@ class RemoveFeedItemTestCase extends AggregatorTestCase {
}
/**
- * Test running "remove items" from the 'admin/settings/aggregator' page.
+ * Test running "remove items" from the 'admin/config/services/aggregator' page.
*/
function testRemoveFeedItem() {
// Create a bunch of test feeds.
@@ -473,9 +473,9 @@ class CategorizeFeedItemTestCase extends AggregatorTestCase {
function testCategorizeFeedItem() {
$this->createSampleNodes();
- // Simulate form submission on "admin/settings/aggregator/add/category".
+ // Simulate form submission on "admin/config/services/aggregator/add/category".
$edit = array('title' => $this->randomName(10), 'description' => '');
- $this->drupalPost('admin/settings/aggregator/add/category', $edit, t('Save'));
+ $this->drupalPost('admin/config/services/aggregator/add/category', $edit, t('Save'));
$this->assertRaw(t('The category %title has been added.', array('%title' => $edit['title'])), t('The category %title has been added.', array('%title' => $edit['title'])));
$category = db_query("SELECT * FROM {aggregator_category} WHERE title = :title", array(':title' => $edit['title']))->fetch();
@@ -537,7 +537,7 @@ class ImportOPMLTestCase extends AggregatorTestCase {
))
->execute();
- $this->drupalGet('admin/settings/aggregator/add/opml');
+ $this->drupalGet('admin/config/services/aggregator/add/opml');
$this->assertText('A single OPML document may contain a collection of many feeds.', t('Looking for help text.'));
$this->assertFieldByName('files[upload]', '', t('Looking for file upload field.'));
$this->assertFieldByName('remote', '', t('Looking for remote URL field.'));
@@ -552,7 +552,7 @@ class ImportOPMLTestCase extends AggregatorTestCase {
$before = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
$form = array();
- $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import'));
+ $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
$this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), t('Error if no fields are filled.'));
$path = $this->getEmptyOpml();
@@ -560,11 +560,11 @@ class ImportOPMLTestCase extends AggregatorTestCase {
'files[upload]' => $path,
'remote' => file_create_url($path),
);
- $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import'));
+ $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
$this->assertRaw(t('You must <em>either</em> upload a file or enter a URL.'), t('Error if both fields are filled.'));
$form = array('remote' => 'invalidUrl://empty');
- $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import'));
+ $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
$this->assertText(t('This URL is not valid.'), t('Error if the URL is invalid.'));
$after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
@@ -578,11 +578,11 @@ class ImportOPMLTestCase extends AggregatorTestCase {
$before = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
$form['files[upload]'] = $this->getInvalidOpml();
- $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import'));
+ $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
$this->assertText(t('No new feed has been added.'), t('Attempting to upload invalid XML.'));
$form = array('remote' => file_create_url($this->getEmptyOpml()));
- $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import'));
+ $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
$this->assertText(t('No new feed has been added.'), t('Attempting to load empty OPML from remote URL.'));
$after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField();
@@ -609,7 +609,7 @@ class ImportOPMLTestCase extends AggregatorTestCase {
'refresh' => '900',
'category[1]' => $category,
);
- $this->drupalPost('admin/settings/aggregator/add/opml', $form, t('Import'));
+ $this->drupalPost('admin/config/services/aggregator/add/opml', $form, t('Import'));
$this->assertRaw(t('A feed with the URL %url already exists.', array('%url' => $feeds[0]['url'])), t('Verifying that a duplicate URL was identified'));
$this->assertRaw(t('A feed named %title already exists.', array('%title' => $feeds[1]['title'])), t('Verifying that a duplicate title was identified'));