Skip to content

Commit d7d6404

Browse files
committed
Download page links were no longer correct
1 parent f4f7e29 commit d7d6404

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Eclipse update site/WebContent/download.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,28 @@ function ListFileNames( $prefix)
3232
{
3333
if(($file != ".") and ($file != "..") and ($file != "index.php"))
3434
{
35-
$files[] = $file; // put in array.
35+
$files[] = $location."/".$file; // put in array.
3636
}
3737
}
3838
closedir($dir);
39+
3940
$location="../download/product";
4041
$dir = opendir($location);
4142
while(false != ($file = readdir($dir)))
4243
{
4344
if(($file != ".") and ($file != "..") and ($file != "index.php"))
4445
{
45-
$files[] = $file; // put in array.
46+
$files[] = $location."/".$file; // put in array.
4647
}
4748
}
4849
closedir($dir);
4950
rsort($files); // sort.
5051

5152
foreach($files as $file)
5253
{
53-
$fullpath = $location."/".$file;
54-
if (substr($file,0,strlen($prefix))==$prefix)
55-
echo "<a href=\"$fullpath\" target=\"_blank\">$file</a>\n<br>";
54+
$refname=basename($file);
55+
if (substr($refname,0,strlen($prefix))==$prefix)
56+
echo "<a href=\"$file\" target=\"_blank\">$refname</a>\n<br>";
5657
}
5758
}
5859
?>
@@ -87,4 +88,3 @@ function ListFileNames( $prefix)
8788
<br>
8889
</body>
8990
</html>
90-

0 commit comments

Comments
 (0)