remove hook examples
[phorkie.git] / www / index.php
index 8fc24052f54f6dc0c98bacb260583ff7c92fb8cf..044ac350dcf8979a566c19824d5cadbd1da22ca4 100644 (file)
@@ -18,6 +18,9 @@ if (isset($_POST['file'])) {
     $repo = $rs->createNew();
     $vc = $repo->getVc();
     $vc->initRepository();
+    foreach (glob($repo->repoDir . '/.git/hooks/*') as $hookfile) {
+        unlink($hookfile);
+    }
     file_put_contents($repo->repoDir . '.git/description', $_POST['description']);
 
     foreach ($_POST['file'] as $num => $arFile) {