diff options
author | jchu <jchu> | 2004-12-26 20:12:46 +0000 |
---|---|---|
committer | jchu <jchu> | 2004-12-26 20:12:46 +0000 |
commit | 91c3f94ff9df319b548cd332566198b72f8124cd (patch) | |
tree | 17fc5b3a4a8ba5e9f24e8e1084ea7cf45e16935f | |
parent | 3606143e6fcbb4dc27632c41d6bfc6c10d535b08 (diff) | |
download | aurweb-91c3f94ff9df319b548cd332566198b72f8124cd.tar.xz |
commited neotuli's patch for source links
-rwxr-xr-x | tupkg/client/tupkg | 18 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc | 12 |
2 files changed, 22 insertions, 8 deletions
diff --git a/tupkg/client/tupkg b/tupkg/client/tupkg index a96923e..380dc53 100755 --- a/tupkg/client/tupkg +++ b/tupkg/client/tupkg @@ -159,17 +159,21 @@ def main(argv=None): return 1 cs = ClientSocket(files, confdict['host'], confdict['port'], confdict['user'], confdict['password']) - cs.connect() + try: + cs.connect() - if not cs.auth(): - print "Error authenticating you, you bastard" - return 1 + if not cs.auth(): + print "Error authenticating you, you bastard" + return 1 - cs.sendFileMeta() + cs.sendFileMeta() - cs.sendFiles() + cs.sendFiles() - cs.close() + cs.close() + except KeyboardInterrupt: + print "Cancelling" + cs.close() return 0 diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 7a45bc2..2a6fda2 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -293,7 +293,17 @@ function package_details($id=0) { print "<tr><td class='boxSoft'>"; $sources = package_sources($row["ID"]); # $sources[0] = 'src'; while (list($k, $src) = each($sources)) { - print "<a href='".$src."'>".$src."</a><br />\n"; + $parsed_url = parse_url($src); + if ($parsed_url['scheme']) + { + //It is an external source + print "<a href='".$src."'>".$src."</a><br />\n"; + } + else + { + //It is presumably an internal source + print "<a href='".dirname($row['URLPath'])."/".$row['Name']."/".$src."'>".$src."</a><br />\n"; + } } print "</td></tr>\n"; print "</table></td>"; |