Removed filter and put badwords list in string files

This commit is contained in:
moodler 2005-03-05 03:14:45 +00:00
parent b87a5a23a5
commit 832b9f8204
3 changed files with 4 additions and 16 deletions

View file

@ -135,6 +135,7 @@ $string['category'] = 'Category';
$string['categoryadded'] = 'The category \'$a\' was added';
$string['categorydeleted'] = 'The category \'$a\' was deleted';
$string['categoryduplicate'] = 'A category named \'$a\' already exists!';
$string['censorbadwords'] = 'shit,fuck,dick,cunt,whore,slut,wank';
$string['changedpassword'] = 'Changed password';
$string['changepassword'] = 'Change password';
$string['changessaved'] = 'Changes saved';

View file

@ -1,13 +0,0 @@
<?php
// bad words < 5 characters long
$filterwords = array (
"shit",
"fuck",
"dick",
"cunt",
"pussy",
"hore",
"whore",
"damn"
);
?>

View file

@ -1127,13 +1127,13 @@ function lesson_qtype_menu($qtypes, $selected="", $link="", $onclick="") {
/*******************************************************************/
function lesson_check_nickname($name) {
// used to check high score nicknames.
// checks nickname agains a list of "bad words" in filter.php
// checks nickname against a list of "bad words"
if ($name == NULL) {
if (empty($name)) {
return false;
}
require_once('filter.php');
$filterwords = explode(',', get_string('censorbadwords'));
foreach ($filterwords as $filterword) {
if (strstr($name, $filterword)) {