From: Steve W. <wai...@us...> - 2001-07-07 17:44:28
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory usw-pr-cvs1:/tmp/cvs-serv16945 Modified Files: search.php Log Message: Got fooled by an IF with no braces. Index: search.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/search.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** search.php 2001/07/07 17:34:52 1.6 --- search.php 2001/07/07 17:44:25 1.7 *************** *** 5,27 **** rcs_id('$Id$'); ! if (empty($searchterm)) ! $searchterm = ''; // FIXME: do something better here? ! fix_magic_quotes_gpc($searchterm); ! $html = "<P><B>" ! . sprintf(gettext ("Searching for \"%s\" ....."), ! htmlspecialchars($searchterm)) ! . "</B></P>\n"; // quote regexp chars $search = preg_quote($searchterm); // search matching pages $query = InitTitleSearch($dbi, $searchterm); $found = 0; while ($page = TitleSearchNextMatch($dbi, $query)) { ! $found++; ! $html .= LinkExistingWikiWord($page) . "<br>\n"; } --- 5,30 ---- rcs_id('$Id$'); ! if (empty($searchterm)) { ! $searchterm = ''; // FIXME: do something better here? ! } ! fix_magic_quotes_gpc($searchterm); ! $html = "<P><B>" ! . sprintf(gettext ("Searching for \"%s\" ....."), ! htmlspecialchars($searchterm)) ! . "</B></P>\n"; // quote regexp chars $search = preg_quote($searchterm); + // search matching pages $query = InitTitleSearch($dbi, $searchterm); $found = 0; + while ($page = TitleSearchNextMatch($dbi, $query)) { ! $found++; ! $html .= LinkExistingWikiWord($page) . "<br>\n"; } |