summaryrefslogtreecommitdiff
path: root/modules/akismet/controllers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-29 10:54:59 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-29 10:54:59 -0800
commitc214dfd0948c1878dbd034694c2d8d6f8c8e1180 (patch)
tree6bde5526017c399ba255404fb2789bef7800e292 /modules/akismet/controllers
parent0d73738099f7c12f2185018a29b647763c9d36ce (diff)
Clean up form validation code.
Diffstat (limited to 'modules/akismet/controllers')
-rw-r--r--modules/akismet/controllers/admin_akismet.php11
1 files changed, 1 insertions, 10 deletions
diff --git a/modules/akismet/controllers/admin_akismet.php b/modules/akismet/controllers/admin_akismet.php
index ca3a1473..4847db53 100644
--- a/modules/akismet/controllers/admin_akismet.php
+++ b/modules/akismet/controllers/admin_akismet.php
@@ -25,17 +25,8 @@ class Admin_Akismet_Controller extends Admin_Controller {
// @todo move the "post" handler part of this code into a separate function
access::verify_csrf();
- $valid = $form->validate();
-
- if ($valid) {
+ if ($form->validate()) {
$new_key = $form->configure_akismet->api_key->value;
- if ($new_key && !akismet::validate_key($new_key)) {
- $form->configure_akismet->api_key->add_error("invalid", 1);
- $valid = false;
- }
- }
-
- if ($valid) {
$old_key = module::get_var("akismet", "api_key");
if ($old_key && !$new_key) {
message::success(t("Your Akismet key has been cleared."));