From: paulr Date: Mon, 25 Jul 2011 04:56:49 +0000 (+1000) Subject: trying to figure out hoe i group os's and stuff X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=f3bb1ef4d1fb0297498f8a1a30c2332e2e5905e8;p=glcas.git trying to figure out hoe i group os's and stuff --- diff --git a/plugins/admin.php b/plugins/admin.php index 8b6c2a9..af5ed85 100644 --- a/plugins/admin.php +++ b/plugins/admin.php @@ -20,7 +20,7 @@ class GLCASAdmin { if(isset($_REQUEST["action"])) { switch($_REQUEST["action"]) { case "addrepo": - GLCASpageBuilder($this,"doAddRepo"); + GLCASpageBuilder($this,"doAddRepoForm"); return; break; case "scanrepo": @@ -44,13 +44,37 @@ class GLCASAdmin { $this->mainBody($url); } - function doAddRepo($url) + function doAddRepoForm($url) { $myRep = new GLCASRepo($this->config); - $glt = $myRep->getRepoDetailsYum($_REQUEST["repourl"]); + $wasyum = false; + if($_REQUEST["repotype"] == "yumbase") { + $glt = $myRep->getRepoDetailsYum($_REQUEST["repourl"]); + $wasyum = true; + } else if($_REQUEST["repotype"] == "yummirrorlist") { + $glt = $myRep->getRepoDetailsYum($_REQUEST["repourl"], true); + $wasyum = true; + } else if($_REQUEST["repotype"] == "apt") { + $glt = $myRep->getRepoDetailsApt($_REQUEST["repourl"]); + } + - echo "
$glt
"; + if($wasyum) { + $os = $glt["OS"]; + $version = $glt["version"]; + $arch = $glt["arch"]; + echo "
"; + echo "OS:
"; + echo "Version:
"; + echo "Architecture:
"; + echo "Short URL
"; + echo "URL Prefix (blank for none)
"; + echo "
"; + echo "
"; + } else { + // apt is much tricker cause one repo can provide multiple versions, OS's and architectures. + } } function mainBody($url) diff --git a/plugins/knownos.php b/plugins/knownos.php new file mode 100644 index 0000000..eda7b96 --- /dev/null +++ b/plugins/knownos.php @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/plugins/repo.php b/plugins/repo.php index c85ff12..fea1c4f 100644 --- a/plugins/repo.php +++ b/plugins/repo.php @@ -1,6 +1,7 @@