Projet

Général

Profil

Révision ed9a13f1

Ajouté par Assos Assos il y a presque 4 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/feeds/plugins/FeedsSimplePieParser.inc
15 15
  /**
16 16
   * Constructor requires SimplePie enclosure object.
17 17
   */
18
  function __construct(SimplePie_Enclosure $enclosure) {
18
  public function __construct(SimplePie_Enclosure $enclosure) {
19 19
    $this->simplepie_enclosure = $enclosure;
20 20
  }
21 21

  
......
34 34
   *
35 35
   * Ensure that the simplepie class definitions are loaded for the enclosure when unserializing.
36 36
   */
37
   public function __wakeup() {
38
     feeds_include_simplepie();
39
     $this->simplepie_enclosure = unserialize($this->_serialized_simplepie_enclosure);
37
  public function __wakeup() {
38
    feeds_include_simplepie();
39
    $this->simplepie_enclosure = unserialize($this->_serialized_simplepie_enclosure);
40 40
  }
41 41

  
42 42
  /**
......
78 78
    $parser->set_cache_location($this->cacheDirectory());
79 79
    $parser->init();
80 80

  
81
    // Construct the standard form of the parsed feed
81
    // Construct the standard form of the parsed feed.
82 82
    $result = new FeedsParserResult();
83 83
    $result->title = html_entity_decode(($title = $parser->get_title()) ? $title : $this->createTitle($parser->get_description()));
84 84
    $result->description = $parser->get_description();
......
105 105
      $item['author_name'] = isset($author->name) ? html_entity_decode($author->name) : '';
106 106
      $item['author_link'] = isset($author->link) ? $author->link : '';
107 107
      $item['author_email'] = isset($author->email) ? $author->email : '';
108
      // Enclosures
108
      // Enclosures.
109 109
      $enclosures = $simplepie_item->get_enclosures();
110 110
      if (is_array($enclosures)) {
111 111
        foreach ($enclosures as $enclosure) {
112 112
          $item['enclosures'][] = new FeedsSimplePieEnclosure($enclosure);
113 113
        }
114 114
      }
115
      // Location
115
      // Location.
116 116
      $latitude = $simplepie_item->get_latitude();
117 117
      $longitude = $simplepie_item->get_longitude();
118 118
      if (!is_null($latitude) && !is_null($longitude)) {
119 119
        $item['location_latitude'][] = $latitude;
120 120
        $item['location_longitude'][] = $longitude;
121 121
      }
122
      // Extract tags related to the item
122
      // Extract tags related to the item.
123 123
      $simplepie_tags = $simplepie_item->get_categories();
124 124
      $tags = array();
125 125
      $domains = array();

Formats disponibles : Unified diff