cvs: phd(PHD_0_4) /themes/php chmsource.php
| From: | Richard Quadling | Date: | Wed, 17 Jun 2009 11:48:45 +0000 |
| Subject: | cvs: phd(PHD_0_4) /themes/php chmsource.php | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4154@lists.php.net to get a copy of this message | ||
rquadling Wed Jun 17 11:48:45 2009 UTC
Modified files: (Branch: PHD_0_4)
/phd/themes/php chmsource.php
Log:
Add title attribute to anchor tags so address can be seen in CHM files for external links.
http://cvs.php.net/viewvc.cgi/phd/themes/php/chmsource.php?r1=1.4.2.5.2.11&r2=1.4.2.5.2.12&diff_format=u
Index: phd/themes/php/chmsource.php
diff -u phd/themes/php/chmsource.php:1.4.2.5.2.11 phd/themes/php/chmsource.php:1.4.2.5.2.12
--- phd/themes/php/chmsource.php:1.4.2.5.2.11 Sun Feb 15 19:38:23 2009
+++ phd/themes/php/chmsource.php Wed Jun 17 11:48:45 2009
@@ -1,5 +1,5 @@
<?php
-/* $Id: chmsource.php,v 1.4.2.5.2.11 2009/02/15 19:38:23 bjori Exp $ */
+/* $Id: chmsource.php,v 1.4.2.5.2.12 2009/06/17 11:48:45 rquadling Exp $ */
require_once $ROOT . '/themes/php/chunkedhtml.php';
class chmsource extends chunkedhtml {
@@ -381,4 +381,13 @@
return $spaces;
}
+ public function format_link($open, $name, $attrs, $props) {
+ $link = parent::format_link($open, $name, $attrs, $props);
+ // Add title attribute so address can be seen in CHM files.
+ $search = '
<a href="([^"]++)" class="link
external">';
+ $replacement = '<a href="\1" class="link external"
title="Link : \1">';
+ $link = preg_replace($search, $replacement, $link);
+ return $link;
+ }
+
}