Add some comment about usage of environment auth

This commit is contained in:
Robin Appelman 2014-07-13 17:09:55 +02:00
commit 0520cba7dc

View file

@ -202,11 +202,11 @@ class Share implements IShare {
$command = Server::CLIENT . ' -U ' . escapeshellarg($this->server->getUser()) . $command = Server::CLIENT . ' -U ' . escapeshellarg($this->server->getUser()) .
' //' . $this->server->getHost() . '/' . $this->name ' //' . $this->server->getHost() . '/' . $this->name
. ' -c \'get ' . $source . ' -\''; . ' -c \'get ' . $source . ' -\'';
// because we're piping the files content over STOUT using the password prompt is no option here
$connection = new Connection($command, array( $connection = new Connection($command, array(
'PASSWD' => $this->server->getPassword() 'PASSWD' => $this->server->getPassword()
)); ));
$fh = $connection->getOutputStream(); $fh = $connection->getOutputStream();
//save the connection as context of the stream to prevent it going out of scope and cleaning up the resource //save the connection as context of the stream to prevent it going out of scope and cleaning up the resource
stream_context_set_option($fh, 'file', 'connection', $connection); stream_context_set_option($fh, 'file', 'connection', $connection);
return $fh; return $fh;