4 require dirname(__FILE__).'/../../env.inc.php';
5 require $gfwww.'include/squal_pre.php';
8 $svnlook = '/usr/bin/svnlook';
9 #$commit_email_pl = '/usr/share/subversion/hook-scripts/commit-email.pl';
10 $commit_email_pl = direname(__FILE__).'/commit-email.pl';
13 if(!file_exists($svnlook) || !file_exists($commit_email_pl)) { die("Missing required executables."); }
15 # Find who made the changes
16 if($argc < 4) { die("Invalid arguments."); }
18 $author = exec("$svnlook author \"$argv[1]\" -r $argv[2]");
19 $res_db= db_query("SELECT email FROM users where user_name = '$author' LIMIT 1");
22 $e = db_fetch_array($res_db);
24 passthru("$commit_email_pl --from $e[email] \"$argv[1]\" $argv[2] $argv[3]");
28 passthru("$commit_email_pl \"$argv[1]\" $argv[2] $argv[3]");