From: paulr Date: Fri, 4 Nov 2011 17:11:44 +0000 (+1100) Subject: repo admin work for dealing with bundles (For initial repo creation). X-Git-Url: http://git.pjr.cc/?a=commitdiff_plain;h=e3bdcdac5fc5d9cec5db491543a9ab1c090706cd;p=gwvp.git repo admin work for dealing with bundles (For initial repo creation). Im a little confused about how git bundles actually work... they seem odd --- diff --git a/gwvplib/gwvpgitcontrol.php b/gwvplib/gwvpgitcontrol.php index a949fab..2755859 100644 --- a/gwvplib/gwvpgitcontrol.php +++ b/gwvplib/gwvpgitcontrol.php @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/gwvplib/gwvprepoadmin.php b/gwvplib/gwvprepoadmin.php index ec28e8b..1ecf30b 100644 --- a/gwvplib/gwvprepoadmin.php +++ b/gwvplib/gwvprepoadmin.php @@ -6,11 +6,14 @@ $MENU_ITEMS["20repos"]["link"] = "$BASE_URL/admin/repos"; function gwvp_RepoAdminCallMe() { + + error_log("in repoadmin callme"); if(isset($_REQUEST["q"])) { $query = $_REQUEST["q"]; $qspl = explode("/", $query); if(isset($qspl[0]) && isset($qspl[1])) { if($qspl[0] == "admin" && $qspl[1] == "repos") { + error_log("i got here, where next?"); if(isset($qspl[2])) { switch($qspl[2]) { case "create": @@ -52,10 +55,16 @@ function gwvp_DoCreateRepoPage() if(gwvp_repoExists($reponame)) { gwvp_SendMessage("error", "a repository with the name \"$reponame\" already exists"); - header("Location: $BASE_URL/admin/repos/create?reponameobv=$reponame&repodescobv=$repodesc"); + //header("Location: $BASE_URL/admin/repos/create?reponameobv=$reponame&repodescobv=$repodesc"); } else if(gwvp_createGitRepo($reponame)) { + if(isset($_FILES["bundlefile"]["size"])) { + //error_log("bundle file name is ".$_FILES["bundlefile"]["size"]); + if($_FILES["bundlefile"]["size"] > 0) { + error_log("bundle file tmpname is ".$_FILES["bundlefile"]["tmp_name"]); + } + } gwvp_SendMessage("info", "Repo, $reponame, created"); - header("Location: $BASE_URL/admin/repos"); + //header("Location: $BASE_URL/admin/repos"); } @@ -72,10 +81,11 @@ function gwvp_CreateRepoPageBody() if(isset($_REQUEST["repodescobv"])) $repodescobv = $_REQUEST["repodescobv"]; echo "

Create a Repo

"; - echo "
"; + echo ""; echo ""; echo ""; echo ""; + echo ""; echo "
Repository Name
Repository Description
Repository BundleCreate a bundle for pro-creating the git repository
"; echo "
"; echo "
";