git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow usage in a subdir of a host.
[phorkie.git]
/
www
/
fork-remote.php
diff --git
a/www/fork-remote.php
b/www/fork-remote.php
index 374c8b89ab8e4105009e97dffae577b54c0515db..f34a232ce8a5a0ec53ade08683b91c9d950edb16 100644
(file)
--- a/
www/fork-remote.php
+++ b/
www/fork-remote.php
@@
-12,11
+12,14
@@
if (isset($_POST['remote_url'])) {
$fr = new ForkRemote($_POST['remote_url']);
if (false === $fr->parse()) {
//no url found
$fr = new ForkRemote($_POST['remote_url']);
if (false === $fr->parse()) {
//no url found
- $error =
'No git:// clone URL found'
;
+ $error =
$fr->error
;
} else if (false !== ($gitUrl = $fr->getUniqueGitUrl())) {
} else if (false !== ($gitUrl = $fr->getUniqueGitUrl())) {
+ if (isset($_POST['orig_url'])) {
+ $fr->setUrl($_POST['orig_url']);
+ }
$forker = new Forker();
$forker = new Forker();
- $new = $forker->forkRemote($gitUrl);
- redirect($new->getLink('display'));
+ $new = $forker->forkRemote($gitUrl
, $fr->getUrl()
);
+ redirect($new->getLink('display'
, null, true
));
} else {
//multiple urls found
$urls = $fr->getGitUrls();
} else {
//multiple urls found
$urls = $fr->getGitUrls();