Doc #63490 [Opn]: Searching for _

From: Date: Mon, 03 Dec 2012 01:54:21 +0000
Subject: Doc #63490 [Opn]: Searching for _
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9243@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=63490&edit=1 ID: 63490 Updated by: aharvey@php.net Reported by: php at jtrick dot net Summary: Searching for _ Status: Open Type: Documentation Problem Package: Website problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Quite literally this, which doesn't fill me with great joy: diff --git a/include/manual-lookup.inc b/include/manual-lookup.inc index d12d7e1..f21dc18 100644 --- a/include/manual-lookup.inc +++ b/include/manual-lookup.inc @@ -83,6 +83,10 @@ function find_manual_page_slow($lang, $keyword) // page shortcuts, so we avoid stat() calls on the server function find_manual_page($lang, $keyword) { + if ($keyword == '_') { + $keyword = 'function.gettext'; + } + // If there is no sqlite support, or we are unable to // open the database, fall back to normal search. Use // open rather than popen to avoid any chance of confusion Previous Comments: ------------------------------------------------------------------------ [2012-12-02 05:59:56] bjori@php.net Thats just weird. http://php.net/_ works just fine, I've no idea how http://us3.php.net/manual- lookup.php?pattern=_&scope=quickref winds up on the about page... Since this is a real alias it is most definitely in the sqlite databaes so I've no idea what is going on here (and haven't actually looked).. What sort of hack where you thinking about Adam? ------------------------------------------------------------------------ [2012-11-12 03:20:50] aharvey@php.net I can add a hack to find_manual_page() to make this work, but I wonder if it's something that we should be handling when we generate manual-lookup.sqlite instead. Hannes, Philip, any thoughts? ------------------------------------------------------------------------ [2012-11-12 02:55:26] php at jtrick dot net Description: ------------ Searching for '_' (underscore) returns the following page: http://us3.php.net/manual/en/about.php A much more useful result location would be http://php.net/manual/en/function.gettext.php as _() is apparently a valid alias for gettext(). This was not known to me, and had it not been for another thoughtful user would have remained that way... ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63490&edit=1

« previous php.doc.bugs (#9243) next »