From 055302909804ea2ad974c15ade944c74070ddedf Mon Sep 17 00:00:00 2001 From: paulr Date: Sun, 7 Aug 2011 04:35:59 +1000 Subject: [PATCH] some more on adhoc --- plugins/adhoc.php | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) 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