OSDN Git Service

管理者でログインしている場合はスパムフィルタが動作しないようにした。
authortakezoe <takezoe@users.osdn.me>
Tue, 4 Oct 2011 01:14:26 +0000 (01:14 +0000)
committertakezoe <takezoe@users.osdn.me>
Tue, 4 Oct 2011 01:14:26 +0000 (01:14 +0000)
plugin/core/SpamFilter.pm

index 2f2b338..26c13a6 100644 (file)
@@ -21,6 +21,12 @@ sub hook {
        my $wiki = shift;
        my $cgi  = $wiki->get_CGI();
        
+       # ´ÉÍý¼Ô¤Ç¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë¾ì¹ç¤Ï¥¹¥Ñ¥à¥Õ¥£¥ë¥¿¤Ï̵¸ú
+       my $login = $wiki->get_login_info();
+       if(defined($login) && $login->{'type'} == 0){
+               return;
+       }
+       
        my $content = $cgi->param("content");
        return if($content eq '');