Skip to content

Commit

Permalink
removed .couchapprc; fixed gigan.php to match new directory layout an…
Browse files Browse the repository at this point in the history
…d use getenv vs. $_ENV super global
  • Loading branch information
Benjamin Young committed Sep 28, 2010
1 parent 1d2f4ff commit 4a62211
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
8 changes: 0 additions & 8 deletions .couchapprc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.couchapprc
*.kpf
14 changes: 7 additions & 7 deletions lib/gigan.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@

$ids = array();

if(!isset($_ENV["GIGAN_BOOT"])) {
if(!getenv('GIGAN_BOOT')) {
echo "Updating\n";
// ask gigan for the last updated bug's updated timestamp
// ask gigan-view for the last updated bug's updated timestamp

echo "debug: getting latest update\n";
$latest_update_result = $couch->send("GET", "/$db/_design/gigan/_view/latest-update?descending=true&limit=1");
$latest_update_result = $couch->send("GET", "/$db/_design/gigan-view/_view/latest-update?descending=true&limit=1");
$latest_update_result = json_decode($latest_update_result);
$latest_update = $latest_update_result->rows[0]->key;
echo "debug: latest update: $latest_update\n";

echo "debug: getting latest comment update\n";
$latest_comment_update_result = $couch->send("GET", "/$db/_design/gigan/_view/latest-comment-update?descending=true&limit=1");
$latest_comment_update_result = $couch->send("GET", "/$db/_design/gigan-view/_view/latest-comment-update?descending=true&limit=1");
$latest_comment_update_result = json_decode($latest_comment_update_result);
$latest_comment_update = $latest_comment_update_result->rows[0]->key;
echo "debug: latest comment update: $latest_comment_update\n";
Expand Down Expand Up @@ -158,10 +158,10 @@
$res = $couch->send("GET", "/$db/$json->_id");
if($res) {
$doc = json_decode($res);
if($doc->_rev) {
if(isset($doc->_rev)) {
$json->_rev = $doc->_rev;
}
if($doc->couchdb_fields) {
if(isset($doc->couchdb_fields)) {
$json->couchdb_fields = $doc->couchdb_fields;
}
}
Expand Down Expand Up @@ -214,4 +214,4 @@ function send($method, $url, $post_data = NULL) {
return $this->body;
}
}
?>
?>

0 comments on commit 4a62211

Please sign in to comment.