mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #00258
[Bug 557873] Re: Configure Site > Site options > Anti-spam needs to show translated strings.
** Changed in: mahara
Assignee: (unassigned) => Evan Goldenberg (naveg)
** Changed in: mahara
Importance: Undecided => High
** Changed in: mahara
Milestone: None => 1.3.0
--
Configure Site > Site options > Anti-spam needs to show translated strings.
https://bugs.launchpad.net/bugs/557873
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Status in Mahara ePortfolio: New
Bug description:
Now we can see only English pull-down on "Configure Site > Site options > Anti-spam".
So we needs to show translated strings in pull-down by the following modification.
Program: lib/antispam.php
Line: 51
[before]
function available_spam_traps() {
$results = array();
$handle = opendir(get_config('docroot') . 'lib/antispam');
while ($file = readdir($handle)) {
preg_match("/(.+)SpamTrap\.php/", $file, $name);
if ($name) {
$results[strtolower($name[1])] = $name[1];
}
}
return $results;
}
[after]
function available_spam_traps() {
$results = array();
$handle = opendir(get_config('docroot') . 'lib/antispam');
while ($file = readdir($handle)) {
preg_match("/(.+)SpamTrap\.php/", $file, $name);
if ($name) {
$results[strtolower($name[1])] = get_string(strtolower($name[1]), 'admin');
}
}
return $results;
}
References