]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/filter/crypto/class_CaptchaEncryptFilter.php
Copyright updated
[core.git] / inc / classes / main / filter / crypto / class_CaptchaEncryptFilter.php
index 7208c60db0e4bb1cd54599cd34225b6d53ed0cf3..9ac36cbbf82258c37726cc369f03c149eafe76a9 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -37,7 +37,7 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
         *
         * @return      $filterInstance                 An instance of this filter class
         */
-       public final static function createCaptchaEncryptFilter () {
+       public static final function createCaptchaEncryptFilter () {
                // Get a new instance
                $filterInstance = new CaptchaEncryptFilter();
 
@@ -67,13 +67,13 @@ class CaptchaEncryptFilter extends BaseFilter implements Filterable {
                } // END - if
 
                // Decode it fully
-               $encryptDecoded = base64_decode(str_replace(" ", "+", urldecode($encryptRequest)));
+               $encryptDecoded = base64_decode(str_replace(' ', '+', urldecode($encryptRequest)));
 
                // Get a crypto helper and decrypt the string
                $decryptedString = ObjectFactory::createObjectByConfiguredName('crypto_class')->decryptString($encryptDecoded);
 
                // Is it the expected length?
-               if (strlen($decryptedString) != $this->getConfigInstance()->readConfig('captcha_string_length')) {
+               if (strlen($decryptedString) != $this->getConfigInstance()->getConfigEntry('captcha_string_length')) {
                        // Not found, so request is invalid
                        $requestInstance->requestIsValid(false);