summaryrefslogtreecommitdiff
path: root/inc/actions.php
diff options
context:
space:
mode:
authorAdrian Lang <lang@cosmocode.de>2010-03-09 11:42:56 +0100
committerAdrian Lang <lang@cosmocode.de>2010-03-09 12:07:06 +0100
commit5a932e77b3c806514203323540cb30e5ab9c28cf (patch)
tree23ef3ca78915ad9f91c24597476a90afb80a5d0f /inc/actions.php
parent45a9933524f9a31e0a104cccfd082217501017ba (diff)
downloadrpg-5a932e77b3c806514203323540cb30e5ab9c28cf.tar.gz
rpg-5a932e77b3c806514203323540cb30e5ab9c28cf.tar.bz2
Remove wordblock action, issue a msg instead
Diffstat (limited to 'inc/actions.php')
-rw-r--r--inc/actions.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/inc/actions.php b/inc/actions.php
index 5802bd6f5..2be5259fd 100644
--- a/inc/actions.php
+++ b/inc/actions.php
@@ -204,7 +204,7 @@ function act_clean($act){
if(!in_array($act,array('login','logout','register','save','cancel','edit','draft',
'preview','search','show','check','index','revisions',
'diff','recent','backlink','admin','subscribe','revert',
- 'unsubscribe','profile','resendpwd','recover','wordblock',
+ 'unsubscribe','profile','resendpwd','recover',
'draftdel','subscribens','unsubscribens',)) && substr($act,0,7) != 'export_' ) {
msg('Command unknown: '.htmlspecialchars($act),-1);
return 'show';
@@ -311,10 +311,13 @@ function act_save($act){
global $TEXT;
global $SUF;
global $SUM;
+ global $lang;
//spam check
- if(checkwordblock())
- return 'wordblock';
+ if(checkwordblock()) {
+ msg($lang['wordblock'], -1);
+ return 'edit';
+ }
//conflict check //FIXME use INFO
if($DATE != 0 && @filemtime(wikiFN($ID)) > $DATE )
return 'conflict';
@@ -353,8 +356,11 @@ function act_revert($act){
}
// spam check
- if(checkwordblock($Text))
- return 'wordblock';
+
+ if (checkwordblock($text)) {
+ msg($lang['wordblock'], -1);
+ return 'edit';
+ }
saveWikiText($ID,$text,$sum,false);
msg($sum,1);