From cedd983dbbfcea17f6b3f5448009bd3175b37aa5 Mon Sep 17 00:00:00 2001 From: Paul J R Date: Thu, 25 Oct 2012 18:55:12 +1100 Subject: [PATCH] notification of repo remote cloning complete via db message --- bin/gwvpminicmdtool.php | 7 ++++++- gwvpmini/gwvpmini_gitbackend.php | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/gwvpminicmdtool.php b/bin/gwvpminicmdtool.php index afc372a..3f59778 100644 --- a/bin/gwvpminicmdtool.php +++ b/bin/gwvpminicmdtool.php @@ -87,8 +87,13 @@ function gwvpcmdtool_BackGroundClone() $cmd = "git clone --bare $from $repo_base/$to.git"; exec($cmd); - $rid = gwvpmini_GetRepoId($to); + $rn = gwvpmini_getRepo(null, $to, null); + $rid = $rn["id"]; + $uid = $rn["ownerid"]; gwvpmini_EnableRepo($rid); + + //gwvpmini_SendMessageByDb($type, $data, $forid) + gwvpmini_SendMessageByDb("info", "Repo $to has finished cloning and now ready", $uid); echo "update $to ($rid) and enabled it\n"; } diff --git a/gwvpmini/gwvpmini_gitbackend.php b/gwvpmini/gwvpmini_gitbackend.php index 424c108..fb577f5 100644 --- a/gwvpmini/gwvpmini_gitbackend.php +++ b/gwvpmini/gwvpmini_gitbackend.php @@ -467,7 +467,7 @@ function gwvpmini_createGitRepo($name, $ownerid, $desc, $defperms, $clonefrom, $ $rn = gwvpmini_getRepo(null, $name, null); $rid = $rn["id"]; gwvpmini_SetRepoCloning($rid); - gwvpmini_SendMessage("info", "Background clone initiated for $name ($rid) from $clonefrom... your repo will be available once the background clone is finished"); + gwvpmini_SendMessageByDb("info", "Background clone initiated for $name ($rid) from $clonefrom... your repo will be available once the background clone is finished", $ownerid); return false; } } else { -- 1.7.0.4