X-Git-Url: http://git.pjr.cc/?a=blobdiff_plain;f=plugins%2Fadmin.php;h=e7dcd142e81f10eb956bd970450387cd4471aef9;hb=e842b9e98acbc69ea55e655130b68df06f25b3cd;hp=2b1d1ef46f2c0c3de4fec9657f8f538f3a5ee20f;hpb=ce16a1b219c25bd3cb3b803b4fec36dd557ead1b;p=glcas.git
diff --git a/plugins/admin.php b/plugins/admin.php
index 2b1d1ef..e7dcd14 100644
--- a/plugins/admin.php
+++ b/plugins/admin.php
@@ -2,6 +2,10 @@
error_log("admin loaded");
+global $BASE_URL, $MENU_ITEMS;
+$MENU_ITEMS["10admin"]["name"] = "Admin";
+$MENU_ITEMS["10admin"]["link"] = "$BASE_URL/admin";
+
global $URL_HANDLERS;
$URL_HANDLERS["admin.*"] = "GLCASAdmin";
global $CRON_CLASSES;
@@ -44,6 +48,10 @@ class GLCASAdmin {
error_log("call setstorage");
GLCASpageBuilder($this, "setStorage");
return;
+ case "freezerepo":
+ error_log("call freezerepo");
+ GLCASpageBuilder($this, "freezeRepo");
+ return;
case "scanrepo":
break;
}
@@ -93,6 +101,22 @@ class GLCASAdmin {
$this->mainBody($url);
}
+ function freezeRepo($url)
+ {
+ $repo = $_REQUEST["repo"];
+
+
+ $myRep = new GLCASRepo($this->config);
+
+
+ error_log("called freeze repo on $repo");
+ $myRep->freezeRepo($repo);
+
+ global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL;
+ header("Location: $BASE_URL/admin/");
+
+ }
+
function doRemoveRepo($url)
{
$repo = $_REQUEST["repo"];
@@ -116,6 +140,8 @@ class GLCASAdmin {
{
$myRep = new GLCASRepo($this->config);
+ $kos = getKnownOSList();
+
$wasyum = false;
$wasapt = false;
if($_REQUEST["repotype"] == "yumbase") {
@@ -141,7 +167,7 @@ class GLCASAdmin {
$extratext = "";
$provides = "";
if($glt["nrepos"] > 0) {
- $kos = getKnownOSList();
+
foreach($glt["knownrepo"] as $key => $val) {
$reponame = $kos["apt"][$val];
//echo "Fount a repo, $val which is $reponame
";
@@ -160,14 +186,35 @@ class GLCASAdmin {
$version = $glt["versions"];
$archs = $glt["arch"];
+ //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 "