1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-27 10:14:47 +02:00

Some updates... username updates are now finished (no more changing here). Please review the changes to search.php (at the moment not active).

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4066 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-05-29 14:23:48 +00:00
parent 1e8b8e1601
commit efe6ed8753
5 changed files with 68 additions and 64 deletions

View File

@@ -641,6 +641,21 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
// so we can serialize it and place it in the DB
//
$store_search_data = array();
//
// Limit the character length (and with this the results displayed at all following pages) to prevent
// truncated result arrays. Normally, search results above 12000 are affected.
// - to include or not to include
/*
$max_result_length = 60000;
if (strlen($search_results) > $max_result_length)
{
$search_results = substr($search_results, 0, $max_result_length);
$search_results = substr($search_results, 0, strrpos($search_results, ','));
$total_match_count = count(explode(', ', $search_results));
}
*/
for($i = 0; $i < count($store_vars); $i++)
{
$store_search_data[$store_vars[$i]] = $$store_vars[$i];
@@ -653,7 +668,7 @@ else if ( $search_keywords != '' || $search_author != '' || $search_id )
$search_id = mt_rand();
$sql = "UPDATE " . SEARCH_TABLE . "
SET search_id = $search_id, search_array = '$result_array'
SET search_id = $search_id, search_array = '" . str_replace("\'", "''", $result_array) . "'
WHERE session_id = '" . $userdata['session_id'] . "'";
if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() )
{