1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

changed email class to the approach paul did with the class in 2.2 (the delimiter used as a 'fix' has not really solved the initial problem). fixed timezone display.

git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3966 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2003-05-03 23:24:04 +00:00
parent 17a3c09d93
commit c0d96c080d
18 changed files with 291 additions and 262 deletions

View File

@@ -78,7 +78,7 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
if ( $mode == 'post' || ( $stopword != 'not' && $stopword != 'and' && $stopword != 'or' ) )
{
$entry = preg_replace('#\b' . preg_quote($stopword) . '\b#', ' ', $entry);
$entry = str_replace(' ' . trim($stopword) . ' ', ' ', $entry);
}
}
}
@@ -90,7 +90,7 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_list[$j])));
if ( $mode == 'post' || ( $match_synonym != 'not' && $match_synonym != 'and' && $match_synonym != 'or' ) )
{
$entry = preg_replace('#\b' . trim($match_synonym) . '\b#', ' ' . trim($replace_synonym) . ' ', $entry);
$entry = str_replace(' ' . trim($match_synonym) . ' ', ' ' . trim($replace_synonym) . ' ', $entry);
}
}
}
@@ -100,10 +100,24 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
function split_words(&$entry, $mode = 'post')
{
// If you experience problems with the new method, uncomment this block.
/*
$rex = ( $mode == 'post' ) ? "/\b([\w<><77>-<2D>][\w<><77>-<2D>']*[\w<><77>-<2D>]+|[\w<><77>-<2D>]+?)\b/" : '/(\*?[a-z0-9<><39>-<2D>]+\*?)|\b([a-z0-9<><39>-<2D>]+)\b/';
preg_match_all($rex, $entry, $split_entries);
return $split_entries[1];
*/
$split_entries = array();
$split = explode(' ', $entry);
for ($i = 0; $i < count($split); $i++)
{
if (trim($split[$i]) != '')
{
$split_entries[] = trim($split[$i]);
}
}
return $split_entries;
}
function add_search_words($mode, $post_id, $post_text, $post_title = '')