From c89337513c99b657788dd867c06516d6815f5280 Mon Sep 17 00:00:00 2001 From: Alex Barth <alex_b@53995.no-reply.drupal.org> Date: Tue, 20 Oct 2009 21:39:59 +0000 Subject: [PATCH] Remove fetcher to replace it with renamed version. --- plugins/FeedsHttpFetcher.inc | 85 ------------------------------------ 1 file changed, 85 deletions(-) delete mode 100644 plugins/FeedsHttpFetcher.inc diff --git a/plugins/FeedsHttpFetcher.inc b/plugins/FeedsHttpFetcher.inc deleted file mode 100644 index d139abd5..00000000 --- a/plugins/FeedsHttpFetcher.inc +++ /dev/null @@ -1,85 +0,0 @@ -<?php -// $Id$ - -/** - * @file - * Home of the FeedsHTTPFetcher. - * @todo: Use all caps for HTTP. - */ - -/** - * Fetches data via HTTP. - */ -class FeedsHTTPFetcher extends FeedsFetcher { - - /** - * Fetch a resource via http. - * - * @param $resource - * A resource description of type FeedsResource. - * - * @return - * A string from the requested location if successful, or FALSE if not. - */ - public function fetch(FeedsSource $source) { - $source_config = $source->getConfigFor($this); - $url = $source_config['source']; - feeds_include_library('http_request.inc', 'http_request'); - if ($this->config['auto_detect_feeds']) { - $result = http_request_get_common_syndication($url); - } - else { - $result = http_request_get($url); - } - return new FeedsFetcherResult($result->data, 'text/xml'); - } - - /** - * Clear caches. - */ - public function clear(FeedsSource $source) { - $source_config = $source->getConfigFor($this); - $url = $source_config['source']; - feeds_include_library('http_request.inc', 'http_request'); - http_request_clear_cache($url); - } - - /** - * Expose source form. - */ - public function sourceForm($source_config) { - $form = array(); - $form['source'] = array( - '#type' => 'textfield', - '#title' => t('URL'), - '#description' => t('Enter a feed URL.'), - '#default_value' => isset($source_config['source']) ? $source_config['source'] : '', - '#required' => TRUE, - ); - return $form; - } - - /** - * Override parent::configDefaults(). - */ - public function configDefaults() { - return array('auto_detect_feeds' => FALSE); - } - - /** - * Configuration form. - */ - public function configForm(&$form_state) { - $form = array(); - return $form; - // @todo: - $form['auto_detect_feeds'] = array( - '#type' => 'checkbox', - '#title' => t('Auto detect feeds (not tested)'), - '#description' => t('Auto detect RSS or Atom feeds in the downloaded document and use them instead of the given URL.'), - '#default_value' => $this->config['auto_detect_feeds'], - ); - return $form; - } -} - -- GitLab