mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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
|
@ -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