$this->config = $config;
error_log("constructor for GLCASAdhoc");
- $repostore = $this->config->getConfigVar("storagelocation");
+ $repostore = $this->config->getConfig("storagelocation");
if(!is_dir("$repostore/adhoc")) {
error_log("Creating dir for adhoc component");
mkdir("$repostore/adhoc");
function delPackage($url)
{
- $repostore = $this->config->getConfigVar("storagelocation");
+ $repostore = $this->config->getConfig("storagelocation");
$pkgid = $_REQUEST["pkgid"];
- $pkgs = unserialize($this->config->getConfigVar("adhocpackages"));
+ $pkgs = unserialize($this->config->getConfig("adhocpackages"));
if(isset($pkgs[$pkgid])) {
unset($pkgs[$pkgid]);
- $this->config->setConfigVar("adhocpackages", serialize($pkgs));
+ $this->config->setConfig("adhocpackages", serialize($pkgs));
$this->config->saveConfig();
}
function addPackage($url)
{
- $repostore = $this->config->getConfigVar("storagelocation");
+ $repostore = $this->config->getConfig("storagelocation");
if(!isset($_REQUEST["pkgname"])) {
echo "<font color=\"red\">Error: No package name set</font><br>";
echo "Got a file named $fname, $lname";
}
- $pkgs = unserialize($this->config->getConfigVar("adhocpackages"));
+ $pkgs = unserialize($this->config->getConfig("adhocpackages"));
$n = -1;
foreach($pkgs as $key => $var) {
file_put_contents("$repostore/adhoc/$n", $fetfile);
}
- $this->config->setConfigVar("adhocpackages", serialize($pkgs));
+ $this->config->setConfig("adhocpackages", serialize($pkgs));
$this->config->saveConfig();
echo "Done";
{
echo "<h2>Packages</h2>";
- $pkgs = unserialize($this->config->getConfigVar("adhocpackages"));
+ $pkgs = unserialize($this->config->getConfig("adhocpackages"));
echo "<table border=\"1\"><tr><th>Name</th><th>Package Types</th><th>Architecture</th><th>Control</th></tr>";
foreach($pkgs as $key => $var) {