On Wednesday, Dec 17, 2003, at 14:25 America/New_York, Dirk Haun wrote:
Can't remember what the fix for search.php was about. If it was about the links showing up when searching for an author - that is a known issue and
exists as a bug report. Blaine, didn't you plan to work on that?

Original post on the search fix is at the bottom of this message. Better to manage that one via the bug tracker.

And, as you can see from my late reply, we all seem to have a minor
problem with the time we can spend on the project recently ...

That's what I assumed.  Finding time for free work is hard.

Thanks.

- Lucas

Here's the search fix:

In search.php, the code tests mode to see if it's 'search':
if ($HTTP_GET_VARS['mode'] == 'search' ) {
    $display .= $searchObj->doSearch();
} else {
    $display .= $searchObj->showForm();
}

But if the search was submitted via searchform.html (my own version of this was cannibalized from the Yahoo theme), the mode variable will be 'Search' rather than 'search'.

One possible fix is to do the test case-insensitive. However that wouldn't catch situations where the text had been translated. A more dependable fix is to look for the 'query' variable instead:

if (!empty($HTTP_GET_VARS['query']) ) {
    $display .= $searchObj->doSearch();
} else {
    $display .= $searchObj->showForm();
}

The new search.php would be:

require_once('lib-common.php');
require_once($_CONF['path_system'] . 'classes/search.class.php');

$display = COM_siteHeader();

$searchObj = new Search();

if ( !empty($HTTP_GET_VARS['query']) ) {
    $display .= $searchObj->doSearch();
} else {
    $display .= $searchObj->showForm();
}

$display .= COM_siteFooter();

echo $display;

Reply via email to