perl/modules/W3C/LinkChecker/bin checklink,4.73,4.74

Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv15063

Modified Files:
	checklink 
Log Message:
modifying wording and display of the report for broken frags

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.73
retrieving revision 4.74
diff -u -d -r4.73 -r4.74
--- checklink	18 Sep 2007 06:43:25 -0000	4.73
+++ checklink	18 Sep 2007 07:18:46 -0000	4.74
@@ -1888,12 +1888,7 @@
              $lines_list);
       if ($#fragments >= 0) {
         my $fragment_direction = '';
-        if ($currloc->{code} == 200) {
-          $fragment_direction =
-            ' <strong>They need to be fixed!</strong>';
-        }
-        printf("<dd><dl><dt>Broken fragments and their line numbers: %s</dt>\n",
-               $fragment_direction);
+        printf("<dd>Broken fragments: <ul>\n");
       }
     } else {
       my $redirmsg = $redirect_loop ? ' redirect loop detected' : '';
@@ -1919,9 +1914,9 @@
     # Fragments
     foreach my $f (@fragments) {
       if ($Opts{HTML}) {
-        printf("<dd>%s: %s</dd>\n",
+        printf("<li>$u<em>#%s</em> (Linked on line(s) %s)</li>\n",
                # Broken fragment
-               &show_url($u, $f),
+               $f,
                # List of lines
                join(', ', &sort_unique(keys %{$links->{$u}{fragments}{$f}})));
       } else {
@@ -1936,7 +1931,7 @@
       }
     }
 
-    print("</dl></dd>\n") if ($Opts{HTML} && scalar(@fragments));
+    print("</ul></dd>\n") if ($Opts{HTML} && scalar(@fragments));
   }
 
   # End of the table
@@ -1960,7 +1955,7 @@
 {
   # Advices to fix the problems
 
-  my %todo = ( 200 => 'There are broken fragments which must be fixed.',
+  my %todo = ( 200 => 'Some of the links to this resource point to broken URI fragments, which should be removed or fixed.',
                300 => 'It usually means that there is a typo in a link that triggers mod_speling action - this must be fixed!',
                301 => 'This is a permanent redirect. The link should be updated.',
                302 => 'This is a temporary redirect. Update the link if you believe it makes sense, or leave it as is.',
@@ -2189,7 +2184,7 @@
   my $icon_type;
   my $r = HTTP::Response->new($code);
   if ($r->is_success()) {
-    return '';
+    $icon_type = 'error'; # if is success but reported, it's because of broken frags => error
   } elsif ($code == RC_ROBOTS_TXT()) {
     $icon_type = 'info';
   } elsif ($code == 300) {

Received on Tuesday, 18 September 2007 07:18:54 UTC