mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #00259
[Bug 557873] Re: Configure Site > Site options > Anti-spam needs to show translated strings.
Thanks for the patch mitstek, it is fixed now.
** Changed in: mahara
Status: New => Fix Committed
--
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: Fix Committed
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