added .htaccess to .gitmanaged directory
authorpk910 <philipp@zoelle1.de>
Sun, 13 Oct 2013 13:54:39 +0000 (15:54 +0200)
committerpk910 <philipp@zoelle1.de>
Sun, 13 Oct 2013 13:54:39 +0000 (15:54 +0200)
GITManagedWebpage.class.php

index c8c7714e719eec80823363657b4263165c185ce7..3f6ba4aae7772b0ee2d943f53ea4eaa9d57daf94 100644 (file)
@@ -164,6 +164,14 @@ class GITManagedWebpage {
             $this->error(self::ERROR_CRITICAL, "error cloning git repository.");
             return;
         }
             $this->error(self::ERROR_CRITICAL, "error cloning git repository.");
             return;
         }
+        
+        $fp = fopen($this->workdir.'.htaccess');
+        fwrite($fp, '
+Order deny,allow
+Deny from all
+');
+        fclose($fp);
+        
         $this->ready = true;
         
         $default_branch = str_replace(array("\r", "\n"), array("", ""), $this->gitcmd("rev-parse", "--abbrev-ref", "HEAD"));
         $this->ready = true;
         
         $default_branch = str_replace(array("\r", "\n"), array("", ""), $this->gitcmd("rev-parse", "--abbrev-ref", "HEAD"));