kinda stubb'ed the old config out for now and tacked it onto the new
[glcas.git] / plugins / adhoc.php
index 6df9241..9bfbb65 100644 (file)
@@ -15,7 +15,7 @@ class GLCASAdhoc {
                $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");
@@ -45,15 +45,15 @@ class GLCASAdhoc {
        
        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();
                }
                
@@ -64,7 +64,7 @@ class GLCASAdhoc {
        
        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>";
@@ -108,7 +108,7 @@ class GLCASAdhoc {
                        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) {
@@ -129,7 +129,7 @@ class GLCASAdhoc {
                        file_put_contents("$repostore/adhoc/$n", $fetfile);
                }
                
-               $this->config->setConfigVar("adhocpackages", serialize($pkgs));
+               $this->config->setConfig("adhocpackages", serialize($pkgs));
                $this->config->saveConfig();
                
                echo "Done";
@@ -148,7 +148,7 @@ class GLCASAdhoc {
        {
                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) {