]> git.ozlabs.org Git - ccan/blobdiff - web/dispmoduleinfo.php
Rusty's cleanup to ciniparser.c's strstrip and strlwc
[ccan] / web / dispmoduleinfo.php
index b6f0817286c6b6c48bdbf31aa7e247071111b44e..3906d3cc87257ca4261bfe4960d33c09a976d6c6 100644 (file)
@@ -8,25 +8,20 @@ $handle = sqlite3_open($db) or die("Could not open database");
 $query = "select * from search where module=\"".$_GET['module']."\"";
 $result = sqlite3_query($handle, $query) or die("Error in query: ".sqlite3_error($handle));
 $row = sqlite3_fetch_array($result);
-
-if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module'].".tar")) {
-       chdir($repopath);
-       exec("tar -cvvf ".$ccan_home_dir. $_GET['module']. "/". $_GET['module'].".tar ". $ccan_home_dir.$_GET['module'], $status);
-       chdir("..");
-}
-
-if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module']."_dep.tar")) {
-       chdir($repopath);
-       exec($create_dep_tar." ".$ccan_home_dir.$_GET['module'], $status);
-       chdir("..");
-}
-
-
 ?>
 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
 <tr align="center" bgcolor="FFFFCC">
-<td width="50%"><a href=<?=$repopath . $ccan_home_dir.$_GET['module']?>/<?=$_GET['module']?>.tar>Download</a></td>
-<td><a href=<?=$repopath . $ccan_home_dir.$_GET['module']?>/<?=$_GET['module']?>_dep.tar>Download Dependencies</a></td>
+<td width="50%">
+       <?php 
+               if(file_exists($tar_dir . $_GET['module'].".tar"))
+                       echo '<a href='. $tar_dir . $_GET['module'] . '.tar>Download</a>';
+       ?>
+<td>
+       <?php 
+               if(file_exists($tar_dir . $_GET['module']."_with_deps.tar"))
+                       echo '<a href='. $tar_dir . $_GET['module'] . '_with_deps.tar>Download Dependencies</a>';
+       ?>
+</td>
 </tr>
 </table>
 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="8" cellspacing="1">
@@ -42,7 +37,21 @@ if (!file_exists($repopath . $ccan_home_dir.$_GET['module']."/".$_GET['module'].
 <td><h3>Author: </h3> <pre><a href=search.php?author=<?=$row['author'];?>><?=$row['author'];?></a></pre></td>
 </tr>
 
+<tr align="left" bgcolor="FFFFCC">
+<td><h3>Dependencies: </h3> <pre><?=$row['depends'];?></pre></td>
+</tr>
+
 <tr align="left" bgcolor="FFFFCC">
 <td><h3>Description: </h3> <pre><?=$row['desc'];?></pre></td>
 </tr>
 </table><hr>
+
+<?php 
+function checkerror($status, $msg)
+{
+       if($status != 0) {
+                   echo "<div align=\"center\">" . $msg . "Contact ccan admin. </div>";
+                   exit();
+       }
+} 
+?>