function aggregator_admin_refresh_feed

Page callback: Refreshes a feed, then redirects to the overview page.

Parameters

$feed: An object describing the feed to be refreshed.

See also

aggregator_menu()

1 string reference to 'aggregator_admin_refresh_feed'
aggregator_menu in drupal/core/modules/aggregator/aggregator.module
Implements hook_menu().

File

drupal/core/modules/aggregator/aggregator.admin.inc, line 442
Admin page callbacks for the aggregator module.

Code

function aggregator_admin_refresh_feed($feed) {

  // @todo CSRF tokens are validated in page callbacks rather than access
  //   callbacks, because access callbacks are also invoked during menu link
  //   generation. Add token support to routing: http://drupal.org/node/755584.
  $token = drupal_container()
    ->get('request')->query
    ->get('token');
  if (!isset($token) || !drupal_valid_token($token, 'aggregator/update/' . $feed->fid)) {
    throw new AccessDeniedHttpException();
  }
  aggregator_refresh($feed);
  drupal_goto('admin/config/services/aggregator');
}