disable captchas when debugging from localhost

This commit is contained in:
Shish 2010-01-23 12:48:43 +00:00
parent 4361bb0645
commit d715c38341

View File

@ -219,6 +219,9 @@ function theme_file($filepath) {
function captcha_get_html() {
global $config, $user;
if(DEBUG && ip_in_range($_SERVER['REMOTE_ADDR'], "127.0.0.0/8")) return "";
$captcha = "";
if($user->is_anonymous()) {
$rpk = $config->get_string("api_recaptcha_pubkey");
@ -239,6 +242,8 @@ function captcha_get_html() {
function captcha_check() {
global $config, $user;
if(DEBUG && ip_in_range($_SERVER['REMOTE_ADDR'], "127.0.0.0/8")) return true;
if($user->is_anonymous()) {
$rpk = $config->get_string('api_recaptcha_privkey');
if(!empty($rpk)) {