W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2010

link-checker commit: Don't hardcode path to info icons, use Doc_URI to resolve it.

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 05 Aug 2010 14:47:18 +0000
To: link-checker updates <www-validator-cvs@w3.org>
Message-Id: <E1Oh1j4-0006B1-Ql@blinky.w3.org>
changeset:   279:4f247020b528
user:        ville
date:        Tue Feb 10 18:34:38 2009 +0000
files:       bin/checklink
description:
Don't hardcode path to info icons, use Doc_URI to resolve it.


diff -r cbc7f47c4b3b -r 4f247020b528 bin/checklink
--- a/bin/checklink	Tue Feb 10 18:27:17 2009 +0000
+++ b/bin/checklink	Tue Feb 10 18:34:38 2009 +0000
@@ -5,7 +5,7 @@
 # (c) 1999-2009 World Wide Web Consortium
 # based on Renaud Bruyeron's checklink.pl
 #
-# $Id: checklink,v 4.140 2009-02-10 18:27:17 ville Exp $
+# $Id: checklink,v 4.141 2009-02-10 18:34:38 ville Exp $
 #
 # This program is licensed under the W3C(r) Software License:
 #       http://www.w3.org/Consortium/Legal/copyright-software
@@ -267,7 +267,7 @@
   $PROGRAM     = 'W3C-checklink';
   $VERSION     = '4.4';
   $REVISION    = sprintf('version %s (c) 1999-2009 W3C', $VERSION);
-  my ($cvsver) = q$Revision: 4.140 $ =~ /(\d+[\d\.]*\.\d+)/;
+  my ($cvsver) = q$Revision: 4.141 $ =~ /(\d+[\d\.]*\.\d+)/;
   $AGENT       = sprintf('%s/%s [%s] %s',
                          $PROGRAM, $VERSION, $cvsver,
                          (W3C::UserAgent::USE_ROBOT_UA
@@ -2416,8 +2416,10 @@
   } else {
     $icon_type = 'error';
   }
-  return('<span class="err_type"><img src="http://validator.w3.org/images/info_icons/'.$icon_type.'.png" alt="'.$icon_type.'" /></span>');
-
+  return sprintf('<span class="err_type"><img src="%s" alt="%s" /></span>',
+                 URI->new_abs("../images/info_icons/$icon_type.png",
+                              $Cfg{Doc_URI}),
+                 $icon_type);
 }
 
 sub bgcolor ($)
Received on Thursday, 5 August 2010 14:47:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC