The following commit has been merged in the master branch:
commit 1c880dbbb5b885dd620120354e735c06280030df
Author: Frank Lichtenheld <[EMAIL PROTECTED]>
Date:   Wed Apr 23 04:45:49 2008 +0200

    Make language override URLs more robust
    
    Previously they were just specified as "?lang=foo" which
    broke horribly when the language was already specified in
    the path_info.
    
    Use make(_search)_url and fix all templates to provide the
    necessary information.

diff --git a/bin/create_index_pages b/bin/create_index_pages
index 8072fa4..3e9fc52 100755
--- a/bin/create_index_pages
+++ b/bin/create_index_pages
@@ -188,12 +188,18 @@ foreach my $source (("", "source/")) {
     foreach my $s (@SUITES) {
        my %common_vars = ( suite => $s,
                            is_source => $source );
-       close_file("$source$s", \%common_vars, 'allpackages');
-       close_txt_file("$source$s", \%common_vars, 'allpackages');
+       my $page_base = "$source$s/";
+       close_file("$source$s", { %common_vars,
+                                 page_name => "${page_base}allpackages" },
+                  'allpackages');
+       close_txt_file("$source$s", { %common_vars,
+                                     page_name => "{$page_base}allpackages" },
+                      'allpackages');
 
        foreach my $sec (keys %{$sections->{$s}}) {
            close_file("$source$s/$sec",
                       { %common_vars,
+                        page_name => "$page_base$sec/",
                         category => { id => N_('Section'),
                                       name => $sec }});
        }
@@ -201,6 +207,7 @@ foreach my $source (("", "source/")) {
            next if $ssec eq '-';
            close_file("$source$s/$ssec",
                       { %common_vars,
+                        page_name => "$page_base$ssec/",
                         category => { id => N_('Subsection'),
                                       name => $ssec }});
        }
@@ -208,6 +215,7 @@ foreach my $source (("", "source/")) {
            next if $prio eq '-';
            close_file("$source$s/$prio",
                       { %common_vars,
+                        page_name => "$page_base$prio/",
                         category => { id => N_('Priority'),
                                       name => $prio }});
        }
diff --git a/bin/parse-debtags-voc b/bin/parse-debtags-voc
index 4fd49f9..7515de1 100755
--- a/bin/parse-debtags-voc
+++ b/bin/parse-debtags-voc
@@ -125,7 +125,8 @@ foreach (@tags) {
 }
 my %content = ( vocabulary => \%voc,
                facets => [EMAIL PROTECTED], tags => [EMAIL PROTECTED],
-               tags_by_facet => \%tags_by_facet );
+               tags_by_facet => \%tags_by_facet,
+               used_langs => [ 'en' ]);
 print TAGLST $template->page( 'tag_index', \%content );
 close TAGLST or warn "Couldn't close tag list: $!";
 
diff --git a/templates/html/download.tmpl b/templates/html/download.tmpl
index c524423..97ef81e 100644
--- a/templates/html/download.tmpl
+++ b/templates/html/download.tmpl
@@ -110,4 +110,4 @@ deb http://<em>[% mirrors.$archive.europa.0 %]</em> [% 
suite %] main [% section
 <tr><th>[% g('SHA256 checksum') %]</th>        <td><tt>[% sha256  || g('Not 
Available') %]</tt></td>
 </table>
 
-[%- PROCESS 'html/foot.tmpl' -%]
+[%- PROCESS 'html/foot.tmpl' page_name="$pkg/download" -%]
diff --git a/templates/html/filelist.tmpl b/templates/html/filelist.tmpl
index e450d5f..73fc883 100644
--- a/templates/html/filelist.tmpl
+++ b/templates/html/filelist.tmpl
@@ -15,4 +15,4 @@
 [% '</pre></div>' IF loop.last -%]
 [% END %]
 
-[%- PROCESS 'html/foot.tmpl' -%]
+[%- PROCESS 'html/foot.tmpl' page_name="$pkg/filelist" -%]
diff --git a/templates/html/foot.tmpl b/templates/html/foot.tmpl
index a6705db..b911d78 100644
--- a/templates/html/foot.tmpl
+++ b/templates/html/foot.tmpl
@@ -14,7 +14,7 @@ Total page evaluation took [% benchmark %]<br>
 <a href="[% IF keyword_esc;
                make_search_url('',"keywords=$keyword_esc",'lang',l.lang);
            ELSE;
-               "$page_name?lang=$l.lang";
+               make_url(page_name,"",'lang',l.lang);
            END %]" title="[% l.tooltip %]" hreflang="[% l.lang %]" lang="[% 
l.lang %]" rel="alternate">[% l.selfname %]
 [%- IF l.transliteration %] ([% l.transliteration %])[% END %]</a>
 [% END %]
diff --git a/templates/html/newpkg.tmpl b/templates/html/newpkg.tmpl
index aaff074..e8c5d3e 100644
--- a/templates/html/newpkg.tmpl
+++ b/templates/html/newpkg.tmpl
@@ -42,4 +42,4 @@
 [% END %]
 </p>
 
-[%- PROCESS 'html/foot.tmpl' -%]
+[%- PROCESS 'html/foot.tmpl' page_name=section ? "$section/newpkg" : "newpkg" 
-%]
diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl
index eec364b..3ebc1a1 100644
--- a/templates/html/show.tmpl
+++ b/templates/html/show.tmpl
@@ -366,4 +366,4 @@
 
 [%# <script type="text/javascript">init_tab_list("ptablist")</script> %]
 
-[%- PROCESS 'html/foot.tmpl' -%]
+[%- PROCESS 'html/foot.tmpl' page_name=pkg -%]
diff --git a/templates/html/suite_index.tmpl b/templates/html/suite_index.tmpl
index aaa971c..9be0784 100644
--- a/templates/html/suite_index.tmpl
+++ b/templates/html/suite_index.tmpl
@@ -45,4 +45,4 @@
        (<a href="allpackages?format=txt.gz">[% g('compact compressed 
textlist') %]</a>)
 </p>
 
-[%- PROCESS 'html/foot.tmpl' -%]
+[%- PROCESS 'html/foot.tmpl' page_name= source ? "source/$suite/" : "$suite/" 
-%]
diff --git a/templates/html/tag_index.tmpl b/templates/html/tag_index.tmpl
index 5f84c5e..5b29df4 100644
--- a/templates/html/tag_index.tmpl
+++ b/templates/html/tag_index.tmpl
@@ -22,4 +22,4 @@
 
 [% END %]
 
-[%- PROCESS 'html/foot.tmpl' -%]
+[%- PROCESS 'html/foot.tmpl' page_name="about/debtags" -%]

-- 
APT Archive Web-Frontend (Alioth repository)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to