/[web]/planet/common/app/classes/PlanetItem.php
ViewVC logotype

Contents of /planet/common/app/classes/PlanetItem.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1619 - (show annotations) (download)
Mon Aug 13 10:45:23 2012 UTC (11 years, 8 months ago) by dams
File size: 467 byte(s)
- Import moonmoon
- Create repo per langs

1 <?php
2
3 /**
4 * Planet item
5 */
6
7 class PlanetItem
8 {
9 public function __construct($feed, $data)
10 {
11 parent::SimplePie_Item($feed, $data);
12 }
13
14 public function compare($item1, $item2)
15 {
16 $item1_date = $item1->get_date('U');
17 $item2_date = $item2->get_date('U');
18
19 if ($item1_date == $item2_date) {
20 return 0;
21 } elseif ($item1_date < $item2_date) {
22 return 1;
23 }
24
25 return -1;
26 }
27 }

  ViewVC Help
Powered by ViewVC 1.1.30