remote forking: use the original http/https url in description
[phorkie.git] / www / fork-remote.php
index 374c8b89ab8e4105009e97dffae577b54c0515db..05677485e4156a5066dbf69842cd1f8750a6ed73 100644 (file)
@@ -14,8 +14,11 @@ if (isset($_POST['remote_url'])) {
         //no url found
         $error = 'No git:// clone URL found';
     } else if (false !== ($gitUrl = $fr->getUniqueGitUrl())) {
+        if (isset($_POST['orig_url'])) {
+            $fr->setUrl($_POST['orig_url']);
+        }
         $forker = new Forker();
-        $new    = $forker->forkRemote($gitUrl);
+        $new    = $forker->forkRemote($gitUrl, $fr->getUrl());
         redirect($new->getLink('display'));
     } else {
         //multiple urls found