[evolvis-commits] r17235: restore second argument to util_uri_grabber

mirabilos at evolvis.org mirabilos at evolvis.org
Fri May 13 18:14:05 CEST 2011


Author: mirabilos
Date: 2011-05-13 18:14:04 +0200 (Fri, 13 May 2011)
New Revision: 17235

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php
Log:
restore second argument to util_uri_grabber


Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php	2011-05-13 16:14:01 UTC (rev 17234)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/utils.php	2011-05-13 16:14:04 UTC (rev 17235)
@@ -1537,7 +1537,7 @@
 }
 
 /* takes a string and returns it HTML encoded, URIs made to hrefs */
-function util_uri_grabber($unencoded_string) {
+function util_uri_grabber($unencoded_string, $tryaidtid=false) {
 	/* escape all ^A and ^B as ^BX^B and ^BY^B, respectively */
 	$s = str_replace("\x01", "\x02X\x02", str_replace("\x02", "\x02Y\x02",
 	    $unencoded_string));
@@ -1554,6 +1554,9 @@
 	    '<a href="$1">$1</a>', $s);
 	if (!$s)
 		return htmlentities($unencoded_string, ENT_QUOTES, "UTF-8");
+	/* convert [#123] to links if found */
+	if ($tryaidtid)
+		$s = util_tasktracker_links($s);
 	/* convert ^BX^B and ^BY^B back to ^A and ^B, respectively */
 	$s = str_replace("\x02Y\x02", "\x02", str_replace("\x02X\x02", "\x01",
 	    $s));



More information about the evolvis-commits mailing list