From: maxious Date: Tue, 11 Dec 2012 11:14:37 +0000 Subject: fix reduce X-Git-Url: https://maxious.lambdacomplex.org/git/?p=disclosr.git&a=commitdiff&h=6f6fe676cc95119445460b301166123a8dbd46b5 --- fix reduce Former-commit-id: 9bf62392d9d505afcc2ed31f23d49c84a98a2091 --- --- a/couchdb/settee/src/classes/SetteeDatabase.class.php +++ b/couchdb/settee/src/classes/SetteeDatabase.class.php @@ -267,12 +267,11 @@ if ($startdocid != null) { $data .= "&startkey_docid='$startdocid'"; } - if ($reduce != null) { - if ($reduce == true) { + if ($reduce === true) { $data .= "&reduce=true"; - } else { + } else if ($reduce === false){ + $data .= "&reduce=false"; - } } if ($limit) { $data .= "&limit=" . $limit; @@ -314,3 +313,4 @@ } } + --- a/couchdb/settee/src/classes/SetteeRestClient.class.php +++ b/couchdb/settee/src/classes/SetteeRestClient.class.php @@ -244,3 +244,4 @@ } class SetteeRestClientException extends Exception {} + --- a/documents/template.inc.php +++ b/documents/template.inc.php @@ -157,8 +157,8 @@ function displayLogEntry($row, $idtoname) { $result = ""; $result .= '
'; - $result .= '

: " . truncate($row->value->title, 120) . ""; - $result .= ' (' . $idtoname[$row->value->agencyID] . ')

'; + $result .= '

: " . truncate($row->value->title, 120) . ""; + $result .= ' (' . $idtoname[$row->value->agencyID] . ')

'; $result .= "

Title: " . $row->value->title . "
"; if (isset($row->value->description)) { $result .= str_replace("\n", "
", preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "",trim($row->value->description))); --- a/include/common.inc.php +++ b/include/common.inc.php @@ -9,6 +9,7 @@ || strstr($_SERVER['PHP_SELF'], "include/") || strstr($_SERVER['PHP_SELF'], "documents/") || $_SERVER['SERVER_NAME'] == "disclosurelo.gs" + || $_SERVER['SERVER_NAME'] == "www.disclosurelo.gs" ) $basePath = "../";