X-Git-Url: http://git.pjr.cc/?p=glcas.git;a=blobdiff_plain;f=plugins%2Fadmin.php;fp=plugins%2Fadmin.php;h=492ed29885cfe7d69a9e05705f02824fc511e757;hp=13121c321fc066ec32e8807c3ac4a5ec0b063f2a;hb=ce6eddc1cf6b4a879b9239fec18258b99f3d739a;hpb=7f8d6f9924ba50980a594b89747c1763552a2bed diff --git a/plugins/admin.php b/plugins/admin.php index 13121c3..492ed29 100644 --- a/plugins/admin.php +++ b/plugins/admin.php @@ -162,19 +162,22 @@ class GLCASAdmin { $version = $glt["versions"]; $archs = $glt["arch"]; - echo "
";
-			print_r($glt);
-			echo "
"; + //echo "
";
+			//print_r($glt);
+			//echo "
"; + echo "The joy of apt is that there could be a million distro's under the root of an apt mirror"; + echo "if it doesn't list here, but you know its there, its still usable for glcas"; echo "
"; echo ""; echo ""; + echo ""; echo ""; echo ""; echo ""; - // TODO change this "provides" bit with a bit that allows us to choose which versions - // of ubuntu will be made available from the ones we found - echo ""; @@ -236,9 +239,26 @@ class GLCASAdmin { $init = false; if(isset($_REQUEST["initial"])) $init = true; + $blocklist = null; + $bn = 0; + foreach($_REQUEST as $key => $val) { + if(preg_match("/^blocked-*/", $key)) { + $blocked = preg_replace("/^blocked-/", "", $key); + //echo "
got block for $blocked
"; + $blocklist[$bn] = "dists\/$blocked.*"; + $bn++; + } + } + //echo "
";
+		//print_r($_REQUEST);
+		//echo "
"; - $repo->addRepo($desc, $OS, $version, $arch, "-", $shorturl, $prefix, $repurl, "APT", $init, $expiretime); + //exit(0); + + $repo->addRepo($desc, $OS, $version, $arch, "-", $shorturl, $prefix, $repurl, "APT", $init, $expiretime, $blocklist); + + // next we need to deal with that "blocked" bit global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL; header("Location: $BASE_URL/admin/"); @@ -271,6 +291,8 @@ class GLCASAdmin { function doUpdateRepo($url) { $rkey = $_REQUEST["repo"]; + + error_log("would update for repo"); $repo = new GLCASRepo($this->config); @@ -338,13 +360,12 @@ class GLCASAdmin { //echo ""; // wrap all this in a table - echo "
Description
Provides (tick those you wish to BLOCK)"; + + // TODO: deal with block bit + echo "
Provides (tick those you wish to BLOCK - not implemented)"; foreach($glt["knownrepo"] as $key => $val) { $reponame = $kos["apt"][$val["name"]]; $a = ""; @@ -183,7 +186,7 @@ class GLCASAdmin { if($glt["knownrepo"][$key]["amd64"]) $b = "x86_64"; if($a != "" && $b != "") $archs = "$a/$b"; else $archs = "$a$b"; - echo " $reponame ($archs)
"; + echo " $reponame ($archs)
"; } echo "
"; + echo "
"; // now, add a repo echo "

Add A Repo

"; echo ""; echo "Type
"; echo "URL
"; @@ -359,19 +380,37 @@ class GLCASAdmin { echo "Hint
"; echo "URL
"; echo "
"; echo ""; - echo "

"; + echo "
"; + + // now for mirror lists + echo "

Via Mirrolist - not implemented

"; + echo "
"; + echo "Distro
"; + echo "Architecture
"; + echo "Version
"; + echo "Get updates too
"; + echo "
"; + echo "
"; + + + echo "
"; // repo storage location echo "

Storage


"; echo "
"; $storloc = $this->config->getConfigVar("storagelocation"); - echo ""; + echo ""; echo ""; echo "
"; }