couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Getting started with PHP" by SamBisbee
Date Fri, 07 Aug 2009 19:58:02 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by SamBisbee:
http://wiki.apache.org/couchdb/Getting_started_with_PHP

The comment on the change is:
Whoops, incorrectly copy/pasted the http basic auth code.

------------------------------------------------------------------------------
  {{{
  class CouchDB {
  
-     $this->username;
-     $this->password;
+     private $username;
+     private $password;
  
      function __construct($db, $host = 'localhost', $port = 5984, $username = null, $password
= null) {
          $this->db = $db;
@@ -273, +273 @@

      
      function send($url, $method = 'get', $data = NULL) {
          $url = '/'.$this->db.(substr($url, 0, 1) == '/' ? $url : '/'.$url);
-         $request = new CouchDBRequest($this->host, $this->port, $url, $method, $data,
$username, $password);
+         $request = new CouchDBRequest($this->host, $this->port, $url, $method, $data,
$this->username, $this->password);
          return $request->send();
      }
      

Mime
View raw message