summaryrefslogtreecommitdiffstats
path: root/templates/main.php
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-05-23 15:14:10 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-05-23 15:14:10 -0400
commitd8a193119f442c92bd47f150d149a5d1caf44a7e (patch)
tree4929cd74ec0489d8d8475fffca8620899a03ef84 /templates/main.php
parent97f76e8cc62ede53709539595e835c4900f44d0c (diff)
separates fetching/importing from the modelling classes
Diffstat (limited to 'templates/main.php')
-rw-r--r--templates/main.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/main.php b/templates/main.php
index 652f22f9b..fc2631412 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -1,7 +1,8 @@
<?php
-$feed = new OC_News_Feed( 'http://algorithmsforthekitchen.com/blog/?feed=rss2' );
$mapper = new OC_News_FeedMapper();
+$feed = $mapper->fetch( 'http://algorithmsforthekitchen.com/blog/?feed=rss2' );
+echo "<br>" . $feed->getTitle() . "<br>";
$mapper->insert($feed);
$feed = $mapper->find($feed->getId());
echo "<br>" . $feed->getTitle() . "<br>";