From: paulr Date: Sat, 6 Aug 2011 18:35:59 +0000 (+1000) Subject: some more on adhoc X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=055302909804ea2ad974c15ade944c74070ddedf;p=glcas.git some more on adhoc --- diff --git a/plugins/adhoc.php b/plugins/adhoc.php index 6b7d4c1..cfffa2e 100644 --- a/plugins/adhoc.php +++ b/plugins/adhoc.php @@ -91,6 +91,7 @@ class GLCASAdhoc { echo "Would add package as $n"; + $pkgs[$n]["name"] = $_REQUEST["pkgname"]; $pkgs[$n]["arch"] = $_REQUEST["arch"]; $pkgs[$n]["type"] = $_REQUEST["type"]; $pkgs[$n]["fileurl"] = $ultfileurl; @@ -101,6 +102,7 @@ class GLCASAdhoc { file_put_contents("$repostore/adhoc/$n", $fetfile); } + $this->config->setConfigVar("adhocpackages", serialize($pkgs)); $this->config->saveConfig(); echo "Done"; @@ -123,6 +125,13 @@ class GLCASAdhoc { echo "
"; echo "

Add a Package


"; + $pkgs = unserialize($this->config->getConfigVar("adhocpackages")); + foreach($pkgs as $key => $var) { + $name = $var["pkgname"]; + $arch = $var["arch"]; + $type = $var["type"]; + echo "$key: $name $arch, $type
"; + } echo "
"; echo "Name
"; echo "Arch