| @@ 396-411 (lines=16) @@ | ||
| 393 | if ($this->texts['recognize_file']) { |
|
| 394 | $str .= "'{$this->getText(['recognize', 'data', 'file'])}'"; |
|
| 395 | } |
|
| 396 | if ($this->texts['recognize_data']) { |
|
| 397 | if ($this->texts['recognize_file']) { |
|
| 398 | $str .= ', '; |
|
| 399 | } |
|
| 400 | $str .= '['.PHP_EOL; |
|
| 401 | foreach ($this->texts['recognize_data'] as $key => $val) { |
|
| 402 | $str .= " {$rc->getShortName()}::{$this->getNameConst('ACTION_FIELD_', $key)} => "; |
|
| 403 | if (is_string($val)) { |
|
| 404 | $str .= "'{$val}'"; |
|
| 405 | } else { |
|
| 406 | $str .= "{$val}"; |
|
| 407 | } |
|
| 408 | $str .= ','.PHP_EOL; |
|
| 409 | } |
|
| 410 | $str .= ']'; |
|
| 411 | } |
|
| 412 | $str .= ')) {'.PHP_EOL; |
|
| 413 | $str .= ' $code = $captcha->getCode();'.PHP_EOL; |
|
| 414 | $str .= '} else {'.PHP_EOL; |
|
| @@ 452-467 (lines=16) @@ | ||
| 449 | if ($this->texts['recognize_file']) { |
|
| 450 | $str .= "'{$this->getText(['recognize', 'data', 'file'])}'"; |
|
| 451 | } |
|
| 452 | if ($this->texts['recognize_data']) { |
|
| 453 | if ($this->texts['recognize_file']) { |
|
| 454 | $str .= ', '; |
|
| 455 | } |
|
| 456 | $str .= '['.PHP_EOL; |
|
| 457 | foreach ($this->texts['recognize_data'] as $key => $val) { |
|
| 458 | $str .= " {$rc->getShortName()}::{$this->getNameConst('ACTION_FIELD_', $key)} => "; |
|
| 459 | if (is_string($val)) { |
|
| 460 | $str .= "'{$val}'"; |
|
| 461 | } else { |
|
| 462 | $str .= "{$val}"; |
|
| 463 | } |
|
| 464 | $str .= ','.PHP_EOL; |
|
| 465 | } |
|
| 466 | $str .= ' ]'; |
|
| 467 | } |
|
| 468 | $str .= ');'.PHP_EOL; |
|
| 469 | $str .= ' $code = $captcha->getCode();'.PHP_EOL; |
|
| 470 | $str .= '} catch (\jumper423\decaptcha\core\DeCaptchaErrors $e) {'.PHP_EOL; |
|