Skip to content

Commit

Permalink
add simple catalog handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Groß committed Jun 24, 2016
1 parent 323b30d commit 94d4d4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions config/autoload/global.php
Expand Up @@ -134,6 +134,13 @@ function read_dir_config($config, $file)
$arr[key($config)]['allowed_cns'] = "";
}

if(array_key_exists('catalog', $instance) && isset($instance['catalog'])) {
$arr[key($config)]['catalog'] = $instance['catalog'];
}
else {
$arr[key($config)]['catalog'] = "MyCatalog";
}

}

next($config);
Expand Down
3 changes: 2 additions & 1 deletion vendor/Bareos/library/Bareos/BSock/BareosBSock.php
Expand Up @@ -78,6 +78,7 @@ class BareosBSock implements BareosBSockInterface
'cert_file' => null,
'cert_file_passphrase' => null,
'allowed_cns' => null,
'catalog' => null,
);

private $socket = null;
Expand Down Expand Up @@ -870,7 +871,7 @@ public function send_command($cmd, $api=0, $jobid=null)
break;
}

if(self::send("use")) {
if(self::send("use catalog=" . $this->config['catalog'])) {
$debug = self::receive_message();
}

Expand Down

0 comments on commit 94d4d4d

Please sign in to comment.