Exemplo n.º 1
0
  static function comment_updated($comment) {
    if (!module::get_var("akismet", "api_key")) {
      return;
    }

    if ($comment->original("state") != "spam" && $comment->state == "spam") {
      akismet::submit_spam($new);
    } else if ($comment->original("state") == "spam" && $comment->state != "spam") {
      akismet::submit_ham($new);
    }
  }
Exemplo n.º 2
0
 static function comment_updated($original, $new)
 {
     if (!module::get_var("akismet", "api_key")) {
         return;
     }
     if ($original->state != "spam" && $new->state == "spam") {
         akismet::submit_spam($new);
     } else {
         if ($original->state == "spam" && $new->state != "spam") {
             akismet::submit_ham($new);
         }
     }
 }