Fix viewcvs links for subdirs
Peter Palfrader

Peter Palfrader commited on 2006-03-24 11:32:29
Zeige 1 geänderte Dateien mit 6 Einfügungen und 4 Löschungen.

... ...
@@ -51,11 +51,12 @@ sub do_status($$) {
51 51
 		print "<tr>";
52 52
 		printf "<th>%s</th>", $file;
53 53
 		printf '<td%s>Revision %s%s<br>
54
-		        <a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/en/%s?root=tor&amp;view=markup">HEAD</a>
54
+		        <a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/%sen/%s?root=tor&amp;view=markup">HEAD</a>
55 55
 			%s',
56 56
 			($obs ? ' bgcolor="lightgrey"' : ''),
57 57
 			$files{'en'}->{$file}->{'rev'},
58 58
 			($obs ? ' (obsolete)' :''),
59
+			($dir eq '.' ? '' : $dir.'/'),
59 60
 			$file,
60 61
 			$validatorlink;
61 62
 		for my $lang (@LANGUAGES) {
... ...
@@ -80,8 +81,8 @@ sub do_status($$) {
80 81
 				} else {
81 82
 					$status='not current';
82 83
 					if ($files{$lang}->{$file}->{'based'} ne 'unknown') {
83
-						$difflink=sprintf '<br><a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/en/%s?root=tor&amp;r1=%s&amp;r2=%s">changes in original</a>',
84
-							$file, $files{$lang}->{$file}->{'based'}, $files{'en'}->{$file}->{'rev'};
84
+						$difflink=sprintf '<br><a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/%sen/%s?root=tor&amp;r1=%s&amp;r2=%s">changes in original</a>',
85
+							($dir eq '.' ? '' : $dir.'/'), $file, $files{$lang}->{$file}->{'based'}, $files{'en'}->{$file}->{'rev'};
85 86
 						$color='yellow';
86 87
 					} else {
87 88
 						$difflink='';
... ...
@@ -89,12 +90,13 @@ sub do_status($$) {
89 90
 					};
90 91
 				};
91 92
 				printf '<td bgcolor="%s">%s<br>
92
-					<a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/%s/%s?root=tor&amp;view=markup">HEAD</a><br>
93
+					<a href="http://cvs.seul.org/viewcvs/viewcvs.cgi/website/%s%s/%s?root=tor&amp;view=markup">HEAD</a><br>
93 94
 					%s
94 95
 					%s
95 96
 					%s</td>',
96 97
 					$color,
97 98
 					$status,
99
+					($dir eq '.' ? '' : $dir.'/'),
98 100
 					$lang, $file,
99 101
 					$all_info,
100 102
 					$difflink,
101 103