From fbed08ded8345d1a37e4a0370fa41ca3b4a4a8f6 Mon Sep 17 00:00:00 2001 From: Abdulrahman Date: Mon, 15 Jan 2018 22:50:35 +0300 Subject: [PATCH] fix captcha --- CHANGELOG.md | 3 +++ includes/common.php | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7259a8..e87feb7 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## 2.4 +- fix bug where captcha doesn't work if website is closed. + ## 2.3 - fix bug where 'empty files' error when url uplaoding is on. - fix bug where limiting download size is not working. diff --git a/includes/common.php b/includes/common.php index 1e60882..31d04f4 100755 --- a/includes/common.php +++ b/includes/common.php @@ -308,7 +308,13 @@ if (file_exists(PATH . 'install') && !defined('IN_ADMIN') && !defined('IN_LOGIN' #is site close $login_page = ''; -if ($config['siteclose'] == '1' && !user_can('enter_acp') && !defined('IN_LOGIN') && !defined('IN_ADMIN')) +if ( + $config['siteclose'] == '1' && + !user_can('enter_acp') && + !defined('IN_LOGIN') && + !defined('IN_ADMIN') && + !(defined('IN_UCP') && in_array(g('go'), array('captcha', 'login', 'register'))) + ) { //if download, images ? if(