mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
Removed filter and put badwords list in string files
This commit is contained in:
parent
b87a5a23a5
commit
832b9f8204
3 changed files with 4 additions and 16 deletions
|
@ -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';
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
// bad words < 5 characters long
|
||||
$filterwords = array (
|
||||
"shit",
|
||||
"fuck",
|
||||
"dick",
|
||||
"cunt",
|
||||
"pussy",
|
||||
"hore",
|
||||
"whore",
|
||||
"damn"
|
||||
);
|
||||
?>
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue