~ubuntu-branches/ubuntu/karmic/dokuwiki/karmic

« back to all changes in this revision

Viewing changes to inc/FeedParser.php

  • Committer: Bazaar Package Importer
  • Author(s): Mohammed Adnène Trojette
  • Date: 2007-03-29 19:44:52 UTC
  • mfrom: (2.1.6 feisty)
  • Revision ID: james.westby@ubuntu.com-20070329194452-8r2w798oo21ago6l
Tags: 0.0.20061106-6
* High-urgency upload for fixing RC bug.
* Make fr.po's translation of "global" consistent. (Closes: #416509)
* Remove /etc/apache*/conf.d/ on purge. (Closes: #387974)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Class used to parse RSS and ATOM feeds
 
4
 *
 
5
 * @author Andreas Gohr <andi@splitbrain.org>
 
6
 */
 
7
 
 
8
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
 
9
require_once(DOKU_INC.'inc/HTTPClient.php');
 
10
require_once(DOKU_INC.'inc/SimplePie.php');
 
11
 
 
12
 
 
13
/**
 
14
 * We override some methods of the original SimplePie class here
 
15
 */
 
16
class FeedParser extends SimplePie {
 
17
 
 
18
    /**
 
19
     * Constructor. Set some defaults
 
20
     */
 
21
    function FeedParser(){
 
22
        $this->SimplePie();
 
23
        $this->caching = false;
 
24
    }
 
25
 
 
26
    /**
 
27
     * Fetch an URL using our own HTTPClient
 
28
     *
 
29
     * Overrides SimplePie's own method
 
30
     */
 
31
    function get_file($url){
 
32
        $http = new DokuHTTPClient();
 
33
        return $http->get($url,true);
 
34
    }
 
35
}