From: Maxious Date: Sat, 01 Dec 2012 11:46:22 +0000 Subject: fix rss links X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=a913aa90f3344ae178fa7cde594552824a41c778 --- fix rss links Former-commit-id: 67b9bf6afb0ababcdf08a783179348405e944e1b --- --- a/admin/refreshDesignDoc.php +++ b/admin/refreshDesignDoc.php @@ -9,6 +9,7 @@ $obj->language = "javascript"; $obj->views->all->map = "function(doc) { emit(doc._id, doc); };"; $obj->views->byDate->map = "function(doc) { emit(doc.date, doc); };"; +$obj->views->byDate->reduce = "_count"; $obj->views->byDateMonthYear->map = "function(doc) { emit(doc.date, doc); };"; $obj->views->byDateMonthYear->reduce = "_count"; $obj->views->byAgencyID->map = "function(doc) { emit(doc.agencyID, doc); };"; --- a/documents/rss.xml.php +++ b/documents/rss.xml.php @@ -11,7 +11,7 @@ //Use wrapper functions for common channelelements $TestFeed->setTitle('Last Modified - All'); $TestFeed->setLink('http://disclosurelo.gs/rss.xml.php'); -$TestFeed->setDescription('Latest entries'); +$TestFeed->setDescription('This is test of creating a RSS 2.0 feed Universal Feed Writer'); $TestFeed->setChannelElement('language', 'en-us'); $TestFeed->setChannelElement('pubDate', date(DATE_RSS, time())); //Retriving informations from database @@ -21,14 +21,14 @@ $idtoname[$row->id] = trim($row->value->name); } $foidocsdb = $server->get_db('disclosr-foidocuments'); -$rows = $foidocsdb->get_view("app", "byDate", Array('9999-99-99','0000-00-00', 50), true)->rows; +$rows = $foidocsdb->get_view("app", "byDate", Array('9999-99-99','0000-00-00'), true)->rows; //print_r($rows); foreach ($rows as $row) { //Create an empty FeedItem $newItem = $TestFeed->createNewItem(); //Add elements to the feed item $newItem->setTitle($row->value->title); - $newItem->setLink("view.php?id=".$row->value->docID); + $newItem->setLink("view.php?id=".$row->value->_id); $newItem->setDate(date("c", strtotime($row->value->date))); $newItem->setDescription(displayLogEntry($row,$idtoname)); $newItem->addElement('guid', $row->value->_id,array('isPermaLink'=>'true')); @@ -38,4 +38,3 @@ //OK. Everything is done. Now genarate the feed. $TestFeed->generateFeed(); ?> - --- a/documents/runScrapers.sh +++ /dev/null @@ -1,3 +1,1 @@ -for f in scrapers/*.py; do echo "Processing $f file.."; python $f; done - --- a/documents/template.inc.php +++ b/documents/template.inc.php @@ -21,7 +21,7 @@ - +