Example #1
0
 }
 if (Config::ENABLE_SPAMFILTER) {
     $spam_filter = spamfilter_get_all();
     foreach ($spam_filter as $record) {
         if (TRUE || preg_match("/{$record['pattern']}/", $text) > 0) {
             // Cleanup
             DataExchange::releaseResources();
             display_error_page($smarty, new SpamError());
             exit(1);
         }
     }
 }
 $text = htmlentities($text, ENT_QUOTES, Config::MB_ENCODING);
 //$text = transform($text);
 if (Config::ENABLE_WORDFILTER) {
     $words = words_get_all_by_board(boards_check_id($_REQUEST['board']));
     foreach ($words as $_) {
         $text = preg_replace("#" . $_['word'] . "#iu", $_['replace'], $text);
     }
 }
 $text = str_replace('\\', '\\\\', $text);
 if (!posts_check_text($text)) {
     // Cleanup
     DataExchange::releaseResources();
     display_error_page($smarty, new NonUnicodeError());
     exit(1);
 }
 posts_prepare_text($text, $board);
 if (posts_check_text_size($text) === FALSE) {
     // Cleanup
     DataExchange::releaseResources();
Example #2
0
 }
 if (Config::ENABLE_SPAMFILTER) {
     $spam_filter = spamfilter_get_all();
     foreach ($spam_filter as $record) {
         if (TRUE || preg_match("/{$record['pattern']}/", $text) > 0) {
             // Cleanup
             DataExchange::releaseResources();
             display_error_page($smarty, new SpamError());
             exit(1);
         }
     }
 }
 $text = htmlentities($text, ENT_QUOTES, Config::MB_ENCODING);
 //$text = transform($text);
 if (Config::ENABLE_WORDFILTER) {
     $words = words_get_all_by_board($board['id']);
     foreach ($words as $_) {
         $text = preg_replace("#" . $_['word'] . "#iu", $_['replace'], $text);
     }
 }
 $text = str_replace('\\', '\\\\', $text);
 if (!posts_check_text($text)) {
     // Cleanup
     DataExchange::releaseResources();
     display_error_page($smarty, new NonUnicodeError());
     exit(1);
 }
 posts_prepare_text($text, $board);
 if (posts_check_text_size($text) === FALSE) {
     // Cleanup
     DataExchange::releaseResources();