--- /dev/null
+<?php
+
+$WEB_ROOT_FS = realpath(dirname(__FILE__));
+$BASE_URL = "/";\r
+
+global $WEB_ROOT_FS, $BASE_URL;
+
+if(file_exists("../www/config.php")) require_once("../www/config.php");
+else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
+else $noconfig = true;
+
+if(file_exists("../gwvpmini/gwvpmini.php")) require_once("../gwvpmini/gwvpmini.php");
+else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
+
+global $IS_WEB_REQUEST;
+
+$IS_WEB_REQUEST = false;
+
+?>
\ No newline at end of file
}
+function gwvpmini_CreateUpdateHookInRepo($repopath)
+{
+ $fp = fopen("$repopath/hooks/$repopath", "w");
+
+ if(!$fp) error_log("could not create update hook");
+
+ // TODO: think about this one
+
+}
+
function gwvpmini_gitBackendInterface()
{
// and this is where i re-code the git backend interface from scratch
// so now we have the repo
// next we determine if this is a read or a write
+
+ // TODO: WE NEED TO FIX THIS, IT DOESNT ALWAYS DETECT a "WRITE"
$write = false;
if(isset($_REQUEST["service"])) {
if($_REQUEST["service"] == "git-receive-pack") {
if(!$person) {
$person = "anonymous";
}
+
+ // if its a write, we check (before and after) the branch/tag info to see if they were updated
+ //if($write) {
+ //}
+
gwvpmini_callGitBackend($person, $repo);
+
+ //if($write) {
+ //}
return;
//}
}
//sleep(2);
-
-
+
// this is where the fun, it ends.
$myoutput = "";
else $owner_extra = "";\r
echo "<h2>".gwvpmini_HtmlGravatar($owner["email"], 30)."$repo_view_call - $owner_name$owner_extra</h2>";
- if(!$owner_view) echo "<b>$desc</b><br>";
+ if(!$owner_view) echo "$desc<br>";
if($owner_view) {
echo "<form method=\"post\" action=\"$BASE_URL/repoupdatedesc/$repo_view_call\">";\r
$WEB_ROOT_FS = realpath(dirname(__FILE__));\r
$BASE_URL = dirname($_SERVER["PHP_SELF"]);\r
\r
-global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name, $db_username, $db_password;\r
+global $WEB_ROOT_FS, $BASE_URL, $data_directory, $db_type, $db_name, $db_username, $db_password, $IS_WEB_REQUEST;
+
+$IS_WEB_REQUEST = false;\r
if(file_exists("./config.php")) require_once("./config.php");
else if(file_exists("/etc/gwvpmini/config.php")) require_once("/etc/gwvpmini/config.php");
else if(file_exists("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php")) require_once("/usr/share/gwvpmini/lib/gwvpmini/gwvpmini.php");
-
if(isset($noconfig)) {
gwvpmini_goSetup();
return;