From: Don Armstrong Date: Thu, 22 Jun 2017 02:16:12 +0000 (-0700) Subject: Include the protocol (http://) in gWebDomain and gCGIDomain X-Git-Tag: release/2.6.0~136 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=611a4b401fce2979a485476787afb136acf86af9 Include the protocol (http://) in gWebDomain and gCGIDomain We now include the protocol so that we can easily specify all https links instead of http links. --- diff --git a/Debbugs/CGI/Pkgreport.pm b/Debbugs/CGI/Pkgreport.pm index 3e9cb3f..4391197 100644 --- a/Debbugs/CGI/Pkgreport.pm +++ b/Debbugs/CGI/Pkgreport.pm @@ -128,7 +128,7 @@ sub generate_package_info{ my @references; my $pseudodesc = getpseudodesc(); if ($package and defined($pseudodesc) and exists($pseudodesc->{$package})) { - push @references, "to the ". + push @references, "to the ". "list of other pseudo-packages"; } elsif (not defined $maint and not @{$param{bugs}}) { @@ -141,14 +141,14 @@ sub generate_package_info{ else { if ($package and defined $config{package_pages} and length $config{package_pages}) { push @references, sprintf "to the %s package page", - html_escape("http://$config{package_pages}/$package"), html_escape("$package"); + html_escape("$config{package_pages}/$package"), html_escape("$package"); } if (defined $config{subscription_domain} and length $config{subscription_domain}) { my $ptslink = $param{binary} ? $srcforpkg : $package; # the pts only wants the source, and doesn't care about src: (#566089) $ptslink =~ s/^src://; - push @references, q(to the Package Tracking System); + push @references, q(to the Package Tracking System); } # Only output this if the source listing is non-trivial. if ($param{binary} and $srcforpkg) { @@ -166,7 +166,7 @@ sub generate_package_info{ if (defined $maint) { print {$output} "

If you find a bug not listed here, please\n"; printf {$output} "report it.

\n", - html_escape("http://$config{web_domain}/Reporting$config{html_suffix}"); + html_escape("$config{web_domain}/Reporting$config{html_suffix}"); } return decode_utf8($output_scalar); } diff --git a/Debbugs/Config.pm b/Debbugs/Config.pm index 454db35..c40b74d 100644 --- a/Debbugs/Config.pm +++ b/Debbugs/Config.pm @@ -151,12 +151,13 @@ set_default(\%config,'web_host_bug_dir',''); =item web_domain $gWebDomain -Full path of the web domain where bugs are kept, defaults to the -concatenation of L and L +Full path of the web domain where bugs are kept including the protocol (http:// +or https://). Defaults to the concatenation of 'http://', L and +L =cut -set_default(\%config,'web_domain',$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir}); +set_default(\%config,'web_domain','http://'.$config{web_host}.($config{web_host}=~m{/$}?'':'/').$config{web_host_bug_dir}); =item html_suffix $gHTMLSuffix @@ -169,7 +170,7 @@ set_default(\%config,'html_suffix','.html'); =item cgi_domain $gCGIDomain Full path of the web domain where cgi scripts are kept. Defaults to -the concatentation of L and cgi. +the concatentation of L and cgi. =cut @@ -984,7 +985,7 @@ libravatar.cgi, our internal federated libravatar system. =cut -set_default(\%config,'libravatar_uri','http://'.$config{cgi_domain}.'/libravatar.cgi?email='); +set_default(\%config,'libravatar_uri',$config{cgi_domain}.'/libravatar.cgi?email='); =item libravatar_uri_options $gLibravatarUriOptions @@ -1081,7 +1082,7 @@ set_default(\%config,'html_tail',<

- Debian $config{bug} tracking system
+ Debian $config{bug} tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson. diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm index 2378ea1..aaa8925 100644 --- a/Debbugs/Control.pm +++ b/Debbugs/Control.pm @@ -3835,7 +3835,7 @@ sub __message_body_template{ $extra_var ||={}; my $hole_var = {'&bugurl' => sub{"$_[0]: ". - 'http://'.$config{cgi_domain}.'/'. + $config{cgi_domain}.'/'. Debbugs::CGI::bug_links(bug => $_[0], links_only => 1, ); diff --git a/html/index.html.in b/html/index.html.in index d1b5682..5e8b466 100644 --- a/html/index.html.in +++ b/html/index.html.in @@ -36,13 +36,13 @@ $gHTMLCopies

Find a bug by number:
-

+ as mbox
-
+

Find bugs by: package source package @@ -57,24 +57,24 @@ What to search for:

The following bug report indices are available:

diff --git a/html/server-request.html.in b/html/server-request.html.in index 7941c53..22021a8 100644 --- a/html/server-request.html.in +++ b/html/server-request.html.in @@ -179,7 +179,7 @@ sending help to control\@$gEmailDomain.

In case you are reading this as a plain text file or via email: an HTML version is available via the $gBug system main contents page -http://$gWebDomain/. +$gWebDomain/.


diff --git a/scripts/config.in.default b/scripts/config.in.default index d8c8ea1..f8c03b2 100644 --- a/scripts/config.in.default +++ b/scripts/config.in.default @@ -3,7 +3,7 @@ $gEmailDomain = "bugs.top.domain"; #bugs.debian.org $gListDomain = "lists.top.domain"; #lists.debian.org $gWebHostBugDir = ""; -$gWebDomain = "www.top.domain"; #www.debian.org/Bugs +$gWebDomain = "https://www.top.domain"; #www.debian.org/Bugs $gCGIDomain = "cgi.top.domain"; #cgi.debian.org #Identification diff --git a/scripts/mailsummary b/scripts/mailsummary index 1ed2e0b..9e04332 100755 --- a/scripts/mailsummary +++ b/scripts/mailsummary @@ -74,7 +74,7 @@ Every Friday, the listing by age of the report is posted. Please see the documentation for more information about how to use the $gBug tracking system. It is available on the WWW at -$gWebDomain/txt +$gWebDomain/txt END close(D); diff --git a/scripts/process b/scripts/process index 716e0a5..089fa46 100755 --- a/scripts/process +++ b/scripts/process @@ -1262,7 +1262,7 @@ sub fill_template{ }; my $hole_var = {'&bugurl' => sub{"$_[0]: ". - 'http://'.$config{cgi_domain}.'/'. + $config{cgi_domain}.'/'. Debbugs::CGI::bug_links(bug=>$_[0], links_only => 1, ); diff --git a/scripts/receive b/scripts/receive index eb101a4..86367bf 100755 --- a/scripts/receive +++ b/scripts/receive @@ -103,10 +103,10 @@ $gBadEmailPrefix $gBadEmailPrefix (all \@$gEmailDomain.) $gBadEmailPrefix $gBadEmailPrefix For instructions via the WWW see: -$gBadEmailPrefix http://$gWebDomain/ -$gBadEmailPrefix http://$gWebDomain/Reporting$gHTMLSuffix -$gBadEmailPrefix http://$gWebDomain/Developer$gHTMLSuffix -$gBadEmailPrefix http://$gWebDomain/Access$gHTMLSuffix +$gBadEmailPrefix $gWebDomain/ +$gBadEmailPrefix $gWebDomain/Reporting$gHTMLSuffix +$gBadEmailPrefix $gWebDomain/Developer$gHTMLSuffix +$gBadEmailPrefix $gWebDomain/Access$gHTMLSuffix $gTextInstructions $gBadEmailPrefix For details of how to access $gBug report logs by email: $gBadEmailPrefix send \`request\@$gEmailDomain' the word \`help' diff --git a/scripts/service b/scripts/service index 10fbbc0..0059ef7 100755 --- a/scripts/service +++ b/scripts/service @@ -285,7 +285,7 @@ for ($procline=0; $procline<=$#bodylines; $procline++) { } elsif (m/^subscribe/i) { print {$transcript} < sub{"$_[0]: ". - 'http://'.$config{cgi_domain}.'/'. + $config{cgi_domain}.'/'. Debbugs::CGI::bug_links(bug=>$_[0], links_only => 1, ); @@ -901,7 +901,7 @@ END sub sendlynxdocraw { my ($relpath,$description) = @_; $doc=''; - open(L,"lynx -nolist -dump http://$gCGIDomain/\Q$relpath\E 2>&1 |") || die "fork for lynx: $!"; + open(L,"lynx -nolist -dump $gCGIDomain/\Q$relpath\E 2>&1 |") || die "fork for lynx: $!"; while() { $doc.=$_; } $!=0; close(L); if ($? == 255 && $doc =~ m/^\n*lynx: Can\'t access start file/) { diff --git a/scripts/text b/scripts/text index a1a6a00..a6ae98e 100644 --- a/scripts/text +++ b/scripts/text @@ -181,7 +181,7 @@ $gHTMLTail = "

- Debian $gBug tracking system
+ Debian $gBug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson. diff --git a/templates/en_US/cgi/bugreport.tmpl b/templates/en_US/cgi/bugreport.tmpl index b4ec416..2f0ec04 100644 --- a/templates/en_US/cgi/bugreport.tmpl +++ b/templates/en_US/cgi/bugreport.tmpl @@ -43,7 +43,7 @@ function toggle_infmessages() } {$log}


-

Send a report that this bug log contains spam.

+

Send a report that this bug log contains spam.


{include(q(html/html_tail))} diff --git a/templates/en_US/cgi/no_such_bug.tmpl b/templates/en_US/cgi/no_such_bug.tmpl index 5434b53..bdbd67d 100644 --- a/templates/en_US/cgi/no_such_bug.tmpl +++ b/templates/en_US/cgi/no_such_bug.tmpl @@ -4,6 +4,6 @@

{$config{project}} {$config{bug}} report logs - #{$bug_num}

There is no record of {$config{bug}} #{$bug_num}. -Try the search page instead.

+Try the search page instead.

{#include('html/html_tail')} diff --git a/templates/en_US/html/html_tail.tmpl b/templates/en_US/html/html_tail.tmpl index 69149ec..0cafbb9 100644 --- a/templates/en_US/html/html_tail.tmpl +++ b/templates/en_US/html/html_tail.tmpl @@ -4,7 +4,7 @@ Last modified: Machine Name: {$config{machine_name}||'Unknown'}

-{$config{project}} {$config{bug}} tracking system
+{$config{project}} {$config{bug}} tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson. diff --git a/templates/en_US/mail/process_no_package.tmpl b/templates/en_US/mail/process_no_package.tmpl index 92c8b0a..ccfc486 100644 --- a/templates/en_US/mail/process_no_package.tmpl +++ b/templates/en_US/mail/process_no_package.tmpl @@ -7,7 +7,7 @@ Without this information we are unable to categorise or otherwise deal with your problem report. Please _resubmit_ your report to {$baddress}@{$config{email_domain}} and tell us which package the report is for. For help, check out -http://{$config{web_domain}}/Reporting{$config{html_suffix}}. +{$config{web_domain}}/Reporting{$config{html_suffix}}. Your message was dated {$date} and had message-id {$messageid}