Advertisement
Guest User

Untitled

a guest
Jun 25th, 2012
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.41 KB | None | 0 0
  1. diff --git a/action.php b/action.php
  2. index aa0dcee..00fb35c 100644
  3. --- a/action.php
  4. +++ b/action.php
  5. @@ -241,8 +241,8 @@ class action_plugin_discussion extends DokuWiki_Action_Plugin{
  6.                          $comment['user']['name'] = $INFO['userinfo']['name'];
  7.                          $comment['user']['mail'] = $INFO['userinfo']['mail'];
  8.                      } elseif((isset($_SERVER['REMOTE_USER']) && $this->getConf('adminimport') && auth_ismanager()) || !isset($_SERVER['REMOTE_USER'])) {
  9. -                        if(empty($_REQUEST['name']) or empty($_REQUEST['mail'])) return; // don't add anonymous comments
  10. -                        if(!mail_isvalid($_REQUEST['mail'])) {
  11. +                        if(empty($_REQUEST['name'])) return; // don't add anonymous comments
  12. +                        if(!empty($_REQUEST['mail']) && !mail_isvalid($_REQUEST['mail'])) {
  13.                              msg($lang['regbadmail'], -1);
  14.                              return;
  15.                          } else {
  16. diff --git a/script.js b/script.js
  17. index 79e04c7..b9a7d86 100644
  18. --- a/script.js
  19. +++ b/script.js
  20. @@ -35,7 +35,7 @@ function validate(form){
  21.      if (isBlank(form.mail.value) || form.mail.value.indexOf("@") == -1){
  22.          form.mail.focus();
  23.          form.mail.style.backgroundColor = '#fcc';
  24. -        return false;
  25. +        //return false;
  26.      } else {
  27.          form.mail.style.backgroundColor = '#fff';
  28.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement