die('Must specify a commit to view');
}
if (!isset($_GET['file'])) {
    die('Must specify a filename');
}
require_once 'config/Config.class.php';
require_once 'class/Commit.class.php';
// Library File
include 'framework/lib/library.php';
$title = 'View File Change';
$subtitle = Config::get('siteName');
$commitId = $_GET['commitId'];
$file = $_GET['file'];
$repoId = $_GET['repoId'];
$commit = new Commit($commitId);
$data = $commit->getData();
$data['commitAuthor'] = htmlspecialchars($data['commitAuthor']);
$diff = shell_exec("./getFileChange.pl {$repoId} '{$commitId}' '{$file}'");
$diff = nl2br(htmlspecialchars($diff));
$content = <<<EOT
<div class="indent">
\t<h3 class="indent">{$data['commitMessage']}</h3>
\t<table class="indent">
\t\t<tr>
\t\t\t<td class="bold">Commit:</td>
\t\t\t<td>{$data['commitVal']}</td>
\t\t</tr>
\t\t<tr>
\t\t\t<td class="bold">Author:</td>
\t\t\t<td>{$data['commitAuthor']}</td>
\t\t</tr>