fixed the directory making bits for the downloader...
[glcas.git] / plugins / admin.php
index 845d857..4a99fb7 100644 (file)
@@ -111,7 +111,8 @@ class GLCASAdmin {
                        echo "<tr><td>Other (OS, Updates, etc)</td><td><input type=\"text\" name=\"other\" value=\"$other\"></td></tr>";
                        echo "<tr><td>Short URL</td><td><input type=\"text\" name=\"shorturl\"></td></tr>";
                        echo "<tr><td>URL Prefix (blank for none)</td><td><input type=\"text\" name=\"prefix\"></td></tr>";
-                       echo "<tr><td>Do Initial Update (can take a while)</td><td><input type=\"checkbox\" name=\"initial\" checked></td></tr>";
+                       echo "<tr><td>Do Initial Update (can take a while, but done in background)</td><td><input type=\"checkbox\" name=\"initial\" checked></td></tr>";
+                       echo "<tr><td>Expire time for Meta Data</td><td><input type=\"text\" name=\"expiretime\"> days</td></tr>";
                        echo "<tr><td><input type=\"submit\" name=\"Add\" value=\"Add\"></td></tr>";
                        echo "</table>";
                        echo "</form>";
@@ -132,12 +133,13 @@ class GLCASAdmin {
                $shorturl = $_REQUEST["shorturl"];
                $prefix = $_REQUEST["prefix"];
                $repurl = $_REQUEST["repourl"];
+               $expiretime = $REQUEST["expiretime"];
                $init = false;
                if(isset($_REQUEST["initial"])) $init = true;
                
                
                
-               $repo->addRepo($desc, $OS, $version, $arch, $other, $shorturl, $prefix, $repurl, "YUM", $init);
+               $repo->addRepo($desc, $OS, $version, $arch, $other, $shorturl, $prefix, $repurl, "YUM", $init, $expiretime);
                
                global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL;
                header("Location: $BASE_URL/admin/");