cvs: pearweb /include pear-format-html.php
| From: | Helgi �ormar �orbj�rnsson | Date: | Thu, 12 Mar 2009 22:57:01 +0000 |
| Subject: | cvs: pearweb /include pear-format-html.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-8264@lists.php.net to get a copy of this message | ||
dufuz Thu Mar 12 22:57:01 2009 UTC
Modified files:
/pearweb/include pear-format-html.php
Log:
Fix Bug #15905 wrong links on packages changelog
http://cvs.php.net/viewvc.cgi/pearweb/include/pear-format-html.php?r1=1.276&r2=1.277&diff_format=u
Index: pearweb/include/pear-format-html.php
diff -u pearweb/include/pear-format-html.php:1.276 pearweb/include/pear-format-html.php:1.277
--- pearweb/include/pear-format-html.php:1.276 Sat Mar 7 15:55:59 2009
+++ pearweb/include/pear-format-html.php Thu Mar 12 22:57:01 2009
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: pear-format-html.php,v 1.276 2009/03/07 15:55:59 wiesemann Exp $
+ $Id: pear-format-html.php,v 1.277 2009/03/12 22:57:01 dufuz Exp $
*/
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'error_handler');
@@ -850,11 +850,12 @@
* If the bug number is prefixed by the word "PHP," the link will
* go to bugs.php.net. Otherwise, the bug is considered a PEAR bug.
*
- * @param string $text the text to check for bug numbers
+ * @param string $text the text to check for bug numbers
+ * @param string $urlPrefix In case we need to prefix the url
*
* @return string the string with bug numbers hyperlinked
*/
-function make_ticket_links($text)
+function make_ticket_links($text, $urlPrefix = '')
{
global $dbh;
$text = preg_replace('/#patch
bug:([0-9]+);patch:([0-9a-z_\-\.]+);revision:([0-9]+);/i',
@@ -873,7 +874,7 @@
foreach ($res as $k => $b) {
$t = $matches[0][$k];
$title = $b['package_name'] . ': ' . $b['sdesc'];
- $link = make_link($matches[2][$k], $t, null, null, $title);
+ $link = make_link($urlPrefix . $matches[2][$k], $t, null, null, $title);
$text = str_replace($t, $link, $text);
}
}