From 3cbb43304aa854bf794a6c127052db9058ff09a3 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Mon, 16 Feb 2009 09:37:47 +0000 Subject: [PATCH] "SPAM/MDL-18223, move language string to report_spamcleaner.php" --- admin/report/spamcleaner/spamcleaner.php | 32 ++++++++++++------------ lang/en_utf8/admin.php | 14 ----------- lang/en_utf8/report_spamcleaner.php | 17 +++++++++++++ 3 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 lang/en_utf8/report_spamcleaner.php diff --git a/admin/report/spamcleaner/spamcleaner.php b/admin/report/spamcleaner/spamcleaner.php index 4a30a648234..286eb97be54 100755 --- a/admin/report/spamcleaner/spamcleaner.php +++ b/admin/report/spamcleaner/spamcleaner.php @@ -93,7 +93,7 @@ admin_externalpage_print_header(); print_spamcleaner_javascript(); -print_box(get_string('spamcleanerintro', 'admin')); +print_box(get_string('spamcleanerintro', 'report_spamcleaner')); print_box_start(); // The forms section at the top @@ -104,14 +104,14 @@ print_box_start(); // The forms section at the top
- +
-

+


- +
@@ -179,7 +179,7 @@ function search_spammers($keywords) { } $keywordlist = implode(', ', $keywords); - print_box(get_string('spamresult', 'admin').s($keywordlist)).' ...'; + print_box(get_string('spamresult', 'report_spamcleaner').s($keywordlist)).' ...'; print_user_list(array($spamusers_desc, $spamusers_blog), $keywords); @@ -198,7 +198,7 @@ function print_user_list($users_rs, $keywords) { foreach ($users_rs as $rs){ foreach ($rs as $user) { if (!$count) { - echo ''; + echo '
 '.get_string('user','admin').''.get_string('spamdesc', 'admin').''.get_string('spamoperation', 'admin').'
'; } $count++; filter_user($user, $keywords, $count); @@ -208,7 +208,7 @@ function print_user_list($users_rs, $keywords) { foreach ($users_rs as $rs) { while ($user = rs_fetch_next_record($rs)) { if (!$count) { - echo '
 '.get_string('user','admin').''.get_string('spamdesc', 'report_spamcleaner').''.get_string('spamoperation', 'report_spamcleaner').'
'; + echo '
 '.get_string('user','admin').''.get_string('spamdesc', 'admin').''.get_string('spamoperation', 'admin').'
'; } $count++; filter_user($user, $keywords, $count); @@ -217,12 +217,12 @@ function print_user_list($users_rs, $keywords) { } if (!$count) { - echo get_string('spamcannotfinduser', 'admin'); + echo get_string('spamcannotfinduser', 'report_spamcleaner'); } else { echo '
 '.get_string('user','admin').''.get_string('spamdesc', 'report_spamcleaner').''.get_string('spamoperation', 'report_spamcleaner').'
'; echo '
- +
'; } } @@ -233,7 +233,7 @@ function filter_user($user, $keywords, $count) { $image_search = true; } if (isset($user->summary)) { - $user->description = '

'.get_string('spamfromblog', 'admin').'

'.$user->summary; + $user->description = '

'.get_string('spamfromblog', 'report_spamcleaner').'

'.$user->summary; unset($user->summary); } if (preg_match('#pixpath.')#', $user->description, $matches) @@ -315,7 +315,7 @@ var delall_cb = { try { var resp = YAHOO.lang.JSON.parse(o.responseText); } catch(e) { - alert(''); + alert(''); return; } if(resp == true){ @@ -325,7 +325,7 @@ var delall_cb = { } function init() { YAHOO.util.Event.addListener("removeall_btn", "click", function(){ - var yes = confirm(''); + var yes = confirm(''); if(yes){ var cObj = YAHOO.util.Connect.asyncRequest('POST', '?delall=yes&sesskey=', delall_cb); } @@ -336,7 +336,7 @@ var del_cb = { try { var resp = YAHOO.lang.JSON.parse(o.responseText); } catch(e) { - alert(''); + alert(''); return; } if(row) { @@ -347,7 +347,7 @@ var del_cb = { row.parentNode.removeChild(row); row = null; } else { - alert(''); + alert(''); } } } @@ -357,7 +357,7 @@ var ignore_cb = { try { var resp = YAHOO.lang.JSON.parse(o.responseText); } catch(e) { - alert(''); + alert(''); return; } if(row) { @@ -372,7 +372,7 @@ var ignore_cb = { } } function del_user(obj, id) { - var yes = confirm(''); + var yes = confirm(''); if(yes){ row = obj; var cObj = YAHOO.util.Connect.asyncRequest('POST', '?del=yes&sesskey=&id='+id, del_cb); diff --git a/lang/en_utf8/admin.php b/lang/en_utf8/admin.php index 1d170a28582..f8f4fb15bc8 100644 --- a/lang/en_utf8/admin.php +++ b/lang/en_utf8/admin.php @@ -691,21 +691,7 @@ $string['smtphosts'] = 'SMTP hosts'; $string['smtpmaxbulk'] = 'SMTP session limit'; $string['smtppass'] = 'SMTP password'; $string['smtpuser'] = 'SMTP username'; -$string['spamauto'] = 'Autodetect common spam patterns'; -$string['spamcannotdelete'] = 'Cannot delete this user'; -$string['spamcannotfinduser'] = 'No users matching your search'; $string['spamcleaner'] = 'Spam cleaner'; -$string['spamcleanerintro'] = 'This script allows you to search all user profiles for certain strings and then delete those accounts which are obviously created by spammers. You can search for multiple keywords using commas (eg casino,porn)

Moodle docs has more information about Reducing spam in Moodle.'; -$string['spamdesc'] = 'Description'; -$string['spamdeleteall'] = 'Delete all these user accounts'; -$string['spamdeleteconfirm'] = 'Are you sure you want to delete this entry? You can not undo this.'; -$string['spamdeleteallconfirm'] = 'Are you sure you want to delete all these user accounts? You can not undo this.'; -$string['spameg'] = 'eg: casino, porn, xxx '; -$string['spamfromblog'] = 'From blog post:'; -$string['spaminvalidresult'] = 'Unknown but invalid result'; -$string['spamoperation'] = 'Operation'; -$string['spamresult'] = 'Results of searching user profiles containing: '; -$string['spamsearch'] = 'Search for these keywords'; $string['stats'] = 'Statistics'; $string['statscatdepth'] = 'Maximum parent categories'; $string['statsfirstrun'] = 'Maximum processing interval'; diff --git a/lang/en_utf8/report_spamcleaner.php b/lang/en_utf8/report_spamcleaner.php new file mode 100644 index 00000000000..4470cc7d01b --- /dev/null +++ b/lang/en_utf8/report_spamcleaner.php @@ -0,0 +1,17 @@ +
Moodle docs has more information about Reducing spam in Moodle.'; +$string['spamdesc'] = 'Description'; +$string['spamdeleteall'] = 'Delete all these user accounts'; +$string['spamdeleteconfirm'] = 'Are you sure you want to delete this entry? You can not undo this.'; +$string['spamdeleteallconfirm'] = 'Are you sure you want to delete all these user accounts? You can not undo this.'; +$string['spameg'] = 'eg: casino, porn, xxx '; +$string['spamfromblog'] = 'From blog post:'; +$string['spaminvalidresult'] = 'Unknown but invalid result'; +$string['spamoperation'] = 'Operation'; +$string['spamresult'] = 'Results of searching user profiles containing: '; +$string['spamsearch'] = 'Search for these keywords'; +?>