diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-05-01 11:19:20 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-05-01 11:19:20 -0700 |
commit | ec8dd014e3d10a05b57549cf4f0e82a630ef6303 (patch) | |
tree | 2fe1c6cabf7a38e01a7e5bc8605eb39b57b4f175 /plugins/Comet/bayeux.class.inc.php | |
parent | aee641ee1e311fb0af0f9f6d75ca7fae2c7d8477 (diff) | |
parent | b12e72ae312488caf7cb1e1a396eb05dd38326a9 (diff) |
Merge branch '0.7.x' into querybyid
Diffstat (limited to 'plugins/Comet/bayeux.class.inc.php')
-rw-r--r-- | plugins/Comet/bayeux.class.inc.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/Comet/bayeux.class.inc.php b/plugins/Comet/bayeux.class.inc.php index 785d3e393..39ad8a8fc 100644 --- a/plugins/Comet/bayeux.class.inc.php +++ b/plugins/Comet/bayeux.class.inc.php @@ -26,9 +26,12 @@ class Bayeux private $oCurl = ''; private $nNextId = 0; + private $sUser = ''; + private $sPassword = ''; + public $sUrl = ''; - function __construct($sUrl) + function __construct($sUrl, $sUser='', $sPassword='') { $this->sUrl = $sUrl; @@ -43,6 +46,10 @@ class Bayeux curl_setopt($this->oCurl, CURLOPT_POST, 1); curl_setopt($this->oCurl, CURLOPT_RETURNTRANSFER,1); + if (!is_null($sUser) && mb_strlen($sUser) > 0) { + curl_setopt($this->oCurl, CURLOPT_USERPWD,"$sUser:$sPassword"); + } + $this->handShake(); } |