Add sitemap.xml.php
[disclosr.git] / include / couchdb.inc.php
blob:a/include/couchdb.inc.php -> blob:b/include/couchdb.inc.php
--- a/include/couchdb.inc.php
+++ b/include/couchdb.inc.php
@@ -3,7 +3,18 @@
 include $basePath . "schemas/schemas.inc.php";
 
 require ($basePath . 'couchdb/settee/src/settee.php');
-
+function createFOIDocumentsDesignDoc() {
+ /*      "map": "function(doc) {\n  emit(doc.web_server, 1);\n}",
+      "reduce": "function (key, values, rereduce) {\n    return sum(values);\n}"
+      },
+      "byAgency": {
+      "map": "function(doc) {\n  emit(doc.agencyID, 1);\n}",
+      "reduce": "function (key, values, rereduce) {\n    return sum(values);\n}"
+      },
+      "byURL": {
+      "map": "function(doc) {\n  emit(doc.url, doc);\n}"
+*/
+}
 function createDocumentsDesignDoc() {
     /* "views": {
       "web_server": {
@@ -168,6 +179,9 @@
 $server = new SetteeServer($serverAddr);
 
 function setteErrorHandler($e) {
+    if (class_exists('Amon')) {
+        Amon::log($e->getMessage() . " " . print_r($_SERVER,true), array('error'));
+    }
     echo $e->getMessage() . "<br>" . PHP_EOL;
 }