Changeset 15118


Ignore:
Timestamp:
May 19, 2012, 11:40:58 AM (9 years ago)
Author:
mistic100
Message:

display 'Invalid captcha' error even if the comment is already rejected

Location:
extensions/CryptograPHP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/CryptograPHP/include/category.inc.php

    r14527 r15118  
    3939  $securimage = new Securimage();
    4040
    41   if ( $action == 'reject' or $action == $conf['cryptographp']['comments_action'] or !is_a_guest() )
    42   {
    43     return $action;
    44   }
     41  if (!is_a_guest()) return $action;
    4542
    4643  if ($securimage->check($_POST['captcha_code']) == false)
    4744  {
    4845    if ($conf['cryptographp']['comments_action'] == 'reject') array_push($page['errors'], l10n('Invalid Captcha'));
    49     return $conf['cryptographp']['comments_action'];
     46    return ($action != 'reject') ? $conf['cryptographp']['comments_action'] : 'reject';
    5047  }
    5148
  • extensions/CryptograPHP/include/picture.inc.php

    r14527 r15118  
    3939  $securimage = new Securimage();
    4040
    41   if ( $action == 'reject' or $action == $conf['cryptographp']['comments_action'] or !is_a_guest() )
    42   {
    43     return $action;
    44   }
     41  if (!is_a_guest()) return $action;
    4542
    4643  if ($securimage->check($_POST['captcha_code']) == false)
    4744  {
    4845    if ($conf['cryptographp']['comments_action'] == 'reject') array_push($page['errors'], l10n('Invalid Captcha'));
    49     return $conf['cryptographp']['comments_action'];
     46    return ($action != 'reject') ? $conf['cryptographp']['comments_action'] : 'reject';
    5047  }
    5148
  • extensions/CryptograPHP/template/admin.tpl

    r14527 r15118  
    222222  </fieldset>
    223223 
    224   <p class="bottomButtons">
    225     <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit">
    226   </p>
    227224</fieldset>
     225<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"></p>
    228226</form>
    229227
Note: See TracChangeset for help on using the changeset viewer.