]> git.donarmstrong.com Git - debbugs.git/commitdiff
remove useless duplicated functions
authorDon Armstrong <don@volo>
Wed, 21 Feb 2007 08:09:50 +0000 (00:09 -0800)
committerDon Armstrong <don@volo>
Wed, 21 Feb 2007 08:09:50 +0000 (00:09 -0800)
Debbugs/CGI.pm
cgi/bugreport.cgi
cgi/common.pl
cgi/version.cgi
scripts/errorlib.in

index ea4d67b91a3f4e870a12ffb0d9735b7d7d0b36ee..e8321299cc7debab922a980e108df2dbedc0a9f5 100644 (file)
@@ -32,6 +32,7 @@ use HTML::Entities;
 use Debbugs::Common qw(getparsedaddrs);
 use Params::Validate qw(validate_with :types);
 use Debbugs::Config qw(:config);
+use Debbugs::Status qw(splitpackages);
 use Mail::Address;
 use POSIX qw(ceil);
 use Storable qw(dclone);
@@ -52,7 +53,7 @@ BEGIN{
                                qw(maybelink htmlize_addresslinks htmlize_maintlinks),
                               ],
                     util   => [qw(cgi_parameters quitcgi),
-                               qw(getmaintainers getpseudodesc splitpackages)
+                               qw(getmaintainers getpseudodesc)
                               ],
                     #status => [qw(getbugstatus)],
                    );
@@ -340,14 +341,6 @@ sub htmlize_bugstatus {
     return $result;
 }
 
-# Split a package string from the status file into a list of package names.
-sub splitpackages {
-    my $pkgs = shift;
-    return unless defined $pkgs;
-    return map lc, split /[ \t?,()]+/, $pkgs;
-}
-
-
 =head2 htmlize_packagelinks
 
      htmlize_packagelinks
index c49902e7626ae068869891baa8e2ab1b343a5733..65c20c208aede2630bb4cf8e7335e07963fe6d3b 100755 (executable)
@@ -16,7 +16,7 @@ use Debbugs::MIME qw(convert_to_utf8 decode_rfc1522 create_mime_message);
 use Debbugs::CGI qw(:url :html :util);
 use Debbugs::Common qw(buglog);
 use Debbugs::Packages qw(getpkgsrc);
-use Debbugs::Status qw(get_bug_status isstrongseverity);
+use Debbugs::Status qw(splitpackages get_bug_status isstrongseverity);
 
 use Scalar::Util qw(looks_like_number);
 use CGI::Simple;
index 3de27b2ebd07fe199f5c8188fc67807bdebb9266..5805907ce62eb18a055b644ac17ab968ff1c7014 100644 (file)
@@ -11,13 +11,13 @@ use URI::Escape;
 use Debbugs::Config qw(:globals :text);
 $config_path = '/etc/debbugs';
 $lib_path = '/usr/lib/debbugs';
-require "$lib_path/errorlib";
+#require "$lib_path/errorlib";
 
 use Debbugs::Packages qw(:versions :mapping);
 use Debbugs::Versions;
 use Debbugs::MIME qw(decode_rfc1522);
 use Debbugs::Common qw(:util);
-use Debbugs::Status qw(:read :versions);
+use Debbugs::Status qw(:status :read :versions);
 use Debbugs::CGI qw(:all);
 
 $MLDBM::RemoveTaint = 1;
@@ -236,22 +236,6 @@ $debug = 1 if (defined $ret{"debug"} && $ret{"debug"} eq "aj");
     return %ret;
 }
 
-#sub abort {
-#    my $msg = shift;
-#    my $Archive = $common_archive ? "archive" : "";
-#    print header . start_html("Sorry");
-#    print "Sorry bug #$msg doesn't seem to be in the $Archive database.\n";
-#    print end_html;
-#    exit 0;
-#}
-
-# Split a package string from the status file into a list of package names.
-sub splitpackages {
-    my $pkgs = shift;
-    return unless defined $pkgs;
-    return map lc, split /[ \t?,()]+/, $pkgs;
-}
-
 # Generate a comma-separated list of HTML links to each package given in
 # $pkgs. $pkgs may be empty, in which case an empty string is returned, or
 # it may be a comma-separated list of package names.
@@ -386,8 +370,6 @@ sub urlargs {
     return $args;
 }
 
-sub submitterurl { pkg_url(submitter => emailfromrfc822($_[0] || "")); }
-sub mainturl { pkg_url(maint => emailfromrfc822($_[0] || "")); }
 sub pkgurl { pkg_url(pkg => $_[0] || ""); }
 sub srcurl { pkg_url(src => $_[0] || ""); }
 sub tagurl { pkg_url(tag => $_[0] || ""); }
index d75edcf2cff233fbea5ac2801f778ed316364dd8..105111a351d4bd880cae056f78a237f99df1f627 100755 (executable)
@@ -131,6 +131,8 @@ my %state = (found  => ['fillcolor="salmon"',
                        'shape="rect"',
                       ],
            );
+# TODO: Allow collapsing versions which are at the same state and not
+# in a suite.
 foreach my $key (keys %all_states) {
      my ($short_version) = $key =~ m{/(.+)$};
      next if $cgi_var{ignore_boring} and (not defined $all_states{$key}
index 18c134256a9bfe72677dfa7d9e89b698196b45a6..a93c79bf3542e376203c79f1664de98dbe839130 100755 (executable)
@@ -68,13 +68,6 @@ sub escapelog {
        return \@log;
 }
 
-sub isstrongseverity {
-    my $severity = shift;
-    $severity = $gDefaultSeverity if $severity eq '';
-    return grep { $_ eq $severity } @gStrongSeverities;
-}
-
-
 @severities= grep { not exists $gObsoleteSeverities{$_} } @gSeverityList;
 @showseverities= @severities;
 grep ($_= $_ eq '' ? $gDefaultSeverity : $_, @showseverities);