[geeklog-cvs] Geeklog-1.x/public_html lib-common.php,1.713,1.714
Dirk Haun
dhaun at qs1489.pair.com
Mon Jul 21 16:15:44 EDT 2008
Update of /cvsroot/geeklog/Geeklog-1.x/public_html
In directory qs1489.pair.com:/tmp/cvs-serv92103/public_html
Modified Files:
lib-common.php
Log Message:
Keep letter case intact when highlighting a search query string (patch provided by Sami Barakat)
Index: lib-common.php
===================================================================
RCS file: /cvsroot/geeklog/Geeklog-1.x/public_html/lib-common.php,v
retrieving revision 1.713
retrieving revision 1.714
diff -C2 -d -r1.713 -r1.714
*** lib-common.php 19 Jul 2008 19:22:37 -0000 1.713
--- lib-common.php 21 Jul 2008 20:15:41 -0000 1.714
***************
*** 5709,5713 ****
{
$searchword = preg_quote( str_replace( "'", "\'", $searchword ));
! $text = preg_replace( '/(\>(((?>[^><]+)|(?R))*)\<)/ie', "preg_replace('/(?>$searchword+)/i','<span class=\"highlight\">$searchword</span>','\\0')", '<!-- x -->' . $text . '<!-- x -->' );
}
}
--- 5709,5713 ----
{
$searchword = preg_quote( str_replace( "'", "\'", $searchword ));
! $text = preg_replace( '/(\>(((?>[^><]+)|(?R))*)\<)/ie', "preg_replace('/(?>$searchword+)/i','<span class=\"highlight\">\\\\0</span>','\\0')", '<!-- x -->' . $text . '<!-- x -->' );
}
}
More information about the geeklog-cvs
mailing list