More web fixes.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 4 May 2010 07:37:32 +0000 (17:07 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 4 May 2010 07:37:32 +0000 (17:07 +0930)
web/static-configuration
web/staticmoduleinfo.php

index 3eeda9a2c40af042dfa05f8a273b5472cae3ccce..1f392eba91f33f58a7f5ddf96e4ad06e0808257c 100644 (file)
@@ -18,7 +18,7 @@ $frommail = "ccan@ozlabs.org";
 $tar_dir = 'tarballs';
 
 //where bzr repo is: attach module name to browse
-$repo_base = 'http://ccan.ozlabs.org/browse/';
+$repo_base = 'http://ccan.ozlabs.org/browse/ccan/';
 
 function extract_field($field,$module)
 {
index b9fac443d5439fd659dbdb1bcb64b62e1397bfd3..0d04d6686a9ab86373f451e02a24f86b878bd9bb 100644 (file)
@@ -3,16 +3,16 @@ session_start();
 include('logo.html');
 include('menulist.html');
 include('static-configuration');
-$module=$argv[1];
-
-$maintainer=extract_field('maintainer',$module);
-$author=extract_field('author',$module);
-$summary=extract_field('summary',$module);
-$description=htmlize_field('description',$module);
-$example=extract_field('example',$module);
-$dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module));
-$extdepends=htmlspecialchars(shell_exec('tools/ccan_depends --compile --non-ccan '.$module));
-$licence=extract_field('licence',$module);
+$module_path=$argv[1];
+$module=basename($module_path);
+$maintainer=extract_field('maintainer',$module_path);
+$author=extract_field('author',$module_path);
+$summary=extract_field('summary',$module_path);
+$description=htmlize_field('description',$module_path);
+$example=extract_field('example',$module_path);
+$dependencies=htmlspecialchars(shell_exec('tools/ccan_depends --direct '.$module_path));
+$extdepends=htmlspecialchars(shell_exec('tools/ccan_depends --compile --non-ccan '.$module_path));
+$licence=extract_field('licence',$module_path);
 ?>
 <table align="center" bgcolor="lightblue" width="70%" border="0" cellpadding="3" cellspacing="1">
 <tr align="center" bgcolor="FFFFCC">
@@ -20,8 +20,8 @@ $licence=extract_field('licence',$module);
 <a href="<?=$repo_base.$module?>">Browse Source</a>
 </td>
 <td>
-<a href="../<?=$tar_dir?>/with-deps/<?=basename($module)?>.tar.bz2">Download</a>
-<a href="../<?=$tar_dir?>/<?=basename($module)?>.tar.bz2">(without any required ccan dependencies)</a>
+<a href="../<?=$tar_dir?>/with-deps/<?=$module?>.tar.bz2">Download</a>
+<a href="../<?=$tar_dir?>/<?=$module?>.tar.bz2">(without any required ccan dependencies)</a>
 </tr>
 </table>