summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMaurice Svay <maurice@svay.com>2012-04-10 10:52:33 +0200
committerMaurice Svay <maurice@svay.com>2012-04-10 10:52:33 +0200
commitd833337ba7868426c7871c5d0c545347207d7098 (patch)
tree1b4610adb895bb339d70521caf9b7157e758bd32 /app
parentba9e610d05a0a025ed3ee9a451fe2734ac212234 (diff)
downloadplanet-d833337ba7868426c7871c5d0c545347207d7098.tar
planet-d833337ba7868426c7871c5d0c545347207d7098.tar.gz
planet-d833337ba7868426c7871c5d0c545347207d7098.tar.bz2
planet-d833337ba7868426c7871c5d0c545347207d7098.tar.xz
planet-d833337ba7868426c7871c5d0c545347207d7098.zip
Rename $person to $feed
Diffstat (limited to 'app')
-rw-r--r--app/classes/Planet.class.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/app/classes/Planet.class.php b/app/classes/Planet.class.php
index cd97353..4dcfbba 100644
--- a/app/classes/Planet.class.php
+++ b/app/classes/Planet.class.php
@@ -105,10 +105,10 @@ class Planet
*/
public function loadFeeds()
{
- foreach ($this->people as $person) {
- $person->set_timeout(-1);
- $person->init();
- $this->items = array_merge($this->items, $person->get_items());
+ foreach ($this->people as $feed) {
+ $feed->set_timeout(-1);
+ $feed->init();
+ $this->items = array_merge($this->items, $feed->get_items());
}
$this->sort();
@@ -123,27 +123,27 @@ class Planet
$max_load_feeds = ceil(count($this->people) * $max_load);
- foreach ($this->people as $person) {
+ foreach ($this->people as $feed) {
//Avoid mass loading with variable cache duration
- //$person->set_cache_duration($this->config->getCacheTimeout()+rand(0,30));
- $person->set_cache_duration($this->config->getCacheTimeout());
+ //$feed->set_cache_duration($this->config->getCacheTimeout()+rand(0,30));
+ $feed->set_cache_duration($this->config->getCacheTimeout());
//Load only a few feeds, force other to fetch from the cache
if (0 > $max_load_feeds--) {
- $person->set_timeout(-1);
- $this->errors[] = new PlanetError(1, 'Forced from cache : '.$person->getFeed());
+ $feed->set_timeout(-1);
+ $this->errors[] = new PlanetError(1, 'Forced from cache : '.$feed->getFeed());
}
//Load feed
- $person->init();
+ $feed->init();
// http://simplepie.org/wiki/reference/simplepie/merge_items ?
//Add items to index
- if (($person->data) && ($person->get_item_quantity() > 0)){
- $items = $person->get_items();
+ if (($feed->data) && ($feed->get_item_quantity() > 0)){
+ $items = $feed->get_items();
$this->items = array_merge($this->items, $items);
} else {
- $this->errors[] = new PlanetError(1, 'No items : '.$person->getFeed());
+ $this->errors[] = new PlanetError(1, 'No items : '.$feed->getFeed());
}
}
}