mirror of
https://codeberg.org/icewind/SMB.git
synced 2026-06-03 17:24:07 +02:00
remove code duplication for listShares
This commit is contained in:
parent
9c50244e67
commit
b43c129ed9
4 changed files with 58 additions and 55 deletions
|
|
@ -61,7 +61,7 @@ class Share extends AbstractShare {
|
|||
System::getFD(3),
|
||||
escapeshellarg('//' . $this->server->getHost() . '/' . $this->name)
|
||||
);
|
||||
$connection = new Connection($command);
|
||||
$connection = new Connection($command, $this->parser);
|
||||
$connection->writeAuthentication($this->server->getUser(), $this->server->getPassword());
|
||||
if (!$connection->isValid()) {
|
||||
throw new ConnectionException();
|
||||
|
|
@ -276,7 +276,7 @@ class Share extends AbstractShare {
|
|||
System::getFD(3),
|
||||
escapeshellarg('//' . $this->server->getHost() . '/' . $this->name)
|
||||
);
|
||||
$connection = new Connection($command);
|
||||
$connection = new Connection($command, $this->parser);
|
||||
$connection->writeAuthentication($this->server->getUser(), $this->server->getPassword());
|
||||
$connection->write('get ' . $source . ' ' . System::getFD(5));
|
||||
$connection->write('exit');
|
||||
|
|
@ -305,7 +305,7 @@ class Share extends AbstractShare {
|
|||
System::getFD(3),
|
||||
escapeshellarg('//' . $this->server->getHost() . '/' . $this->name)
|
||||
);
|
||||
$connection = new Connection($command);
|
||||
$connection = new Connection($command, $this->parser);
|
||||
$connection->writeAuthentication($this->server->getUser(), $this->server->getPassword());
|
||||
$fh = $connection->getFileInputStream();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue