Changeset 44627
- Timestamp:
- 05/07/08 05:17:09 (2 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
worst-offenders/trunk/classes/obvious_name_litmus.php
r44533 r44627 9 9 */ 10 10 11 $obvious_words = "baccarat casino casinos cialis consolidation craps credit debit download gambling holdem kasino kredit payday payment poker ringtone ringtones roulette tramadol viagra xxx zocor"; 11 $obvious_words = "baccarat casino casinos cialis consolidation craps credit debit download gambling holdem kasino kredit payday payment poker ringtone ringtones roulette tramadol slots viagra xxx zocor"; 12 $obvious_words_array = explode(" ",$obvious_words); 12 13 13 14 if (class_exists('Litmus')) { … … 49 50 50 51 function prepare($comments) { 51 global $obvious_words ;52 global $obvious_words_array; 52 53 $results = array(); 53 54 foreach($comments as $item) { 54 55 $new_name_bits = array(); 55 $name_bits = explode(" ", $item->comment_author);56 $name_bits = explode(" ",strtolower($item->comment_author)); 56 57 foreach($name_bits as $name_bit) { 57 if ( strpos($obvious_words, $name_bit) !== false) {58 if (in_array($name_bit,$obvious_words_array)) { 58 59 $name_bit = "<strong>$name_bit</strong>"; 59 60 }
