No need to display the section heading when there are no URLs available
authorJoey Schulze <joey@infodrom.org>
Sun, 1 May 2005 04:31:46 +0000 (04:31 +0000)
committerJoey Schulze <joey@infodrom.org>
Sun, 1 May 2005 04:31:46 +0000 (04:31 +0000)
src/LinuxTag/2005/projects/show.wml

index cd515c4..cdb6b7e 100644 (file)
     $query = sprintf ("SELECT oid,url,description FROM urls WHERE project = '%s'", $project);
     $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
 
+    if (!strlen ($url) && pg_NumRows ($sth) == 0) {
+      return;
+    }
+
     echo ("<strong>URLs</strong>:<br>");
     if (strlen ($url)) {
       printf ("&nbsp;&nbsp;<a href=\"%s\">%s</a> <br>", $url, $project);