/Web/Maintenance/CommitLog.php
0,0 → 1,65
<?php
if (isset($last)) unset ($last);
Exec("svnlook youngest /home/MLAB", $last);
$last=$last[0]; // Poslední revize
?>
<h1> Commit Log </h1>
<?php
if (isset($x)) unset ($x);
$x=@file("DynData/svn.err"); // Chybový soubor
if ($x!="")
{
$x=preg_replace("/\n/","",$x); // Ukousni konce řádek
$x=implode("\n",$x); // Slož řádky
if ($x=="")
{
$x="O.K."; // Soubor existuje a je prázdný
}
}
else
{
$x="Missing Error File"; // Pokud není chybový soubor
}
?>
<table>
<tr>
<th> Last Error </th>
<td> <code><?php echo $x; ?> </code></td>
</tr>
</table>
 
<?php
// Cyklus přes posledních několik commitů
for($i=1; $i<=5; $i++, $last--) {
?>
<h2> Revision <?php echo $last; ?> </h2>
<?php
if (isset($x)) unset ($x);
Exec("svnlook info /home/MLAB -r $last", $x);
?>
<table>
<tr>
<th> Author </th>
<td> <?php echo $x[0]; ?> </td>
</tr>
<tr>
<th> Date </th>
<td> <?php echo $x[1]; ?> </td>
</tr>
<tr>
<th> Comment </th>
<td> <?php echo $x[3]; ?> &nbsp; </td>
</tr>
<tr>
<td colspan=2>
<code><?php
if (isset($x)) unset($x);
Exec("svnlook changed /home/MLAB -r $last", $x);
echo implode("\n", $x); ?></code> </td>
</table>
<?php
// Konec cyklu
}
?>