summaryrefslogtreecommitdiffstats
path: root/templates/main.php
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-05-15 14:49:53 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-05-15 14:49:53 -0400
commit4353c8ab583b7b10369290dec016883a35b2c185 (patch)
tree4d09d5011a2039c368e9e53e23babd095e67dec7 /templates/main.php
parent72770c15d3e5b18b620720a259b7c6ecd6274157 (diff)
decoupled model class Feed and mapper class FeedMapper
Diffstat (limited to 'templates/main.php')
-rw-r--r--templates/main.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/main.php b/templates/main.php
index 771d83b3e..f6eabb799 100644
--- a/templates/main.php
+++ b/templates/main.php
@@ -1,10 +1,15 @@
<?php
$feed = new OC_News_Feed( 'http://algorithmsforthekitchen.com/blog/?feed=rss2' );
-$feed->saveToDB();
+$mapper = new OC_News_FeedMapper();
+$feed_id = $mapper->insert($feed);
+echo "<br>" . $feed->getTitle() . "<br>";
+
+/*
$item = $feed->get_item(1);
+
if ($item->isRead()) {
echo $l->t('Read');
}
@@ -24,3 +29,4 @@ if ($item->isRead()) {
else {
echo $l->t('Unread');
}
+*/ \ No newline at end of file