X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/6d0777840e50ce98f3d96629b4e92bbdccd3001c..bfa1501efa1a49893208c794ea262a075b13fc1d:/www/index.php diff --git a/www/index.php b/www/index.php index 5276bf2..8fc2405 100644 --- a/www/index.php +++ b/www/index.php @@ -1,4 +1,5 @@ createNew(); + $vc = $repo->getVc(); $vc->initRepository(); - file_put_contents($dir . '.git/description', $_POST['description']); + file_put_contents($repo->repoDir . '.git/description', $_POST['description']); foreach ($_POST['file'] as $num => $arFile) { if ($arFile['name'] != '') { @@ -27,7 +26,7 @@ if (isset($_POST['file'])) { } else { $fname = 'phork' . $num . '.' . $arFile['type']; } - $fpath = $dir . $fname; + $fpath = $repo->repoDir . $fname; file_put_contents($fpath, $arFile['content']); //fixme: let the class do that when it is able to $command = $vc->getCommand('add') @@ -36,9 +35,10 @@ if (isset($_POST['file'])) { } $command = $vc->getCommand('commit') ->setOption('message', 'initial paste') + ->setOption('author', 'Anonymous ') ->execute(); //redirect to phork - redirect($n); + redirect($repo->getLink('display')); } $phork = array(