[Dehs-devel] r52 - in trunk: . www
atomo64-guest at alioth.debian.org
atomo64-guest at alioth.debian.org
Tue Nov 27 04:51:23 UTC 2007
Author: atomo64-guest
Date: 2007-11-27 04:51:23 +0000 (Tue, 27 Nov 2007)
New Revision: 52
Modified:
trunk/update_wwwal.sh
trunk/www/no_updated.php
trunk/www/no_upstream.php
trunk/www/no_watch.php
Log:
Added last update date on all the html pages
Make sure WORKDIR is a directory
Modified: trunk/update_wwwal.sh
===================================================================
--- trunk/update_wwwal.sh 2007-11-27 03:59:28 UTC (rev 51)
+++ trunk/update_wwwal.sh 2007-11-27 04:51:23 UTC (rev 52)
@@ -1,5 +1,11 @@
#!/bin/sh
set -e
+
+if [ ! -d "$WORKDIR" ]; then
+ echo "\$WORKDIR is empty!" >&2
+ exit 1
+fi
+
php4 -q $WORKDIR/www/no_watch.php > /org/alioth.debian.org/chroot/home/groups/dehs/htdocs/no_watch.html
php4 -q $WORKDIR/www/no_upstream.php > /org/alioth.debian.org/chroot/home/groups/dehs/htdocs/no_upstream.html
php4 -q $WORKDIR/www/no_updated.php > /org/alioth.debian.org/chroot/home/groups/dehs/htdocs/no_updated.html
Modified: trunk/www/no_updated.php
===================================================================
--- trunk/www/no_updated.php 2007-11-27 03:59:28 UTC (rev 51)
+++ trunk/www/no_updated.php 2007-11-27 04:51:23 UTC (rev 52)
@@ -69,7 +69,7 @@
<td style="vertical-align: top;">
<? if ($res_array[up_changes]!='') { ?>
<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=up_changes";?>">
- <? print $res_array["up_version"]; ?></a><br>
+ <? print htmlentities($res_array["up_version"]); ?></a><br>
<?}
else print $res_array["up_version"].'<br>';?>
</td>
@@ -82,7 +82,7 @@
</td>
<td style="vertical-align: top;"><? print $res_array["dist"]; ?><br>
</td>
- <td style="vertical-align: top;"><? print $res_array["watch_warn"]; ?><br>
+ <td style="vertical-align: top;"><? print htmlentities($res_array["watch_warn"]); ?><br>
</td>
</tr>
<?
@@ -92,6 +92,7 @@
</tbody>
</table>
<br>
+<i>last updated: <? echo htmlentities(date("r")); ?></i>
<br>
</div>
</body>
Modified: trunk/www/no_upstream.php
===================================================================
--- trunk/www/no_upstream.php 2007-11-27 03:59:28 UTC (rev 51)
+++ trunk/www/no_upstream.php 2007-11-27 04:51:23 UTC (rev 52)
@@ -53,7 +53,7 @@
</td>
<td style="vertical-align: top;"><? print $res_array["dist"]; ?><br>
</td>
- <td style="vertical-align: top;"><? print $res_array["watch_warn"]; ?><br>
+ <td style="vertical-align: top;"><? print htmlentities($res_array["watch_warn"]); ?><br>
</td>
</tr>
<?
@@ -63,7 +63,7 @@
</tbody>
</table>
<br>
-<i>last updated: <? echo date("r"); ?></i>
+<i>last updated: <? echo htmlentities(date("r")); ?></i>
<br>
</div>
</body>
Modified: trunk/www/no_watch.php
===================================================================
--- trunk/www/no_watch.php 2007-11-27 03:59:28 UTC (rev 51)
+++ trunk/www/no_watch.php 2007-11-27 04:51:23 UTC (rev 52)
@@ -84,11 +84,11 @@
<td><? print $res_array["name"]; ?><br></td>
<td>
<? if ($res_array[up_changes]!='' AND is_updated($res_array["wwiz_version"],$res_array["version"])) { ?>
-<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=up_changes";?>"><? print $res_array["wwiz_version"]; ?></a><br>
+<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=up_changes";?>"><? print htmlentities($res_array["wwiz_version"]); ?></a><br>
<?}
- else print $res_array["wwiz_version"].'<br>';?>
+ else print htmlentities($res_array["wwiz_version"]).'<br>';?>
</td>
-<td><? print $res_array["version"]; ?><br></td>
+<td><? print htmlentities($res_array["version"]); ?><br></td>
<td><? print number_format ($res_array[bytes]/1024, 0, ",","."); ?><br></td>
<td><? print number_format($res_array["tot_up_error"],0); ?><br>
</td>
@@ -98,7 +98,7 @@
<td>
<?
if ($res_array["wwiz_type"]!="no_cright") {?>
-<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=watch";?>"><? print $res_array["wwiz_type"]; ?></a><br>
+<a href="<? print "wwiz_detail.php?id=$res_array[id]&type=watch";?>"><? print htmlentities($res_array["wwiz_type"]); ?></a><br>
<?}
else print "N/A<br>";
?>
@@ -111,6 +111,7 @@
</tbody>
</table>
<br>
+<i>last updated: <? echo htmlentities(date("r")); ?></i>
<br>
</div>
</body>
@@ -119,7 +120,9 @@
function is_updated ($up_vers,$debian_vers) {
if ($up_vers=='') return 0;
-passthru("dpkg --compare-versions '$up_vers' gt '" . vers_conv($debian_vers) . "'",$great);
+$up_vers = escapeshellarg($up_vers);
+$debian_vers = escapeshellarg(vers_conv($debian_vers));
+passthru("dpkg --compare-versions $up_vers gt $debian_vers",$great);
if ($great==0) return 1;
else return 0;
}
More information about the Dehs-devel
mailing list