Dotclear

Changeset 3029


Ignore:
Timestamp:
05/08/11 23:47:19 (12 years ago)
Author:
flashfr
Message:

release 1.1 : add support for MySQL

Location:
plugins/accessibleCaptcha
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • plugins/accessibleCaptcha/_define.php

    r1899 r3029  
    66     /* Description*/         "This is an accessible captcha", 
    77     /* Author */             "Julien Wajsberg", 
    8      /* Version */            '1.0', 
     8     /* Version */            '1.1', 
    99     /* Permissions */        'usage,contentadmin', 
    1010     /* Priority */           200 
  • plugins/accessibleCaptcha/class.accessible.captcha.php

    r1899 r3029  
    141141     
    142142    // et on en profite pour enlever les anciens 
    143     $current_datetime = date('Y-m-d H:i:s'); 
    144     $query .= " or timestamp + interval '" . self::$hash_ttl_min . " min' < '" . $con->escape($current_datetime) . "'"; 
     143    $expired_timestamp = gmmktime(gmdate('H'), gmdate('i') - self::$hash_ttl_min); 
     144    $expired_datetime = gmdate('Y-m-d H:i:s', $expired_timestamp); 
     145    $query .= " or timestamp < '" . $con->escape($expired_datetime) . "'"; 
    145146    $con->execute($query); 
    146147  } 
     
    181182      $cur->captcha_id = $id; 
    182183      $cur->id = $new_id; 
    183       $cur->timestamp = date('Y-m-d H:i:s'); 
     184      $cur->timestamp = gmdate('Y-m-d H:i:s'); 
    184185      $cur->hash = $hash; 
    185186       
Note: See TracChangeset for help on using the changeset viewer.

Sites map