From: Maxious Date: Wed, 09 Oct 2013 12:10:14 +0000 Subject: fix that darn CASA scraper X-Git-Url: http://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=9fb69fa7fa874357953c98c7fbdb5ff6c2595883 --- fix that darn CASA scraper Former-commit-id: 288d5ab60033e36608bf898869eecdf64180ba59 --- --- a/admin/logo.svg +++ b/admin/logo.svg @@ -1,34 +1,34 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + --- a/admin/refreshDesignDoc.php +++ b/admin/refreshDesignDoc.php @@ -8,21 +8,13 @@ $obj->_id = "_design/" . urlencode("app"); $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->map = "function(doc) { if (doc.title != \"Disclosure Log Updated\") { emit(doc.date, doc); } };"; $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); };"; $obj->views->byAgencyID->reduce = "_count"; -$obj->views->fieldNames->map = ' -function(doc) { -for(var propName in doc) { - emit(propName, doc._id); - } - -}'; -$obj->views->fieldNames->reduce = 'function (key, values, rereduce) { - return values.length; -}'; +$obj->views->fieldNames->map = 'function(doc) { for(var propName in doc) { emit(propName, doc._id); }}'; +$obj->views->fieldNames->reduce = 'function (key, values, rereduce) { return values.length; }'; // allow safe updates (even if slightly slower due to extra: rev-detection check). $foidb->save($obj, true); --- a/documents/agency.php +++ b/documents/agency.php @@ -19,7 +19,7 @@
get_view("app", "byAgencyID", $_REQUEST['id'], false, false, false)->rows; foreach ($rows as $row) { //print_r($rows); @@ -42,3 +42,4 @@ echo "next page "; include_footer_documents(); ?> + --- a/documents/charts.php +++ b/documents/charts.php @@ -16,7 +16,7 @@

-
+